Backpropagation Problem

Cb1f291af0c0d43095729d0a3fc9d04b
0
kaushik_acharya 101 Apr 13, 2005 at 11:07

Hi,

I am trying to solve this Backpropagation Problem:

http://axon.cs.byu.edu/Dan/478/homework/cs478.homework.html
2nd problem(iris classification problem) in Backprop Assignment

i have recently started with Backpropagation algo ….just implemented XOR …
in XOR it was 2 classes so there was only 1 neuron in Output layer..desired output was 1 or 0 ..but here output contains 3 classes ..
so what to do?
should i keep a single neuron and have 0.33 0.66 and 1 as the desired output for different classes or have more than 1 neuron in output layer?

What do u suggest?

6 Replies

Please log in or register to post a reply.

2562953b4e8e2602a8bfc24b1123a341
0
EvilSmile 101 Apr 14, 2005 at 03:57

@kaushik_acharya

Hi,

I am trying to solve this Backpropagation Problem:

http://axon.cs.byu.edu/Dan/478/homework/cs478.homework.html
2nd problem(iris classification problem) in Backprop Assignment

i have recently started with Backpropagation algo ….just implemented XOR …
in XOR it was 2 classes so there was only 1 neuron in Output layer..desired output was 1 or 0 ..but here output contains 3 classes ..
so what to do?
should i keep a single neuron and have 0.33 0.66 and 1 as the desired output for different classes or have more than 1 neuron in output layer?

What do u suggest?

[snapback]17149[/snapback]

I vaguely remember doing something with the Error Back Propagation network.
I would recommend that you use three output neurons. You can do with just two but I think using three makes your life easier.

ES

Cb1f291af0c0d43095729d0a3fc9d04b
0
kaushik_acharya 101 Apr 17, 2005 at 10:47

Yeah I tried:
with 2 neurons in Hidden Layer and 3 neurons in Output layer …
My program is able to identify for 2 classes:
Iris-setosa, Iris-virginica
but unable to classify Iris-versicolor..

i m confused why is it failing….
i m following the book Neural Networks: A comprehensive Foundation by Simon Haykin

I have put the source code here:
Iris Classification… using Backpropagation

2562953b4e8e2602a8bfc24b1123a341
0
EvilSmile 101 Apr 18, 2005 at 05:06

@kaushik_acharya

Yeah I tried:
with 2 neurons in Hidden Layer and 3 neurons in Output layer …
My program is able to identify for 2 classes:
Iris-setosa, Iris-virginica
but unable to classify Iris-versicolor..

i m confused why is it failing….
i m following the book Neural Networks: A comprehensive Foundation by Simon Haykin

I have put the source code here:
Iris Classification… using Backpropagation

[snapback]17213[/snapback]

I did not look at the code (no time for that mate) but I wanted to know if you are using the output nodes to output 0,1 depending on whether it is the desired class.

i.e

Possible outputs are only:
1,0,0
0,1,0
0,0,1

Each corresponds to one of the classes the input can be classified under.

Is that what you are doing?

ES

Cb1f291af0c0d43095729d0a3fc9d04b
0
kaushik_acharya 101 Apr 21, 2005 at 14:15

@EvilSmile

Possible outputs are only:
1,0,0
0,1,0
0,0,1

Each corresponds to one of the classes the input can be classified under.

Is that what you are doing?

ES

[snapback]17240[/snapback]

yeah that’s what i m doing ……… i had done a small mistake … i guess i had corrected it …
but i don’t undertstand why its not able to identify Iris-setosa for a single test case…(yeah,earlier it was some other class) ….
to check i have put 3 global counters in my train function (each corresponding to a particular class) … just after classifying the class and before doing adjustment of weights i m incrementing the counter whose class is corresponding to that particular row of test data …. finally i got these:
class_zero=37655 class_one=31543 class_two=35802

(my trng epoch is 1000)
so from the counter result it is clear that while in training the net is able to identify each of the class …….. but even after looking again and again … i m not sure why it is failing to identify Iris-setosa in each case ………….

Cb1f291af0c0d43095729d0a3fc9d04b
0
kaushik_acharya 101 Apr 22, 2005 at 03:57

Hi,
Its now working for most of the cases …
Change I had implemented was using srand() function…
earlier i was using rand() only which was giving same set of intial weights every time ……..

Thanks to all of u,
Kaushik

hey could you give me the URL where I can get similar type of classification problem using Bacjkpropagation Algo ……..

163fe059797c07be64c6c003d86a3bad
0
zubin 101 May 09, 2006 at 14:43

I’m having the same problem with classifying iris data using backpropagation. I have one neuron with 4 input nodes and three output nodes. I get one output value if i apply the sigmoid function on the weighted sum of the three inputs. For my first training data i get a value of 0.66. Now, I have no idea how i’m supposed to compare it to the three output values, and which output value is correct, and for what output value do i update the actual output value?