3
$\begingroup$

All the samples and articles i have seen are all having outputs of 1 or less. Is there a hidden reason why no one is using NN to produce higher value integers?? My situation is that I want NN to predict the exact outcome value rather than a -1

If I have a NN with say 4 inputs and 1 output with Round 1 Input: 51,22,35,43 Output: 847 Round 2 Input: 25,31,46,29 Output: 761 I want Round n Input: 51,33,19,27 Output: ??? (expected value)

I have read that GA is better in training NN but few examples have been provided to guide beginners like me. Am yet to see a detailed article on how to get this done. Using same example above, if i get the (near) best weights from first evolution using Round 1 error value, do i add the weight as parents in the next generation for Round 2?? How do i ensure that the best chromosome from previous rounds don't die after that generation.

Links to existing articles and detailed explanation will be very much appreciated. Thanks.

$\endgroup$
1
  • $\begingroup$ "I have read that GA is better in training NN" - whilst GAs can be used to train NNs, they have limitations and are only successful in a subset of problems - generally where a good NN for solving the problem can be relatively small. Gradient descent is much more widely applicable, and you will find plenty of examples of training NNs using backpropagation and gradient descent. $\endgroup$ Nov 18, 2017 at 8:55

2 Answers 2

3
$\begingroup$

Many neural network examples you see in the literature are doing classification problems, E.g. LeNet, AlexNet, Inception, etc are all image classification problems. In this domain, it's useful for the neural network to give outputs between 0 and 1 because an output between 0 and 1 can be interpreted, in some sense, as a probability. The reason these networks output numbers between 0 and 1 is in the layer activations of the network. The last layer in these networks is usually a softmax layer (or, if you're doing just binary classification, a sigmoid layer). Softmax and sigmoid functions have the nice property that they give outputs between 0 and 1 (softmax has the added nice property that it gives outputs which sum to 1). If you want your neural net to be able to output numbers that aren't between 0 and 1, simply change your activation function. Instead of a softmax last layer, you could use a linear one. In this case, it also makes sense to change the loss function you are using to perhaps something like Mean Squared Error (binary cross entropy, for example, won't work too well on negative numbers). There's nothing stopping you from using a deep neural network to perform regression rather than classification.

$\endgroup$
2
$\begingroup$

Is sounds like you want to use Neural Networks to do a regression problem instead of classification.

This post gives an example of using a neural network to do regression.

$\endgroup$
1
  • $\begingroup$ The referenced post was good but too complicated to follow for a beginner learning Java. I found an article that is simpler and more related here Financial-predictor-via-neural-network $\endgroup$
    – user42046
    Nov 20, 2017 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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