Neural Network help. Sorry!
So, not having been able to find help anywhere else, I come here looking to ask something about NNs when I see the thread complaining about all the NN threads recently. Haha, Oh well. Here's one more then.
I have question about inputting data. The data is layed out in a text file just like this:
4.4,0.4,1.1,3.2,flower-name
5.5,1.2,7.7,6.3,flower-name
4.5,6.2,4.4,1.9,flower-name
etc.
...
Each line is a data point. Now, the backprop function accepts one int. I realize, unfortunately, that the answer is probably different in each case, but I'll at least start by asking:
Would I enter each of the numbers in on the line separately? Like loop through backprop 4 times for each line (I almost positive that's not how it'd be done, but like I said, just trying to figure this all out), or do I average them all together or something?
I'm already normalizing the values by the way, by dividing the number by the highest number in each column.
Also, what about the flower-name? Surely that has to be taken into account somehow.
Anyway, thanks, and I'll post more details if necessary (and I'm sure it will be)
Quote: Original post by Gixugif
Now, the backprop function accepts one int.
What 'backprop' function? It sounds like you're using some kind of API?
You must be using a multilayer perceptron, right? If so, your perceptron can have multiple input nodes - use a separate node for each separate column. Feed the perceptron an entire row at a time.
Is the flower name the desired output? If so you could treat each flower type as a separate output node. Feed your network the inputs and perform backpropagation based on whether the correct output node is 1 and the rest are 0.
(If it makes you feel better, a classification algorithm such as flower identification is a decent use of NNs. Proceed.)
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Why, yes, as a matter of fact, that does make me feel much better.
by backprop I just meant backpropogation error. I was provided with that, feedforward, and such. I guess what I have to do is implement an algorithm that uses those functions to classify irises.
Anyway, thanks. That helps a little. I think I can figure out the rest of the way.
Here's the backprop program I was talking about, if you're still wondering:
http://cl1p.net/backprop
by backprop I just meant backpropogation error. I was provided with that, feedforward, and such. I guess what I have to do is implement an algorithm that uses those functions to classify irises.
Anyway, thanks. That helps a little. I think I can figure out the rest of the way.
Here's the backprop program I was talking about, if you're still wondering:
http://cl1p.net/backprop
Ok, that makes much more sense. The "test" input to the backprop function on that page picks the *index of the test to use*.
Each of your rows of flower data would be a 'test' in that code. Your numbers are the inputs and your flower name is the expected output.
Notice in their example, each test's output row only has a "1" on a single output? They have dedicated that output node to that specific test case. In their code they're doing image recognition of digits, so they have 10 output nodes - one per digit. You can do the same with your flowers.
The "feed forward" function takes the input and sends it through the network to compute the output.
The 'backpropagate errors' function looks at the difference between the output and the DESIRED output, and updates the network based on the difference (the "error").
This process has to be run repeatedly with all of the different input/output 'tests' until the network always produces a result within a (very) small margin of error. This is the 'training phase'.
After the training phase is done, then you can use input which is not in your test cases, and if everything goes well it will give you its best guess as to which flower type it is (pick the output node with the highest value).
Each of your rows of flower data would be a 'test' in that code. Your numbers are the inputs and your flower name is the expected output.
Notice in their example, each test's output row only has a "1" on a single output? They have dedicated that output node to that specific test case. In their code they're doing image recognition of digits, so they have 10 output nodes - one per digit. You can do the same with your flowers.
The "feed forward" function takes the input and sends it through the network to compute the output.
The 'backpropagate errors' function looks at the difference between the output and the DESIRED output, and updates the network based on the difference (the "error").
This process has to be run repeatedly with all of the different input/output 'tests' until the network always produces a result within a (very) small margin of error. This is the 'training phase'.
After the training phase is done, then you can use input which is not in your test cases, and if everything goes well it will give you its best guess as to which flower type it is (pick the output node with the highest value).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement