[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

R, why is my neural net so fucking shit ?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 1

File: neural_net2[1].jpg (67KB, 791x388px) Image search: [Google]
neural_net2[1].jpg
67KB, 791x388px
I'm learning R and wanted to train a nnet classifier (from the caret package) that could correctly output the class of an object based on 5 arguments (2 possible classes, "Yes" or "No")
But my classifier is actually shit, I split my data into training and test set, but basically my classifier almost gives no "Yes" label, less than 2% of its calculated output is "Yes" even though it should be around 35%.

Even when I give it the training data it was built with it gives me less than 0.5% Yes, so it's not even overfitting it's just shit

ctrl= trainControl(method = 'cv', number = 10, summaryFunction=twoClassSummary ,classProbs = TRUE)
paramGrid <- expand.grid(mtry = c(1,2,3,4), size = 4, decay = 0.1)
model = train( /... set training data and labels./)
metric = "ROC",
method = "nnet",
maxit = 1000,
algorithm='backprop',
learningrate=0.25,
preproc = c("range"),
tunegrid = paramGrid,
trControl = ctrl)

anybody here knows about nnet ? Because idk what I'm doing wrong
>>
>>58042019
Get a brain Moran
>>
>>58042019
I feel your pain. Data types correct? NN like numerical i think. Also if you have too many hidden nodes/layers, otherwise im at a loss with limited info in ur post m8.
>>
>>58042053
this
>>
Use a debugger
>>
It's tuneGrid and preProc not tunegrid and preproc, right now your nnet is just using the default.
Changing that will help a bit, but I doubt it'll be enough to make your classifier entirely efficient
>>
>>58042019
Is training data normalized?
>>
>>58042019
more iterations
less learning rate
different activation function
etc like all machine learning its just chaning some values until it kinda works
>>
>>58045123
oh shit, I expected R to tell me the name of the arguments were wrong. Well it's a bit better now, but not that much, like 3% Yes

>>58043882
>>58045272
data is numerical and normalized, tried normalizing it with both the preProc = "range" and preProc = ("center", "scale"), scaling is a bit better than range but the effect isn't that big, I still can't manage to get an half decent classifier

>>58044733
isn't debugging a huge pain in the ass for neural network ? What would I even be looking for ?
>>
>>58045329
Don't try to debug a NN. Consider the NN a black box in terms of weight and bias values
>>
how much test data did you provide it?
>>
>>58045329
Best practice for training is providing 5-10 times the number of weights in samples
>>
>>58045409
about 5000 tuples with approx 35% Yes and 65% No, which should be representative of the population
>>58045465
haven't tried manually setting weights yet, I'll try it even though 500 weight seems a bit strong
>>58045276
yeah, but this far every time I change something I take one step forward and two steps back, I'm not sure which values are actually helping
>>
>>58045617
5000 inputs to 500 weights is just 10x the number of weights, there is no need to alter the number of weights
Thread posts: 14
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.