puncrazy
puncrazy

Reputation: 349

identifying input sequence using neural network

I fount simple neural scenario sayinh : network having 3 layers, 3 inputs and 2 outputs. It should be trained to recognize a simple pattern - if inputs are correspondingly 6.0,7.0 and 8.0 then outputs should be 3.0 and 4.0, otherwise outputs should be 23.0

3 layered neural network

What I understand is, hidden layer should Check input pattern in sequence with simple if else condition.

if in1 == 6 and in2 == 7 and in3 ==8:
    out1, out2 = 3, 4
else
    out = 5

Do I understand the problem correctly or something I am missing?

Upvotes: 1

Views: 103

Answers (2)

Simon
Simon

Reputation: 10160

That's not how a neural network works, and hidden nodes are certainly not just doing if/else checks

This is a very large topic, so I would highly recommend you check out something like the free coursera machine learning class (or something like it) to understand what a neural network is doing (https://www.coursera.org/learn/machine-learning/home/welcome)

Essentially your input nodes are variables/features, so yes, it is possible that for a given training example you are inputting 6, 7, and 8. But your hidden nodes are not doing conditional checks. Each hidden node is essentially a linear combination of your input features, where each feature is multiplied by some to-be-determined weight. The process of training a network is determining the ideal values of those weights to maximise your classification accuracy at the output layer.

If you're expecting your outputs to be something like 3, 4, 23, (i.e. continuous and not discrete categories) you can check out linear regression models, which are essentially the same as regression models you learn in high school: http://aimotion.blogspot.ca/2011/10/machine-learning-with-python-linear.html

The closest thing to if/else statements is something like a Decision Tree classifier, but even then its not strictly if/else statements: https://en.wikipedia.org/wiki/Decision_tree_learning

Upvotes: 0

hamish
hamish

Reputation: 455

Its hard to be sure based on your description, and assuming I am not missing something very obvious, if you are meant to be developing and training an ANN engine then you definitely cant be doing it via a simple if/else statement. If you are meant to do this classically then you need to build/utilise something like for example a supervised learning algorithm that uses a cost function which needs to be minimised.

Upvotes: 1

Related Questions