You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Kevin;
At line 38 of naiveBayesBayesianDemo.m the numbers of items in each class is computed as:
38: post.nu(c) = n;
but 'n' is not the number of items in each class, it is the total number of data, because in lines 35-37 we have:
35: ndx = Ytrain==c;
36: X = Xtrain(ndx, :);
37: n = length(ndx);
for debugging it is sufficient to change line number 35 with the following code:
ndx = find(Ytrain==c);
Yours: Mahmood
The text was updated successfully, but these errors were encountered:
Dear Kevin;
At line 38 of naiveBayesBayesianDemo.m the numbers of items in each class is computed as:
38: post.nu(c) = n;
but 'n' is not the number of items in each class, it is the total number of data, because in lines 35-37 we have:
35: ndx = Ytrain==c;
36: X = Xtrain(ndx, :);
37: n = length(ndx);
for debugging it is sufficient to change line number 35 with the following code:
ndx = find(Ytrain==c);
Yours: Mahmood
The text was updated successfully, but these errors were encountered: