Classification problem using feed forward network
3 views (last 30 days)
Show older comments
Hello, I faced a problem when I tried to apply feedforward network to classification. This is my code:
net = feedforwardnet(10);
net.performFcn = 'crossentropy';
net.performParam.regularization = 0.1;
net.performParam.normalization = 'none';
[net,tr]=train(net,trainSamples.P,trainSamples.T);
output_norm=sim(net,testSamples.P);
Error occured: 'Performance function replaced with squared error performance.'
It seems the error occured since the performance function for trainlm must be squred error.
But I can still have an output:

The result is ok for me.
I confirmed that the performance function was replaced by mes. So I changed 'net.performFcn = 'crossentropy' to 'net.performFcn = 'mse', and ran the code again. But the result was:

I don't know what happened. I changed the dataset and ran several timee but results were similar. The first condition made a better results for me. Do you have any comment on it? Thanks
0 Comments
Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!