Solved – R nnet package Softmax/Entropy option

neural networks

Can some one tell me when and why to use softmax=true option and entropy=T option?

The model i am trying to build has binary outcome and softmax=true works only when the two outcomes are classified as two variables on its own.

Otherwise entropy=T works. I could not get much help on this in the documentation. The question has been asked in many forums and no reply yet.

Best Answer

The help page on nnet does cover this fairly well, but here's a brief synopsis:

Softmax applies to multinomial responses. You have a binary response which is just a special case of multinomial.

Entropy causes nnet() to solve a loss function similar to logistic regression. If you don't specify entropy, then nnet() is doing an odd sort of least squares on binary outcomes.

If there are only two classes, entropy and softmax should give the same answer (but you'd have to set your PRNG seeds before being able to confirm this.)

Related Question