A user is running a logistic regression with a tf-idf being ran on a text column. How can he ensure the parameters for this are tuned as well as possible?

914    Asked by NaveenYadav in Data Science , Asked on Nov 30, 2019
Answered by Naveen Yadav

Below is the code



There are many tuning parameters in machine learning algorithm but GridSearch is one of the best tuning parameters considered for classification of a model.

We can use grid search to find out the best C value for the model. Basically smaller C specifies stronger regularization.


Grid search is a brutal way of finding the optimal parameters because it train and test every possible combination. The best way is using Bayesian optimization which learns for past evaluation score and takes less computation time.


Your Answer

Interviews

Parent Categories