Question: In Fishers linear discriminant analysis, we search for a vector w such that all data points are well separately after they are projected to the

In Fishers linear discriminant analysis, we search for a vector w such that all data points are well separately after they are projected to the direction defined by w. The input data points are x1=(4,3)T y1 = 1 x2=(2,2)T y2 = 1 x3=(1,1)T y3 = -1 x4=(-2,-1)T y4= -1 (Note that the first element in vector xi is NOT x0=1). Use Python to find a vector w=[w1,w2] with Fishers linear discriminant analysis. Steps of the python code and intermediate results are needed.

Use these example steps:

Sw = np.matrix("2,1;1,2") m2 = np.matrix("2;2") m1 = np.matrix("1;0") from numpy.linalg import inv W = inv(Sw) * (m2-m1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!