Geoscience Reference
In-Depth Information
Mu1 = cls.Mu(1,:);
Mu2 = cls.Mu(2,:);
Mu3 = cls.Mu(3,:);
Finally, we display the result in a graphic using
h1 = axes('Box','On');
hold on
line(data1(:,1),data1(:,2),...
'Marker','.','MarkerSize',8,...
'LineStyle','None','MarkerEdgeColor','r')
line(data2(:,1),data2(:,2),...
'Marker','.','MarkerSize',8,...
'LineStyle','None','MarkerEdgeColor','b')
line(data3(:,1),data3(:,2),...
'Marker','.','MarkerSize',8,...
'LineStyle','None','MarkerEdgeColor','m')
line(Mu1(:,1),Mu1(:,2),...
'Marker','o','MarkerEdgeColor','k',...
'MarkerSize',8,'MarkerFaceColor','k')
line(Mu2(:,1),Mu2(:,2),...
'Marker','o','MarkerEdgeColor','k',...
'MarkerSize',8,'MarkerFaceColor','k')
line(Mu3(:,1),Mu3(:,2),...
'Marker','o','MarkerEdgeColor','k',...
'MarkerSize',8,'MarkerFaceColor','k')
h2 = legend('Granite 1','Granite 2','Granite 3',...
'Location','SouthEast');
set(h2,'Box','Off')
f1 = @(x1,x2) K1 + L1(1)*x1 + L1(2)*x2;
h3 = ezplot(f1,[-5 12 0 5]);
set(h3,'Color','k')
f2 = @(x1,x2) K2 + L2(1)*x1 + L2(2)*x2;
h4 = ezplot(f2,[-5 10 0 5]);
set(h4,'Color','k')
title('Discriminant Analysis')
hold off
h e graphic shows the members of the three classes (or types of granite) in
three dif erent colors, the two red lines separating the three classes and the
bivariate means of the classes (marked as red plus signs) (Fig. 9.6). A new
sample with the composition x1 =5.2 and x2 =3.5 can easily be assigned to the
class Granite 2.
h1 = axes('XLim',[-5 25],'YLim',[0 5],...
Search WWH ::




Custom Search