Effacer les filtres
Effacer les filtres

LDA error Sum(Double(Group));

1 vue (au cours des 30 derniers jours)
Lester Lim
Lester Lim le 17 Jan 2013
Hi, I need hlp in continuing this program. No matter what variable I put into it it always gives the same error...
if (nargin >= 3) PriorProb = Priors; end %Against different classes for i = 1:k,% Loop over classes to perform intermediate calculations % Establish location and size of each class Group = (Target == ClassLabel(i)); nGroup(i)= sum(double(Group));** % Calculate group mean vectors GroupMean(i,:) = mean(Input(Group,:)); % Accumulate pooled covariance information PooledCov=PooledCov+((nGroup(i)-1)/(n-k)).* cov(Input(Group,:)); end
Error: In an assignment A(I) = B, the number of elements in B and I must be the same.
ERROR-nGroup(i)= sum(double(Group));

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by