Chapter quizzes from class.
|
If predictors are very different in scales, should we standardize predictors before running kNN?
Yes
|
|
Consider a kNN model with k=7. For a new observation, there are 5 nearest neighbors in class 1 and 2 nearest neighbors in class 0. With a cutoff = 0.75, which class should we assign this observation to?
Class 0. C1 = 5, C0 = 2. C1 = (5/7 = 0.71). C2 =(2/7 = 0.28). Y=0 -> (p (0.71) < cutoff(0.75)) ---> Class 0
|
|
Which of the following weights are reasonable for kNN of prediction? Denote by di the distance of the i-th nearest neighbor.
(1/di) / (1/d1 + 1/d2 +... + 1/dk)
|
|
Consider the same 2-class classification problem and use the same output table as in the previous question. Which value for k is most appropriate?
3
|
|
For continous variable with 100 unique values, how many possible partitions are there along that variable in the recursive partitioning
99
|
|
Suppose we are studying a 4-class classification problem with classification tree. What is the maximum value of entropy measure of impurity?
2 ---> log2(4) = 2
|
|
How many possible partitions can we have for a categorical predictor with 4 categories? (Hint: you can enumerate them)
7 --> abcd, a-bcd, b-acd, c-dab, d-abc, ab-cd, ac-bd, ad-ac
|
|
Is a full tree over fitted
Yes
|
|
Which tree is smaller, minimum error tree or best pruned tree ? Suppose they are different (sometimes they can be the same tree)
Best Pruned Tree
|
|
How do we measure the impurity of a partition in regression tree?
Sum of Squared Deviations
|
|
Is CART a model free algorithm
Yes
|
|
For a logistic regression mode estimated as below, what is the probability of accepting personal loan offer for a person with income of 50K dollars (X= 50)?
1.22% i think. use the regression equation and sub in for x. =(1/(1+(EXP(6.3525-0.0392*(50))))) = probability
|
|
Using the cutoff of 10%, should this person be classified as who will accept the offer?
Yes
|
|
What are the Odds of accepting the loan offer for this person?
0.0124 --> p/ (1-P) = the odds
|
|
What is the odds ratio of income?
1.03998
|
|
Is logistic regression a model- free algorithm
NO
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.