Skip to main content
2 of 6
added 672 characters in body
Haitao Du
  • 37.3k
  • 25
  • 148
  • 244

Suppose you are trying to minimize the Loss via number of iterations. And current Loss 100.0. In this data set, there are no "irreducible errors" and you can minimize the Loss to 0.0 for your training data.

Now you have two ways to do it, the first way is "large learning rate" and few iterations. Suppose you can reduce loss by 10.0 in each iteration, then, in 10 iterations, you can reduce the loss to 0.0.

The second way would be "slow learning rate" but more iterations. Suppose you can reduce loss by 1.0 in each iteration and you need 100 iteration to have 0.0 loss on your training data.

Now think about this: are the two approaches equal? and if not which is better in real world?

My answer would be, they are not equal, you can think about the first approach as a "course level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power.

In real world, you do not want to make the loss on your training data into 0.0, this is because of over-fitting.

To prevent over-fitting, we can do different things, the first way would be restrict number of iterations, suppose we are using the first approach, we limit number of iterations to be 5. At the end, the loss for training data is 50.

On the other hand, we can also use second approach: if we set learning rate to be small say reduce 0.1 loss for each iteration, although we have large number of iterations say 500 iterations, we still have not minimized the loss to 0.0

This is why small learning rate is sort of equal to "more regularizations"

Here is an example of using different learning rate (please check xgboost.readthedocs.io/en/latest/parameter.html Parameters for Tree Booster, eta section and xgboost.readthedocs.io/en/latest/param_tuning.html Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting", and a large learning rate is "over-fitting".

enter image description here

PS. the sign of under-fitting is both training and testing set have large error, and the error curve for training and testing are close to each other. The sign of over-fitting is training set's error is very low and testing set is very high, two curves are far away from each other.

Haitao Du
  • 37.3k
  • 25
  • 148
  • 244