Decision Tree MCQs

 

Decision Tree MCQs

1.     Decision Trees can be used for

A.    Classification Tasks

B.    Regression Tasks

C.    Multi-output tasks

D.    All of the above

Ans: D

 

2.     The iris dataset has

A.    5 features and 3 classes

B.    4 features and 3 classes

C.    2 features and 3 classes

D.    4 features and 2 classes

Ans: B

 

3.     A node’s value attribute tells you how many training instances of each class this node applies to

Top of Form

  1.  True
  2.  False

Ans: A

4.     A node’s gini attribute measures

Top of Form

  1.  The number of training instances in the node
  2.  The ratio of training instances in the node
  3.  Its impurity
  4. None of these

Ans: C

5.     If all the training instances of a node belong to the same class then the value of the node's Gini attribute will be

  1.  1
  2.  0
  3.  Any integer between 0 and 1
  4.  A negative value

Ans: B

6.     A Gini coefficient of 1 expresses maximal inequality among the training samples

Top of Form

A.      True

B.      False

Ans: A

7.     Gini index for a node is found by subtracting the sum of the square of ratio of each classes in a node from 1

Top of Form

  1.  True
  2.  False

Ans: A

8.     A white box model’s decision are

  1. Usually hard to explain in simple terms
  2. Fairly intuitive and easy to interpret
  3. Both
  4. None

Ans: B

9.     A black box model’s decision are

  1.  Usually hard to explain in simple terms
  2.  Fairly intuitive and easy to interpret
  3. Both
  4. None

Ans: A

10.  Random Forests and Neural networks are examples of

Top of Form

  1.  White Box Model
  2.  Black Box Model
  3. Both
  4. None

Ans: B

11.  Decision Trees are examples of

  1. White Box Model
  2. Black Box Model
  3. Both
  4. None

Ans: A

12.  A decision tree estimates the probability that an instance belongs to a particular class k by finding the corresponding leaf node for the instance and then returning the ratio of training instances of class k

Top of Form

  1.  True
  2.  False

Ans: A

13.  The Decision Tree classifier predicts the class which has the highest probability

Top of Form

  1.  True
  2.  False

Ans: A

14.  If the output of predict_proba is array([[ 0. , 0.90740741, 0.09259259]]) then the predicted class will be

  1. Class 0
  2. Class 1
  3. Class 2
  4. None

Ans: B

15.  The CART algorithm splits the training set in two subsets

  1. Using all the features and a threshold tk
  2. Using a single feature k and a threshold tk
  3. Using half of the features and a threshold k
  4. None

Ans: B

16.  How does the CART algorithm chooses the feature k and the threshold tk for splitting ?

  1.  It randomly chooses a feature k
  2.  It chooses the mean of the values of the feature k as threshold
  3.  It chooses the feature k and threshold tk which produces the purest subsets
  4.  It chooses the feature k and threshold tk such that the gini index value of the subsets is 0

Ans: C

17.  The cost function for finding the value of feature k and threshold tk takes into consideration

  1.  The Gini index values of the subsets
  2.  The number of instances in the subsets
  3.  The total number of instances in the node that is being split
  4.  All of these

Ans: D

18.  Once the CART algorithm has successfully split the training set in two

Top of Form

  1.  It stops splitting further
  2.  It splits the subsets using the same logic, then the sub- subsets and so on, recursively
  3.  It splits only the right subset
  4.  It splits only the left subset

Ans: B

19.  The CART algorithm stops recursion once it reaches the maximum depth (defined by the max_depth hyperparameter), or if it cannot find a split that will reduce impurity

Top of Form

  1.  True
  2.  False

Ans: A

20.  Which of the following are correct for the CART algorithm

  1.  It is a greedy algorithm
  2.  It greedily searches for an optimum split at each level
  3.  It does not check whether or not the split will lead to the lowest possible impurity several levels down
  4.  All of the above are correct

Ans: D

21.  While making a prediction in Decision Tree, each node only requires checking the value of one feature

  1.  True
  2.  False

Ans: A

22.  If the total number of training instances is m then the overall complexity of prediction of decision trees is

Top of Form

  1.  O(m)
  2.  O(mlog(m))
  3.  O(log(m))
  4.  O(m/log(m))

Ans: C

23.  The training algorithm of decision tree compares all features (or less if max_features is set) on all samples at each node

Top of Form

  1.  True
  2.  False

Ans: A

24.  If the number of features in n and number of training set instances is m then the complexity of training of a decision tree is

  1. O(nmlog(m))
  2. O(mlog(n))
  3. O(nlog(m))
  4. O(mn)

Ans: A

25.  Gini impurity is slightly faster to compute in comparison to entropy

Top of Form

  •  True
  •  False

Ans: A

26.  Models like Decision Tree models are often called nonparametric model because

Top of Form

  •  They do not have any parameters
  •  The number of parameters is not determined prior to training
  •  They have lesser parameters as compared to other models
  •  They are easy to interpret and understand

Ans: B

27.  Which of the following is not a regularization parameter for decision tree classifier

Top of Form

  1.  max_depth
  2.  min_samples_leaf
  3.  max_features
  4.  min_leaf_nodes

Ans: D

28.  Increasing min_* hyperparameters or reducing max_* hyperparameters will regularize the model

Top of Form

  1.  True
  2.  False

Ans: A

29.  For regression tasks the CART algorithm tries to split the training set in a way that minimizes the MSE

Top of Form

  1.  True
  2.  False

Ans: A

30.  All the splits made by a Decision Tree are

  1.  Never perpendicular to an axis
  2.  Always perpendicular to an axis
  3.  Always at an acute angle to an axis
  4.  Always at an obtuse angle to an axis

Ans: BBottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Bottom of Form

Machine Learning - Support Vector Machines (SVM) - MCQs

 Machine Learning - Support Vector Machines (SVM) - MCQs


1. A Support Vector Machine can be used for

A.    Performing linear or nonlinear classification

B.    Performing regression

C.    For outlier detection

D.    All of the above

Ans: D

2. The decision boundaries in a Support Vector machine is fully determined (or “supported”) by the instances located on the edge of the street?

Top of Form

  1. True
  2. False

Ans: A

3. Support Vector Machines are not sensitive to feature scaling

  1. True
  2. False

Ans: B

4. If we strictly impose that all instances be off the street and on the right side, this is called

  1.  Soft margin classification
  2.  Hard margin classification
  3.  Strict margin classification
  4.  Loose margin classification

Ans: B

5. The main issues with hard margin classification are

  1. It only works if the data is linearly separable
  2. It is quite sensitive to outliers
  3. It is impossible to find a margin if the data is not linearly separable
  4. All of the above

Ans: D

6. The objectives of Soft Margin Classification are to find a good balance between

  1. Keeping the street as large as possible
  2. Limiting the margin violations
  3. Both of the above
  4. None of the above

Ans: C

7. The balance between keeping the street as large as possible and limiting margin violations is controlled by this hyperparameter

  1. Tol
  2. Loss
  3. Penalty
  4. C

Ans: D

8. A smaller C value leads to a wider street but more margin violations.

Top of Form

  1. True
  2. False

Ans: A

9. If your SVM model is overfitting, you can try regularizing it by reducing the value of

Top of Form

  1. Tol
  2. C hyperparameter
  3. intercept_scaling
  4. None of the above

Ans: B

10. Problems with adding polynomial features are

  1. At a low polynomial degree, it cannot deal with very complex datasets
  2. With a high polynomial degree, it creates a huge number of features
  3. Adding high polynomial degree makes the model too slow
  4. All of the above

Ans: D

11. The hyperparameter coef0 of SVC controls how much the model is influenced by high-degree polynomials versus low-degree polynomials

Top of Form

A.     True

B.     False

Ans: A

12. A similarity function like Gaussian Radial Basis Function is used to

A.    Measure how many features are related to each other

B.    Find the most important features

C.    Find the relationship between different features

D.    Measure how much each instance resembles a particular landmark

Ans: D

13. When adding features with similarity function, and creating a landmark at the location of each and every instance in the training set, a training set with m instances and n features gets transformed to (assuming you drop the original features)

  1. A training set with n instances and n features
  2. A training set with m/2 instances and n/2 features
  3. A training set with m instances and m features
  4. A training set with m instances and n features

Ans: C

14. When using SVMs we can apply an almost miraculous mathematical technique for adding polynomial features and similarity features called the

Top of Form

  1. Kernel trick
  2. Shell trick
  3. Mapping and Reducing
  4. None of the above

Ans: A

15. Which is right for the gamma parameter of SVC which acts as a regularization hyperparameter

  1. If model is overfitting, increase it, if it is underfitting, reduce it
  2. If model is overfitting, reduce it, if it is underfitting, increase it
  3. If model is overfitting, keep it same
  4. If it is underfitting, keep it same

Ans: B

16. LinearSVC is much faster than SVC(kernel="linear"))

  1. True
  2. False

Ans: A

17. In SVM regression the model tries to

  1. Fit the largest possible street between two classes while limiting margin violations
  2. Fit as many instances as possible on the street while limiting margin violations
  3. Both
  4. None of the above

Ans: B

18. The SVR class is the regression equivalent of the SVC class, and the LinearSVR class is the regression equivalent of the LinearSVC class

  1. True
  2. False

Ans: ABottom of Form

 

Bottom of Form

 

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

Bottom of Form

 

 

Bottom of Form

 


About Machine Learning

Welcome! Your Hub for AI, Machine Learning, and Emerging Technologies In today’s rapidly evolving tech landscape, staying updated with the ...