Negative output neural networks
조회 수: 1 (최근 30일)
이전 댓글 표시
Hamza Ali
2017년 6월 27일
답변: JESUS DAVID ARIZA ROYETH
2017년 6월 27일
I trained my neural network, but it generates negative values even though the target values are positive. I wonder why ?
댓글 수: 0
채택된 답변
JESUS DAVID ARIZA ROYETH
2017년 6월 27일
the output of the neural network depends on the transfer function of the output layer, if the results are negative you probably have a transfer function like "tansig" or "purelin", I recommend that if you don't want negative values you should change the transfer function, if the answer is in the range from 0 to 1 you can change it to "logsig" or whatever function you desire :
net.Layers{end}.transferFcn='logsig';
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!