Code covered by the BSD License  

Highlights from
RAFisher2cda

4.0

4.0 | 10 ratings Rate this file 18 Downloads (last 30 days) File Size: 999.25 KB File ID: #4836
image thumbnail

RAFisher2cda

by Antonio Trujillo-Ortiz

 

29 Apr 2004 (Updated 30 Jan 2006)

Canonical Discriminant Analysis is a dimension-reduction technique related to PCA and CCA.

| Watch this File

File Information
Description

Canonical discriminant analysis is a dimension-reduction technique related to principal component analysis and canonical correlation called canonical discriminant analysis. It derives the canonical coefficients parallels that of one-way MANOVA and it finds linear combinations of the quantitative variables that provide maximal separation between the classes or groups in much the same way that principal components summarize total variation.

The output produced are the canonical coefficients and the scored canonical variables. The canonical coefficients are rotated. The ellipse confidence bounds. Also, it proceeds with a Bartlett's approximate chi-squared statistic for testing the canonical correlation coefficients.

In summary, the canonical discriminant analysis:
- Transform the variables so that the pooled within-group covariance matrix is
an identity matrix.
- Compute group means on the transformed variables.
- Performs a principal component analysis on the means, weighting each mean by the number of observations in the group. The eigenvalues are equal to the ratio of between-group variation to the within-group variation in the direction of each principal component. Here, the principal component analysis is runned by the singular value decomposition.
- Back-transform the principal components into the space of the original variables, obtaining the canonical variables.

File gives you the option to get an unbiased or maximum-likelihood parameter estimation.

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (12)
14 Jun 2004 Renze luo

perfect!

04 May 2005 Thilo Pfau

The function did not work for my dataset. The problem seemed to be that data (feature vectors) were not sorted by group. Easily fixable.
Ellipse plots seem to be all over the place.

12 Sep 2005 anil rohilla  
30 Mar 2006 Bryan Prazen

Great contribution. Note that the data must be sorted according to class and the first column of the data containes the class infromation.

11 Aug 2006 Simon Eickhoff

Crashed...

??? Error using ==> inv
Matrix must be square.

Error in ==> RAFisher2cda at 290
S = S*inv(triu(qr(s*v')));

21 Aug 2006 Francisco Rodrigues

Very good... Who needs canonical analysis, I recomend.

01 Nov 2007 Ji Cling

Shame on you.
Self downloading 1000ths of times to get to the top of the rank.

01 Nov 2007 Michael Hamman

My Dear Ji Cling,
 
Regularly I visit this FEX site in which excellent contributions for the fast solution of diverse types of problems in several disciplines have been given. The accusation that you are causing is very delicate. I do not know you. Neither the authors. We known them only by the references given in their author page. Only what I believe is in the quality of ethics of each one of them and ours. We are serious people dedicated to our work in the most diverse specialties. To be certain what you say. Then not alone this author does cheating but also all the others. Even you, that in principle, I think you are not signing with your true name. Finally, or really the community are honestly dawnloaded the m-files or finally someone are doing a very bad play. This because there exists a lack of control on this.

Best Wishes.

Mike

19 Apr 2008 Asim Ban

awesome

17 Oct 2008 Gerardo Aragon

Good for my reserach

03 Jan 2010 dafna hirschfeld

Eval
I also don't see a good reason to use 'eval' when there is no need to.

08 Dec 2011 Mike Alonzo

Just used this and it seems to work well. I have two questions:
1. Like Simon noted this crashed if I tried to run more than 20 columns of data (my actual matrix is 761 by 36). "Matrix must be square..."
2. Interpretation: I'd like to feed the results into LDA classifier. I've done this before with the PCA scores matrix since that has the same dimensions as my original data. Can't figure out how to do that with the CDA output though. Any thoughts?

Thanks,
Mike

Please login to add a comment or rating.
Updates
06 May 2004

It was added an appropriate format to cite this file.

30 Jan 2006

Were attached the jpg-images of the three Iris plant species.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 07:18:44
probability Antonio Trujillo-Ortiz 22 Oct 2008 07:18:44
discriminant analysis Antonio Trujillo-Ortiz 22 Oct 2008 07:18:44
canonical discriminant analysis Antonio Trujillo-Ortiz 22 Oct 2008 07:18:44
canonical Antonio Trujillo-Ortiz 22 Oct 2008 07:18:45

Contact us at files@mathworks.com