Sunday, January 31, 2021

Machine Learning Multiple Choice Questions and Answers 25

Top 3 Machine Learning Quiz Questions with Answers explanation, Interview questions on machine learning, quiz questions for data scientist answers explained, machine learning exam questions, question bank in machine learning, overfitting in non-parametric machine learning algorithms, decision tree, linear regression


Machine learning Quiz Questions - Set 25

 

1. Which of the following is a disadvantage of non-parametric machine learning algorithms?

a) Capable of fitting a large number of functional forms (Flexibility)

b) Very fast to learn (Speed)

c) More of a risk to overfit the training data (Overfitting)

d) They do not require much training data

Answer: (c) More of a risk to overfit the training data

Overfitting happens when a model learns the detail and noise in the training data to the extent that it negatively impacts the performance of the model on new data. Overfitting is more likely with nonparametric and nonlinear models that have more flexibility when learning a target function. For example, decision trees are a nonparametric machine learning algorithm that is very flexible and is subject to overfitting training data.

[For more, please refer Overfitting and Underfitting With Machine Learning Algorithms]

 

2. A decision tree has low training error and a large test error. What is the possible problem?

a) Decision tree is too shallow

b) Learning rate too high

c) There is too much training data

d) Decision tree is overfitting

Answer: (d) Decision tree is overfitting

Overfitting causes low training error. Overfitting means that the model predicts the (training) data too well. It is too good to be true. If the new data point comes in, the prediction may be wrong.

Pruning can help in reducing the complexity of the final classifier, and hence improves predictive accuracy by the reduction of overfitting.

 

3. Suppose we have a regularized linear regression model. What is the effect of increasing λ on bias and variance?

a) Increases bias, increases variance

b) Increases bias, decreases variance

c) Decreases bias, increases variance

d) Decreases bias, decreases variance

Answer: (b) Increases bias, decreases variance

Increasing λ increases bias and decreases variance

Regularized regression

It is a type of regression where the coefficient estimates are constrained to zero. The magnitude (size) of coefficients, as well as the magnitude of the error term are penalized. Complex models are discouraged, primarily to avoid overfitting. In other words, this technique discourages learning a more complex or flexible model, so as to avoid the risk of overfitting. [For more refer here – regularized regression, ] and [Refer here - regularization ]

Type of regularized regression

Ridge regression (L2 regularization)

Lasso regression (L1 regularization)

 

**********************

Related links:

List the type of regularized regression

Multiple choice quiz questions in machine learning

What is regularized linear regression 

low training error vs large test error in decision tree

What is the disadvantage of non-parametric machine learning algorithms

Monday, January 11, 2021

Machine Learning TRUE or FALSE Questions with Answers 19

Machine learning exam questions, ML solved quiz questions, Machine Learning TRUE or FALSE questions, TOP 5 machine learning quiz questions with answers

Machine Learning TRUE / FALSE Questions - SET 19

1. Solving a non linear separation problem with a hard margin Kernelized SVM (Gaussian RBF Kernel) might lead to overfitting.

(a) TRUE                                                   (b) FALSE

Answer: TRUE

When there are outliers, hard margin SVM + Gaussian-RBF kernel result in an unnecessarily complicated decision boundary that overfits the training noise.

In SVM, to avoid overfitting, we choose a Soft Margin, instead of a Hard margin, i.e. we let some data points enter our margin intentionally so that our classifier don’t overfit on our training sample.

SVM is less prone to overfitting than other methods.

[Refer here for more]

 

2. Random forests can be used to classify infinite dimensional data.

(a) TRUE                                                   (b) FALSE

Answer: TRUE

Random forest is great with high dimensional data since we are working with subsets of data. With Random Forests there’s almost no harm in keeping columns whose importance is not certain and no harm in adding more columns.

But, random forests do not have high performance when dealing with very-high-dimensional data

 

3. The training accuracy increases as the size of the tree grows (assuming no noise).

(a) TRUE                                                   (b) FALSE

Answer: TRUE

The training accuracy increases as the size of the tree grows until the tree fits all the training data.

A decision tree overfits the training data when its accuracy on the training data goes up but its accuracy on unseen data goes down.

 

4. Hierarchical clustering methods require a predefined number of clusters, much like k-means.

(a) TRUE                                                   (b) FALSE

Answer: FALSE

We do not need to predefine the number of clusters in hierarchical clustering like we do in k-means clustering. Hierarchical clustering considers each data point as individual cluster and groups similar objects into clusters.

 

5. Suppose that X1, X2, ..., Xm are categorical input attributes and Y is categorical output attribute. Suppose we plan to learn a decision tree without pruning, using the standard algorithm. The maximum depth of the decision tree must be less than m+1.

(a) TRUE                                                   (b) FALSE

Answer: TRUE

Because the attributes are categorical and can each be split only once.

 

*********************

Related links:

 

Decision tree

Overfitting in decision tree

Random forest

Support vector machine

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents