Challenge - 5 Problems
SVM Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the main goal of a Support Vector Machine?
In simple terms, what does a Support Vector Machine try to do when it learns from data?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
What is the output of this SVM prediction code?
Given this Python code using sklearn's SVM, what will be printed?
ML Python
from sklearn import svm X = [[0, 0], [1, 1]] y = [0, 1] clf = svm.SVC(kernel='linear') clf.fit(X, y) pred = clf.predict([[2, 2]]) print(pred[0])
Attempts:
2 left
❓ Hyperparameter
advanced2:00remaining
Which SVM hyperparameter controls the trade-off between margin size and classification error?
In SVM, which parameter lets you decide how much you want to avoid misclassifying training points versus having a wider margin?
Attempts:
2 left
❓ Metrics
advanced2:00remaining
Which metric is most suitable to evaluate an SVM classifier on imbalanced data?
If your SVM model predicts classes but one class is much rarer than the other, which metric gives a better sense of performance?
Attempts:
2 left
🔧 Debug
expert2:00remaining
What error does this SVM code raise?
Consider this code snippet. What error will it raise when run?
ML Python
from sklearn import svm X = [[0, 0], [1, 1], [2, 2]] y = [0, 1] clf = svm.SVC(kernel='linear') clf.fit(X, y)
Attempts:
2 left