Skip to content

[ML] Add a constant to the prediction which minimises the unregularised loss for classification and regression#1192

Merged
tveasey merged 3 commits intoelastic:masterfrom
tveasey:centre-data-before-training
May 5, 2020
Merged

[ML] Add a constant to the prediction which minimises the unregularised loss for classification and regression#1192
tveasey merged 3 commits intoelastic:masterfrom
tveasey:centre-data-before-training

Conversation

@tveasey
Copy link
Copy Markdown
Contributor

@tveasey tveasey commented May 5, 2020

We add on a constant weight to "centre" the data. (Strictly speaking this isn't centring the data in the conventional sense, it is finding a single weight which when added to the ensemble prediction minimises the loss.)

Currently, we choose to minimise regularised loss with this weight, i.e. respecting the weight shrinkage. First, there is no need to do this, shrinkage is used to impose a "smoothness" bias, but a constant function is flat. Second, the subsequent trees spend effort updating the mean predictions to be unbiased and means there is an unfortunate interplay between the degree of smoothing we can use (since it will create bias in the unregularised loss) and the centre of the data.

Copy link
Copy Markdown
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A good idea of estimating a constant prior to fitting a non-linear function.

@tveasey tveasey merged commit 2d24c58 into elastic:master May 5, 2020
@tveasey tveasey deleted the centre-data-before-training branch May 5, 2020 16:31
tveasey added a commit to tveasey/ml-cpp-1 that referenced this pull request May 5, 2020
tveasey added a commit to tveasey/ml-cpp-1 that referenced this pull request May 5, 2020
tveasey added a commit that referenced this pull request May 5, 2020
…larised loss for classification and regression (#1194)

Backport #1192.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants