Question bank

Pick an answer to see if you're right — with an explanation.

Machine LearningEasy
Predicting house prices is a…
aClassification task
bClustering task
cRegression task
dReinforcement task
Machine LearningEasy
Logistic regression converts a weighted sum into a probability using which function?
aReLU
bSoftmax over features
cSigmoid
dStep function
Machine LearningEasy
Why split data into train and test sets?
aTo evaluate on unseen data
bTo train faster
cTo reduce features
dTo balance classes
Machine LearningEasy
Which scikit-learn model tends to set some coefficients exactly to zero?
aLasso
bRidge
cLinearRegression
dKNeighborsRegressor
Machine LearningEasy
Model performs great on train, poorly on test. This is…
aUnderfitting
bRegularisation
cNormalisation
dOverfitting
Machine LearningEasy
A random forest reduces overfitting mainly by…
aTraining trees sequentially on residuals
bAveraging many trees trained on bootstrap samples with random feature subsets
cPruning a single tree
dScaling the features
Machine LearningMedium
Best metric for rare fraud detection?
aAccuracy
bRecall / PR-AUC
cR²
dMAE
Machine LearningEasy
Why must features usually be scaled before k-means?
aK-means only accepts values between 0 and 1
bScaling makes it run on GPUs
cScaling removes outliers
dIt uses distances, so large-unit features would dominate
Machine LearningEasy
K-Means is an example of…
aUnsupervised learning
bSupervised learning
cReinforcement learning
dDeep learning
Machine LearningMedium
What does this code keep?
pca = PCA(n_components=0.95)
Z = pca.fit_transform(X_scaled)
aExactly 95 components
bEnough components to explain 95% of the variance
cThe 95% of rows with least noise
dComponents with variance above 0.95
Machine LearningMedium
What does `random_state=42` do here?
X_tr, X_te, y_tr, y_te = train_test_split(
    X, y, test_size=0.2, random_state=42)
aIt uses 42% of the rows for testing
bIt trains 42 models
cIt makes the model more accurate
dIt fixes the shuffling seed so the same split is produced on every run
Machine LearningMedium
For a churn dataset with only 3% positives, which scoring is most informative during tuning?
aaccuracy
br2
caverage_precision
dneg_mean_squared_error
Machine LearningMedium
Precision answers which question?
aHow many of the actual positives did the model find?
bOf the cases predicted positive, how many really are positive?
cHow close are predictions to the average?
dHow quickly does the model train?
Machine LearningMedium
Which splitter should you use when validating a weekly sales forecasting model?
aTimeSeriesSplit
bKFold(shuffle=True)
cStratifiedKFold
dLeaveOneOut
Machine LearningMedium
A `city` column holds Pune, Delhi and Mumbai with no natural order. Which encoding fits?
aLabel encoding as 0, 1, 2
bDropping the column
cOne-hot encoding
dStandard scaling