Question: Use this code segment to create 2 D synthetic data import numpy as np from sklearn.datasets import make _ blobs import matplotlib.pyplot as plt transformation
Use this code segment to create D synthetic data
import numpy as np
from sklearn.datasets import makeblobs
import matplotlib.pyplot as plt
transformation
D y makeblobsnsamples centers randomstate
X npdotD transformation
pltshowpltscatterX: X:
Using the data X which is not meancentered, compute PCA. The recompute PCA after meancentering X For both cases, plot data along with the first eigenvector. Additionally, plot the two eigenvectors in a single figure and comment on it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
