0
0
ML Pythonprogramming~20 mins

Why unsupervised learning finds hidden patterns in ML Python - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Unsupervised Learning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why does unsupervised learning find hidden patterns?

Unsupervised learning algorithms analyze data without labeled answers. Why can they find hidden patterns in data?

ABecause they group or organize data based on similarities or structures found within the data
BBecause they predict future values based on past labeled examples
CBecause they randomly assign categories without analyzing data
DBecause they use labels to guide the learning process
Attempts:
2 left
Predict Output
intermediate
2:00remaining
Output of K-means clustering on simple data

What is the output cluster assignment for the points after running K-means with 2 clusters?

ML Python
from sklearn.cluster import KMeans
import numpy as np

points = np.array([[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]])
kmeans = KMeans(n_clusters=2, random_state=0).fit(points)
labels = kmeans.labels_
print(labels.tolist())
A[1, 1, 1, 0, 0, 0]
B[1, 0, 1, 0, 1, 0]
C[0, 1, 0, 1, 0, 1]
D[0, 0, 0, 1, 1, 1]
Attempts:
2 left
Model Choice
advanced
2:00remaining
Best unsupervised model for dimensionality reduction

You want to reduce the number of features in your dataset while preserving important information. Which unsupervised model is best suited for this?

APrincipal Component Analysis (PCA)
BK-means clustering
CLinear Regression
DDecision Tree
Attempts:
2 left
Metrics
advanced
2:00remaining
Evaluating clustering quality without labels

Which metric can be used to evaluate the quality of clusters found by an unsupervised algorithm when no true labels are available?

AAccuracy score
BSilhouette score
CMean squared error
DCross-entropy loss
Attempts:
2 left
🔧 Debug
expert
2:00remaining
Why does this PCA code raise an error?

What error does the following PCA code raise and why?

ML Python
from sklearn.decomposition import PCA
import numpy as np

X = np.array([[1, 2], [3, 4], [5, 6]])
pca = PCA(n_components=4)
pca.fit(X)
AAttributeError: 'PCA' object has no attribute 'fit'
BTypeError: n_components must be an integer
CValueError: n_components must be between 0 and min(n_samples, n_features) inclusive
DNo error, code runs successfully
Attempts:
2 left