Question: ( a ) Compute the PCA and LDA 1 D projections for the following 2 D dataset: Samples for class 1 ( 1 ) :

(a) Compute the PCA and LDA 1D projections for the following 2D dataset:
Samples for class 1(1):x1=(x1,x2)={(4,2),(2,4),(2,3),(3,6),(4,4)}
Samples for class 2(2):x2=(x1,x2)={(6,8),(9,5),(8,7),(10,8)}
Draw the two principal components on the plot for PCA as vectors, as well as the projected blue and red points in 1D.
Draw the projected 1D data using LDA.
(b) Repeat (a) for the following dataset:
Samples for class 1(1):x1=(x1,x2)={(6,8),(2,4),(2,3),(3,6)}
Samples for class 2(2):x2=(x1,x2)={(9,5),(8,7),(10,8),(4,2),(4,4)}
(c) Comment and compare how good the 1D projected data in (a) and (b) can be classified after PCA and LDA.
Write the code in PYTHON. You can use the information in the "Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd Edition" book.
 (a) Compute the PCA and LDA 1D projections for the following

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!