I am reading about artificial neural networks it is said that ann is used for prediction after training with training data and it is also given that ann is used for classification.Say i have a data consisting of input as (theta,sin(theta)) and output as -1 if it is in upper half of sin wave and +1 if it is in lower half, here is it guaranteed that a trained neural network will always produce output as +1 or -1(i.e. classify as +1 or -1) if not then how is ann used for classification.
How ann is used for classification?
neural network
In your question, you have a binary classification problem. I understand what you're asking - you want to know how exactly a network classifies the inputs. Does the network only give (-1, +1) or something else?Most neural networks don't just say this is upper or this is lower. The networks would give you a probability distribution [0..1] for each possible class. The most common implementation is the popular softmax layer. You'd just choose the class with the highest probability as the prediction.It's also possible to encode your network such that it outputs +1 or -1. In fact, we can always add a layer just after the softmax layer to do exactly that.If you haven't I recommend you to study logistic regression before tackling neural network.