1
$\begingroup$

Can ANN with only one neuron in output layer be trained in a way that output neuron’s value (0-1) can be representation of some real value, like for example height.

In other words,can neural network given the inputs predict the height of a person by outputing values from 0 to 1. Zero being the 50 cm and 1 being 250cm.Or it will always gravitate to 0 or 1?Can it predict a height of 150cm (0.5) ?

$\endgroup$
1
$\begingroup$

Yes, this is possible. The only restriction on the range of output values is due to the activation function, if there is one. If, for example, the activation function is a sigmoid, the output would be restricted to values between 0 and 1. You can of course choose an activation function best suited to your problem, even if that means having none.

In your case, if you really want the output of your network to be between 50 and 250, you could use a scaled and shifted sigmoid as your activation: 200*sig(w*x+b)+50.

But, as was pointed out in comments below, having a single output neuron may not be the best architecture for this problem.

$\endgroup$
2
  • $\begingroup$ But will it be useful? Since it's non linearly scaled activation, the previous layer has to do impeccable post processing such that the final layer single sigmoid even after the non-linear scaling outputs desired values. $\endgroup$ – DuttaA Mar 9 '19 at 9:08
  • 1
    $\begingroup$ You may be right. I'm not sure how easy or stable learning would be. Perhaps a better solution outside the constraints of the question would be to frame this as a classification problem with a softmax final activation and cross entropy error. The classes could be something like {<50cm, 50-60cm, ..., 240-250cm, >250cm} $\endgroup$ – Philip Raeisghasem Mar 9 '19 at 9:21

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.