Classification problem using feed forward network
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/711187/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/711192/image.png)
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!