Please visit, subscribe and share 10 Minutes Lectures in Computer Science
Showing posts with label Machine Learning Quiz. Show all posts
Showing posts with label Machine Learning Quiz. Show all posts

# Multiple choices questions in Machine learning. Interview questions on machine learning, quiz questions for data scientist answers explained, what is the cost function of logistic regression? Why the cost function used in linear regression cannot be used in logistic regression? Why the cost function of logistic regression is convex?

## Machine Learning MCQ - Cost function of logistic regression is convex

1. Which of the following statements about logistic regression are correct?

a) Logistic regression uses the squared error as the loss function

b) Logistic regression assumes that each class’s points are generated from a Gaussian distribution

c) The cost function of logistic regression is concave

d) The cost function of logistic regression is convex

Answer: (d) The cost function of logistic regression is convex

### Can we use the same cost function used in linear regression for logistic regression?

If we use the cost function of linear regression (Mean Squared Error) in logistic regression, we end up with a non-convex function with many local minimums. In this case, it is very difficult to find the global minimum. This strange outcome is due to the fact that in logistic regression we have the sigmoid function around, which is non-linear (i.e. not a line).

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

# Multiple choices questions in Machine learning. Interview questions on machine learning, quiz questions for data scientist answers explained, How to fix the problem of overfitting in neural network? How does regularization prevent overfitting? How does early stopping prevent overfitting? How does "decrease in model complexity" prevent overfitting? List various methods to fix overfitting in neural network.

## Machine Learning MCQ - List of various methods to fix overfitting problem in neural network

1. Suppose you have a neural network that is overfitting to the training data. Which of the following can fix the situation?

a) Regularization

b) Decrease model complexity

c) Train less/early stopping

d) All of the above

Answer: (d) All of the above

Overfitting happens when your model is too complicated to generalize for new data. When your model fits your training data perfectly, it is unlikely to fit new data (test data) well.

### How does regularization help in fixing the overfitting problem?

Regularization helps to choose preferred model complexity, so that model is better at predicting. Regularization is nothing but adding a penalty term to the objective function and control the model complexity using that penalty term. Regularization parameter (lambda) penalizes all the parameters except intercept so that model generalizes the data and won’t overfit.

### How does “decreasing the model complexity” help in overcoming overfitting problem?

A model with a high degree of complexity may be able to capture more variations in the data, but it will also be more difficult to train and may be more prone to overfitting. On the other hand, a model with a low degree of complexity may be easier to train but may not be able to capture all the relevant information in the data. [Refer here for more]

### How does “early stopping” prevent overfitting?

Early stopping is used to stop overfitting on training data. When a model is too eagerly learning noise, the validation loss may start to increase during training. To prevent this, we can simply stop the training whenever it seems the validation loss isn't decreasing anymore. Once we detect that the validation loss is starting to rise again, we can reset the weights back to where the minimum occurred. This ensures that the model won't continue to learn noise and overfit the data. [Refer here for more]

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

## 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...

data recovery