0

I am currently trying to understand the ANN that I created for an assignment that essentially takes gray scale (0-150)images (120x128) and determines whether the person is Male or Female. It works for the most part. I am treating this like a boolean problem where the output(Male = 1, Female = 0). I am able to get the ANN to correctly identify Male or Female. However the outputs I am getting for the Males are (0.3-0.6) depending on the run. Should I be getting the value ~1 out?

I am using a sigmoid unit 1/(1+e^-y) and have tried to take the inverse. I have tried this using 5 - 60 hidden units on 1 layer and tried 2 outputs with flip flop results. I want to understand this so that I can apply this to a non-boolean problem. ie If I want a numerical output how would I got about doing that or am I using the wrong machine learning technique?

Kendall
  • 17
  • 3

1 Answers1

0

You can use binary function at the output with some threshold. Assuming, you have assigned 0 for female and 1 for male in training, while testing you will get values in between 0 and 1 and also some times below 0 and above 1......So to make a decision at the output value just add threshold of 0.5 and check output value, if it is less than 0.5 then estimated class is female and if it is equal to or greater than 0.5 then estimated class is male.

Chandra
  • 96
  • 1
  • 10
  • for 2-class problem of estimating male and female, one output is enough. Still you want more than one i.e. 2 outputs. Then, keep single out assigned for each class such that expected output for female will be [1 0] and that for male will be [0 1]. In testing you can use max of two outputs to decide the which class neural net out put belongs to..... – Chandra Mar 23 '17 at 09:00
  • Okay that is what I am doing since the 0 identifier tends to be on an order of magnitude less than the 1 identifier. Is there a way to train this to get closer to 1 or the target value? I ask because I am wondering how I can use this NN for non-boolean outputs. – Kendall Mar 23 '17 at 09:11
  • what do you mean by non-boolean outputs?..neural network will give non-boolean floating value only unless you use binary activation function at the output. since you used sigmoid function, it will give flaoting/real values in between 0 and 1 or -1 and 1.. .....after that its up-to you how to use it for your requirements... – Chandra Mar 23 '17 at 09:22