0

In this example penalty and regularization parameters for a logistic regression model are tested. I do not understand how to choose such parameters. For example why focus on (11,12) or (0,4)? How does this relate to the data we have?

Afia R. S.
  • 13
  • 6

1 Answers1

0

The purpose of Grid search is to find the generalized optimal parameter.

For example why focus on (l1,l2) or (0,4)?

The penalty parameter and regularization parameter affects the classification boundary. So to find the best classification the focus is made.

How does this relate to the data we have?

These are not directly related to the data we have. The idea is, for example we have to choose 'C' (regularization) parameter, which gives gives smallest difference between the training and validation set. So that the model should be simple as well as generalized on future data.

In general,to choose the range of parameters, it is not single time attempt based on the previous iterations the range can be widen according to the model performance.

Wickkiey
  • 4,446
  • 2
  • 39
  • 46
  • Working with a new dataset, I can choose (10,17) instead of (0,4). But if this choice does not depend on data that I have, I could spend a long time trying so many irrelevant values until I arrive at some value, which ultimately, may not even be the best one. What to do in this case? – Afia R. S. May 13 '20 at 04:30
  • To more about regularization parameter https://stackoverflow.com/questions/22851316/what-is-the-inverse-of-regularization-strength-in-logistic-regression-how-shoul – Wickkiey May 13 '20 at 04:45