フィルターのクリア

Specifying Neural Network output range to either 0 or1

2 ビュー (過去 30 日間)
golnoosh
golnoosh 2013 年 8 月 30 日
Hello
I have two questions
1. When I train my data with Neural Network, I want the answer to be either 0 or 1, because it means "Faulty/Non-faulty". I used "softmax" & "tansig" for output and hidden layer, Although the out put is really near 1 and 0 but they are not crisp. how can I get exact 1 and 0 output.
2. I tried to change the number of epochs, but whenever I run the program, it runs for 1000 iterations
Thanks In advance
Golnoosh

採用された回答

Greg Heath
Greg Heath 2013 年 8 月 31 日
1. With only 2 classes you can replace softmax with logsig for training and use. Then either
a. Use round: help round, doc round
or
b. Replace logsig with hardlim: help hardlim, doc hardlim
2. net.trainParam.epochs = 100;
Hope this helps.
Thank you for formally accepting my answer
Greg

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by