Challenge - 5 Problems
Dimensionality Reduction Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Purpose of Dimensionality Reduction Visualization
Why do we use dimensionality reduction techniques like t-SNE or PCA for visualization in machine learning?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
Output of PCA Dimensionality Reduction Code
What is the shape of the transformed data after applying PCA with 2 components on a dataset with shape (100, 5)?
ML Python
from sklearn.decomposition import PCA import numpy as np X = np.random.rand(100, 5) pca = PCA(n_components=2) X_pca = pca.fit_transform(X) print(X_pca.shape)
Attempts:
2 left
❓ Model Choice
advanced2:00remaining
Choosing a Dimensionality Reduction Method for Visualization
You have a dataset with 1000 features and want to visualize clusters in 2D. Which method is best for preserving local structure and showing clusters clearly?
Attempts:
2 left
❓ Metrics
advanced2:00remaining
Interpreting Explained Variance Ratio in PCA
After applying PCA with 3 components, the explained variance ratios are [0.5, 0.3, 0.1]. What does this tell you about the data?
Attempts:
2 left
🔧 Debug
expert3:00remaining
Debugging t-SNE Visualization Code
You run this code to visualize data with t-SNE but get a ValueError: 'perplexity must be less than n_samples'. What is the cause?
ML Python
from sklearn.manifold import TSNE import numpy as np X = np.random.rand(10, 50) tsne = TSNE(n_components=2, perplexity=30) X_embedded = tsne.fit_transform(X) print(X_embedded.shape)
Attempts:
2 left