-1
$\begingroup$

When dealing with the Neural Network outputs, I found two different approaches to express the output to Neural Network:

Using one column with different value as different classifications:

1        // class A
10       // class B
10       // class B
1        // class A
1        // class A

as two different class

Using 2 columns as different classfication

1    0     // class A
1    0     // class A
0    1     // class B
1    0     // class A
0    1     // class B

Correct me if I am wrong, or please tell me the differences or which one is better for:

  • MultiLayerPerceptron

    • Transfer Function: TANH
    • using bias neurons
  • ResilentPropagation

    • Using Batch Mode

Thanks.

$\endgroup$
  • 1
    $\begingroup$ You use the first approach when you have two options and the second approach when you have more. Look up one-hot encoding. $\endgroup$ – Emre May 25 '17 at 6:50
0
$\begingroup$

Using one column but different values for different classes will fall under regression. The objective would be to predict a value as close as possible to target value. Mean square error, mean absolute error etc. are used as loss functions.

Using two columns with class indicators (1 for the target class and zero for rest) falls under classification. It can be seen as maximizing the probability for target class. Binary cross entropy, categorical cross entropy are used as loss function.

It mostly depends on the application on hand. If your end goal is just to know the class labels then use the second approach. Cross entropy is very sensitive and error will be large if the predicted and target class do not match.

| improve this answer | |
$\endgroup$
  • $\begingroup$ What I understood from your explanation is that, the first approach is fit for scoring in NN, and the second is fit for classification? $\endgroup$ – cinqS Apr 25 '17 at 6:18
  • $\begingroup$ Umm, yes. You can use second approach also for scoring (log likelihood ration test). The difference is the ease of training For e.g Target value - 10 Target class vector- [0 1] Predicted value using 1- 4 Predicted class vector - [1 0] The mse for first approach would be (10 - 4) ^2 but the cross entropy would be -infinity. A more sensitive loss function can be used with second approach, that's all. $\endgroup$ – arduinolover Apr 25 '17 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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