A news article dataset contains 10,000 documents. The word "government" appears in 9,500
documents, while the word "cryptocurrency" appears in only 200 documents.
A TF-IDF vectorizer is applied to this dataset.
Which of the following statements is most likely true?
A.
The TF value of "government" will always be lower than the TF value of
"cryptocurrency" because it appears in more documents.
B.
The IDF contribution of "cryptocurrency" will be higher than that of
"government", even if both words occur the same number of times in a document.
C.
If "government" appears 50 times in one article, its TF-IDF score must be
higher than "cryptocurrency" appearing once in the same article.
D.
Removing "government" from the vocabulary will always decrease model
performance because it appears in most documents.
A published solution is not available for this question yet.
What is the output of the following code?
import pandas as pd
from sklearn.preprocessing import OneHotEncoder
df = pd.DataFrame({
"Color": ["Red", "Blue", "Green", "Blue", "Red"],
"Size": ["S", "M", "L", "XL", "M"]
})
encoder = OneHotEncoder(drop="first", sparse_output=False)
X = encoder.fit_transform(df)
print(X.shape[1])
A published solution is not available for this question yet.
A K-Means algorithm has a cluster centroid:
C=(6,6)
During the next iteration, a new data point:
(10,10)
is assigned to this cluster.
Before the update step, this cluster contained 4 data points. The individual points are not
available, but the centroid of the cluster before adding the new point was:
(6,6)
After adding the new point and performing the centroid update step, the new centroid becomes:
(6.8,6.8)
What is the sum of the coordinates of the original 4 data points combined?
A published solution is not available for this question yet.
A regression model achieves an R\(^{2}\) score of 0.92 on a test set.
The sum of squared deviations of the true target values from their mean is 625.
Compute the sum of squared prediction errors made by the model.
A published solution is not available for this question yet.
Consider two regularization models, Model A (Ridge) and Model B (Lasso), trained on a dataset
where two input features are highly collinear ( X1≈X2 ).
Which of the following statements accurately describe the expected behavior of these models and
their evaluation metrics under severe collinearity?
A.
Model B (Lasso) will distribute the regression coefficients evenly across both
X1 and X2 to balance the penalty, while Model A (Ridge) will force one of the coefficients to be
exactly zero.
B.
Model A (Ridge) will shrink the coefficients of X1 and X2 toward zero but keep
them roughly equal, whereas Model B (Lasso) will unstablely select one feature to keep and drive
the coefficient of the other exactly to zero.
C.
If the target variable y contains extreme outliers, evaluating these models
using Mean Squared Error (MSE) will penalize those large errors more heavily than Mean Absolute
Error (MAE).
D.
Minimizing the MSE loss function during the training of Model A and Model B
mathematically guarantees that the sum of the residual errors ( y−ŷ ) will always equal zero.
A published solution is not available for this question yet.
In the following question an Assertion (A) is followed by a Reason (R). Choose the correct option.
Assertion (A):
The order in which training samples are presented to the Perceptron can affect the final learned
weight vector, even when the training data is linearly separable.
Reason (R):
If a dataset is linearly separable, the Perceptron algorithm is guaranteed to converge after a finite
number of weight updates.
A.
Both A and R are true, and R is the correct explanation of A.
B.
Both A and R are true, but R is not the correct explanation of A.
C.
A is true, but R is false.
D.
A is false, but R is true.
A published solution is not available for this question yet.
A hospital develops a machine learning model to identify patients who may have a rare but life-
threatening disease. Only about 1% of patients actually have the disease.
Every patient predicted as positive is referred for an inexpensive follow-up blood test. However,
missing an actual patient with the disease could delay treatment and have severe consequences.
Which evaluation metric should be given the highest priority while selecting the model?
A.
Accuracy
B.
Precision
C.
Recall
D.
F1-score
A published solution is not available for this question yet.
After training a KMeans clustering algorithm on a dataset we find a data point is sitting exactly on
or extremely close to the decision boundary between two neighboring clusters.
Which of the following values will the silhouette score be close / equal to?
A.
1
B.
0
C.
-1
D.
infinity
A published solution is not available for this question yet.