Confusion matrix outputs NaN values after classification using Neural Network
11 次查看(过去 30 天)
显示 更早的评论
I am trying to classify data containing 10 classes using neural network. My data is in the form of wavfiles. I computed my feature vector using n-point FFT. The problem is that after classification, I am getting NaN as an output from the confusion matrix, although my input to the Neural Network doesnt contain any NaN values. When I classify the data for 3 classes, there is no such problem. But if I increase the number of my classes from 5 and more, I get NaN values.
0 个评论
回答(1 个)
Greg Heath
2016-12-6
Isn't it obvious?
1. Rows 9 and 10 contain nothing but zeros.
2. Ratios and percentages obtained by dividing by zero will yield NaNs
Hope this helps.
Thank you for formally accepting my answer
Greg
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!