LDA ouput as classes seperated well in plot

  • Follow


 i dont know much about lda but i want to learn.
>
> for the time being i want to see the result how it can distinguish classes , on plot.
> 
> i want to see two seperate clusters on the plot.
> 
> i know that lda transformation will do good seperability.
> 
> i know the within class matrix and between class matrix denoted by Vw and Vb in general
> 
> what variables i should choose so that i can plot the separation after lda transformation.
> 
> suppose i have 200 samples each of dimension 140.
> i am appending a part of the code from one of the files in matlab central. copyrights reserved for the author of that code.
> 
> [N,d] = size(sample); C=nr_class;
> 
> %Obtain with-in class matrix Vw
> Vw = zeros(d,d);
> for i = 1:C;
> w = ........................% some trick
> Vw = Vw + w'*w;
> end;
> Vw = (1-gamma)*Vw+gamma/(N-C)*trace(Vw)*eye(d);
> 
> %Obtain between-class matrix Vb
> Vb = zeros(d,d);
> for i = 1:C-1;
> for j = i+1:C;
> ..........
> w =........................%some trick
> Vb = Vb+w'*w;
> end;
> end;
> 
> %Compute Projection matrix V
> [V,D] = eig(inv(Vw)*Vb);
> [d,index] = sort(diag(D),'descend');
> V = V(:,index(1:k));
> 
> what variables to plot after separation??????????/
> 
> can anybody please explain. 
 
Subject: lda seperation plot-- variables to choose

From: shahnaz fatima

Date: 25 Jun, 2010 04:58:03

Message: 3 of 3 
Reply to this messageAdd author  
0
Reply shahnaz 6/25/2010 10:49:04 AM


0 Replies
339 Views

(page loaded in 0.03 seconds)


Reply: