Book My Show Interview Question | Overfitting

Question

Overfitting is a common mistake that can happen in any data model. But the real task is how will you ensure that you are not Overfitting with a model?

(Hint- Don’t hesitate to explain various methods to prevent overfitting)

in progress 0
Dhruv2301 55 years 1 Answer 755 views Great Grand Master 0

Answer ( 1 )

  1. To prevent overfitting we can use L1 or L2 regularization, dropout and early stopping
    L1 regularization adds a penalty to minimize the absolute value of wights while L2 regularization adds penalty ti minimize the square of weights.
    If we are using a neural network to train, we can use dropout where certain number of neurons will be deactivated while training the model.
    We can also use early stopping where the training of the model is stopped after a certain point so that our model does not become more complex and it can generalize the test data.
    We can also reduce the complexity of the model by using less hidden layers, less number of neurons in the hidden layers, using simple model like linear regression instead of random forest so as to prevent overfitting

Leave an answer

Browse
Browse