Skip to main content
deleted 103 characters in body
Source Link
Haitao Du
  • 37.3k
  • 25
  • 148
  • 244

Suppose you are trying to minimize the Lossobjective function via number of iterations. And current Loss 100.0value is $100.0$. In thisgiven data set, there are no "irreducible errors" and you can minimize the Lossloss to 0.0$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.

  • 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 optimization literaturecontext and machine learning literaturecontext?

My answer would be, inIn optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0$0$ which will cause over-fitting. Now, you

We can think about the first approach as a "coarse level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power for more iterations.

As mentioned earlier, 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$50$. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converged, but we chose not to. In optimization, usually we explicitly add constraints or penalization terms to objective function, but usually not limit number of iterations.)

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

Here is an example of using different learning rate on an experimental data using (pleasexgboost. Please check follwoing two links to see what does eta or n_iterations mean.

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that forFor the same number of iterations, say 50$50$. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

PS. the signevidence 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.

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 optimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, you can think about the first approach as a "coarse level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power for more iterations.

As mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converged, but we chose not to.)

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.

Here is an example of using different learning rate (please check

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

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.

Suppose you are trying to minimize the objective function via number of iterations. And current value is $100.0$. In given 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 optimization context and machine learning context?

In optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to $0$ which will cause over-fitting.

We can think about the first approach as a "coarse level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power for more iterations.

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$. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converged, but we chose not to. In optimization, usually we explicitly add constraints or penalization terms to objective function, but usually not limit number of iterations.)

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

Here is an example of using different learning rate on an experimental data using xgboost. Please check follwoing two links to see what does eta or n_iterations mean.

XGBoost Control overfitting

For the same number of iterations, say $50$. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

PS. the evidence 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.

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 optimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, you can think about the first approach as a "course"coarse level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power for more iterations.

As mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not convergeconverged, but we chose not to.  )

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

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 optimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, 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 for more iterations.

As mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converge, but we chose not to.  )

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

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 optimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, you can think about the first approach as a "coarse level grid search", and second approach as a "fine level grid search". Second approach usually works better, but needs more computational power for more iterations.

As mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converged, but we chose not to.)

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

Bounty Ended with 50 reputation awarded by Antoine
added 517 characters in body
Source Link
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 worldoptimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, 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 for more iterations.

InAs mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converge, but we chose not to. )

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

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 optimization literature and machine learning literature?

My answer would be, in optimization literature, the two approaches are the same. As they both converge to optimal solution. On the other hand, in machine learning, they are not equal. Because in most cases we do not make the loss in training set to 0 which will cause over-fitting. Now, 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 for more iterations.

As mentioned earlier, 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. (BTW, this would be very strange from the optimization point of view, which means we can future improve our solution / it is not converge, but we chose not to. )

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

Parameters for Tree Booster

Parameters for Tree Booster, eta section and

XGBoost Control overfitting

Control over fitting section), you can see that for the same number of iterations, say 50. A small learning rate is "under-fitting" (or the model has "high bias"), and a large learning rate is "over-fitting" (or the model has "high variance").

Example of changing learning rate ETA in XGBoost model

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.

added 108 characters in body
Source Link
Haitao Du
  • 37.3k
  • 25
  • 148
  • 244
Loading
added 672 characters in body
Source Link
Haitao Du
  • 37.3k
  • 25
  • 148
  • 244
Loading
Source Link
Haitao Du
  • 37.3k
  • 25
  • 148
  • 244
Loading