PCA Plotting Exmaples


In [10]:
from yellowbrick.features.pca import PCADecomposition
from sklearn import datasets
iris = datasets.load_iris()
X = iris.data
y = iris.target

params = {'scale': True, 'color': y}
visualizer = PCADecomposition(**params)
visualizer.fit(X)
visualizer.transform(X)
visualizer.show()



In [14]:
from yellowbrick.features.pca import PCADecomposition
from sklearn import datasets
iris = datasets.load_iris()
X = iris.data
y = iris.target

params = {'scale': True, 'color': y, 'proj_dim':3}
visualizer = PCADecomposition(**params)
visualizer.fit(X)
visualizer.transform(X)
visualizer.show()



In [12]:
from yellowbrick.features.pca import pca_decomposition
from sklearn import datasets
iris = datasets.load_iris()
X = iris.data
y = iris.target

pca_decomposition(X, color=y, colormap='RdBu_r')



In [13]:
from yellowbrick.features.pca import pca_decomposition
from sklearn import datasets
iris = datasets.load_iris()
X = iris.data
y = iris.target

pca_decomposition(X, color=y, proj_dim=3, colormap='RdBu_r')