How to Estimate the mean and covariances for all classes from training set?

94 Views Asked by At

A training set of 2000 samples ( value :2000 * 2 ) named training_set. how can i estimate the mean and covariances for all classes from training set. already tried mean and cov function.but every time get " Undefined function or variable " error. Just a beginner. thanks in advance.

1

There are 1 best solutions below

2
On

Okay. You have row vectors and the mean would be a row vector as well.

Matlab: training_mean = mean(training_set,1);

the cov function in matlab should work fine and your result should be a 2 by 2 matrix. Matlab has good documentation for this kind of things.