Classification problem using feed forward network

1 vue (au cours des 30 derniers jours)
Yijun GUO
Yijun GUO le 13 Août 2021
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

Réponses (0)

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!

Translated by