0
$\begingroup$

I'm looking at running a neural network to predict the probability of a turtle becoming entangled in a fishing net. My input variables are fishing net characteristics that include continuos and categorical values (that i have scaled between 0 and 1) and my output is either 1(present) or 0 (absent).

My question is: Am i correct in saying this is a classification problem and i should be using the 'nnet' package, since 'neuralnet' only deals with regression?

Thanks for your time

UPDATE: Here is some code i used for cross validating

`ControlParameters<-trainControl(method="cv",number=10, classProb=FALSE)

parameterGrid<- expand.grid(layer1=1:5,layer2=1:5,layer3=1:5)

Model1<-train(Turtles~Twine+Mesh+Black+Blue+Green+Red+Orange‌​+Yellow+Synthetic+Br‌​aided+Mono+Multi+X1+‌​X2+X3+X4+X5+X16,data‌​=train_Hypep,method=‌​'neuralnet', preProc = c("center", "scale"),trControl=ControlParameters) `

$\endgroup$

1 Answer 1

1
$\begingroup$

Nope, You're still doing regression, just logit, so the output layer should not be linear (but sigmoidal) and you should optimize maximum likelihood. Any feed forward network that lets you set that will do.

$\endgroup$
6
  • $\begingroup$ Please set as answer $\endgroup$
    – doker
    Commented May 15, 2017 at 19:19
  • $\begingroup$ of course, im new how do i do this? $\endgroup$
    – Martin
    Commented May 15, 2017 at 19:20
  • $\begingroup$ There should be check mark to be clicked. $\endgroup$
    – doker
    Commented May 15, 2017 at 19:21
  • $\begingroup$ Hi @doker although you say this is a regression problem why do i keep getting this warning message in my neural network? "You are trying to do regression and your outcome only has two possible values Are you trying to do classification? If so, use a 2 level factor as your outcome column".? $\endgroup$
    – Martin
    Commented May 15, 2017 at 22:18
  • $\begingroup$ I don't know what you're doing. Show code. Classification will only return you 1, 0. Regression can return 0.87 for instance unless the author of this library uses different terminology. $\endgroup$
    – doker
    Commented May 16, 2017 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.