Use python to answer: Done on google colabortory.
Dataset used: Olivetti Faces Dataset Description
import numpy as np
from sklearn import datasets
from sklearn.decomposition import PCA
# Load the dataset
faces = datasets.fetch_olivetti_faces()
data = faces.data # Input data or input features
target = faces.target # Label or Class or Variable to be predicted
# Apply PCA to reduce the dimensionality of the data
pca = PCA(n_components=100, whiten=True)
X = pca.fit_transform(data) ## X Represents the data and you will use for model training
# Size of the datset
X.shape # (Number of images, input feature)
Question 1:
Visualize some (at least five) of the images in the dataset. Are there any noticeable differences
between the images of different individuals? (Hint: You can use imshow() method to visualise
images)
#Your code will go here

Use python to answer Done on google colabortory. Dataset used Ol.pdf

  • 1.
    Use python toanswer: Done on google colabortory. Dataset used: Olivetti Faces Dataset Description import numpy as np from sklearn import datasets from sklearn.decomposition import PCA # Load the dataset faces = datasets.fetch_olivetti_faces() data = faces.data # Input data or input features target = faces.target # Label or Class or Variable to be predicted # Apply PCA to reduce the dimensionality of the data pca = PCA(n_components=100, whiten=True) X = pca.fit_transform(data) ## X Represents the data and you will use for model training # Size of the datset X.shape # (Number of images, input feature) Question 1: Visualize some (at least five) of the images in the dataset. Are there any noticeable differences between the images of different individuals? (Hint: You can use imshow() method to visualise images) #Your code will go here