PCA Quiz
PCA Quiz
Marked Answer :
Unsupervised
Correct Answer :
Unsupervised
Marked Answer :
In Dimensionality Reduction
Correct Answer :
In Dimensionality Reduction
Extract only features and scale the data using StandardScaler() , compute min covariance?
Marked Answer :
-0.57
Correct Answer :
-0.57
Extract only features and scale the data using StandardScaler() , how many eigen_values
will be calculated?
Marked Answer :
64
Correct Answer :
64
from the above eigenvalues and eigenvectors, create eigenpair and calculate maximum
cumulative explained variance?
Marked Answer :
100
Correct Answer :
100
Marked Answer :
Correct Answer :
from the below plot, select the range of components can be selected?
Marked Answer :
30-40
Correct Answer :
10-20
0.12
Correct Answer :
0.12
Which of the following is the correct syntax for finding the eigenvalues and eigenvectors
with give covariance matric (cov_mat)?
Marked Answer :
Correct Answer :
E. standardization.
Marked Answer :
C->E->A->D->B
Correct Answer :
C->E->A->D->B
What correction is required in the following lines of code to create covariance matrix?
scaler = StandardScaler()
standardized_data = scaler.fit_transform(data)
covariance_matrix = np.cov(standardized_data)
Marked Answer :
Need to perform transpose of standardized_data
Correct Answer :
pca = PCA(n_components=0.95)
Marked Answer :
We are looking for the principal components that cumulatively explain 95% of the variance in the
data.
Correct Answer :
We are looking for the principal components that cumulatively explain 95% of the variance in the
data.
Marked Answer :
Correct Answer :
Which of the following non-zero vector stays parallel after matrix multiplication
Marked Answer :
EigenVector
Correct Answer :
EigenVector
The Output of PCA is always a new representation of data with a lower dimension than
the original data representation.
Marked Answer :
TRUE
Correct Answer :
TRUE
Marked Answer :
Correct Answer :
Marked Answer :
Correct Answer :
What is the minimum and maximum limit of n_components value we can give in PCA?
Marked Answer :
Correct Answer :
Use the Gym.csv dataset and Apply PCA in the given dataset, what is the minimum
n_components required to attain 0.99% of variance?
Marked Answer :
Correct Answer :
4
Apply PCA in the given dataset(gym.csv) with n_components as 2, Then get the original
(approx.) data back from PCA, what is the difference in sum of variance of all columns
before and after applying PCA?
Marked Answer :
5.85
Correct Answer :
16.26
Marked Answer :
FALSE
Correct Answer :
FALSE
What is the sum of eigenvalues calculated for the first 8 records(gym.csv) with the
independent features?
Marked Answer :
98.32
Correct Answer :
101.76
1. The first model uses the raw data without any preprocessing.
2. The second model applies PCA with n_components set to 4 before fitting the data.
Both models should be generated using train_test_split with test_size=0.2 and random_state=24
during the train-test split.
Your task is to calculate the Root Mean Squared Error (RMSE) for both models and determine
whether the performance of the second model (PCA-based) is better compared to the first model
(raw data).
Marked Answer :
Correct Answer :
Marked Answer :
-0.0592
Correct Answer :
-0.0592
1. The first model uses the raw data without any preprocessing.
2. The second model applies standardscaler only to independent features and then
apply PCA with n_components set to 4 before fitting the data.
Both models should be generated using train_test_split with test_size=0.2 and random_state=24
during the train-test split.
Your task is to calculate the Root Mean Squared Error (RMSE) for both models and determine
whether the performance of the second model (StandardScalar & PCA-based) is better compared
to the first model (raw data).
Marked Answer :
Correct Answer :
No change in performance
While Selecting Principal Components, the eigenvalues are arranged in descending order,
indicating the amount of variance explained by each component(gym.csv)?
Marked Answer :
TRUE
Correct Answer :
TRUE