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.

回答(1 个)

Greg Heath
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

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by