ML Quiz 1: Course Content
ML Quiz 1: Course Content
Course Content
ML Quiz 1
Attempts : 1/1
Questions : 10
Time : 45m
Instructions
Attempt History
Attempt #1
Jan 30, 7:19
PM
Marks: 10
Q No: 1 Correct
Answer Marks:
1/1
It is estimated that 50% of emails are spam emails. Some software has been
applied to filter these spam emails before they reach your inbox. A certain brand
of software claims that it can detect 95% of spam emails and the probability for a
false positive (a non-spam email detected as spam) is 8%.
Now if an email is detected as spam, then what is the probability that it is in fact a
non-spam email?
1/8
0.077 You Selected
0.00004
0.892
0.034
P(Actual Spam) = 0.5 P(SD |Actual Spam) = 0.95 P(SD |Not Spam) = 0.08
(P(SD | Not Spam) * P(Not Spam)) / (P(SD |Not Spam) *P(Not Spam) + P(SD |Spam)
*P(Spam))
Correct Answer
Q No: 2
Marks:
1/1
A doctor knows that cold causes fever 55% of the time. The prior probability of
any patient having a cold is 1/51,000. The prior probability of any patient having a
fever is 1/25
0.222231
0.000002
0.022019
Given,
The only parameter that can adjust the complexity of KNN is the number of neighbors k. The larger k is, the sm
Correct Answer
Q No: 4
Marks:
1/1
Which of the following is true wrt. to kNN when the value of k=1 and infinity,
respectively:
Mahalanobis distance
Cosine similarity
Correct Answer
Q No: 6
Marks:
1/1
Choose the most appropriate answer wrt the KD Tree nearest
Neighbour:
It is generally used when there are a very large number of data points in a lesser no of dimensions.
It outputs a model and a new point is quickly calculated without actually calculating distances.
Ans: Whatever may be the classes in the neighborhood, KNn can work with them simultaneously and gives the
~0.6883
~0.7821
x train x test y train y test = train test split(x y test size=0 30 random state=1)
model = GaussianNB() model.fit(x_train, y_train) y_predict = model.predict(x_test)
model_score = model.score(x_train, y_train) print(model_score)
0.9698924731182795
~0.9113
~0.8932
~0.8327
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.30, random_state=1) model = GaussianNB()
model.fit(x_train, y_train) y_predict = model.predict(x_test)
model_score = model.score(x_test, y_test) print(model_score)
Q No: 10 Correct Answer
Marks:
1/1
What is the recall for target classes-No and Yes for the
test data?
model = GaussianNB()
model.fit(x_train, y_train)
test_predict =
model.predict(x_test)
print(metrics.classification_report(y_test, test_predict))
Comments:
+ Add comments