Confusion matrix outputs NaN values after classification using Neural Network
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Greg Heath
on 6 Dec 2016
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 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!