- Allows for >=2 classes
- Requires only base MATLAB (no toolboxes needed)
- Assumes that the data is complete (no missing values)
- Has been verified against statistical software
Warning:
- if pooled covariance could not be calculated matrix values will be ("Inf")
(no error)
-requires Matlab >=7.6 (OOP synatx)
Darko Juric (2021). MultiClass LDA (https://www.mathworks.com/matlabcentral/fileexchange/31760-multiclass-lda), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
When run the code. it said:
Undefined function 'knnclassify' for input arguments of type 'cell'.
Error in LDA_Demo (line 28)
calculatedClases = knnclassify(transformedTestSamples, transformedTrainSamples, trainClasses);
>>
Hi Darko,
thank you very much for sharing your file!!
But how could I use your code directly in MATLAB?
Do I have to store it in a new function or so?!?
Thanks a lot!
Make groups from 'transformedTrainSamples' and specify a group for every sample from 'transformedTestSamples'.
Number of groups and sample belonging are determinated by 'trainClasses'.
I hope it is clearer now.
What is knnclassfy?