0

I am working on an MLP-neural network using supervised learning.

For the hidden layers I am using Tanh (-1,1) and for the output layer Softmax (which gives the probability distribution btw 0 and 1.

As I am working with supervised learning should my target output be between 0 and 1, or -1 and 1 (because of the Tanh function), or does it not matter?

Thanks!

Eric Brandt
  • 7,886
  • 3
  • 18
  • 35
LVoltz
  • 15
  • 4
  • The targets depend on the task (classification or regression) and the loss function, You should include more information. – Dr. Snoopy Mar 08 '19 at 12:34
  • It is a classification problem (2 classes and multi-classes - separate problems). The loss funtions is MSE (quadratic). Thanks – LVoltz Mar 08 '19 at 12:53
  • You should use categorical cross-entropy for softmax classification, and in this case the labels have to be one-hot encoded. MSE is not a classification loss. – Dr. Snoopy Mar 08 '19 at 13:02
  • Right! But if I use Mse and tanh and softmax. What should be my target output. Is there a problem to use -1 and 1 or 0 and 1? – LVoltz Mar 08 '19 at 13:21
  • The hidden layer activation is irrelevant, one hot encoding means the targets are vectors of binary 0/1 values. – Dr. Snoopy Mar 08 '19 at 13:22
  • Thanks for your reply. I agree with however I use both (one simulation -1 and 1 and another 0 and 1) and the results are the same (only the loss function had another value) but then I can adjust the error tolerance. But speaking about the probability it was the same. How can I explain that? – LVoltz Mar 08 '19 at 13:31

0 Answers0