<reponame>dibyanshushekhardey/Machine-Learning<filename>Machine Learning Fundamentals with Python Datacamp/Unsupervised Learning in Python/Discovering interpretable features/pca doesn't learn part.py
# Import PCA
from sklearn.decomposition import PCA

# Create a PCA instance: model
model = PCA(n_components=7)

# Apply fit_transform to samples: features
features = model.fit_transform(samples)

# Call show_as_image on each component
for component in model.components_:
    show_as_image(component)
    
Learning Fundamentals with Python Datacamp/Unsupervised Learning in Python/Discovering interpretable features/pca doesn't learn part.py
# Import PCA
from sklearn.decomposition import PCA

# Create a PCA instance: model
model = PCA(n_components=7)

# Apply fit_transform to samples: features
features = model.fit_transform(samples)

# Call show_as_image on each component
for component in model.components_:
    show_as_image(component)
# Import PCA # Create a PCA instance: model # Apply fit_transform to samples: features # Call show_as_image on each component