Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Support for multi-parameter loss functions in derivative aggregation and finding best splits #993

Merged
merged 14 commits into from
Feb 17, 2020

Conversation

tveasey
Copy link
Contributor

@tveasey tveasey commented Feb 11, 2020

This extends computing aggregate derivatives and solving for the highest quadratic gain split to support multi-parameter loss functions.

I experimented with various implementations. This version, which minimises the number of allocations by using memory mapped classes, proved to be much the most efficient.

This is the next step towards #982.

Copy link
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.

Looks good altogether. I added a few minor comments wrt. understandability.

include/maths/CBoostedTreeLeafNodeStatistics.h Outdated Show resolved Hide resolved
include/maths/CBoostedTreeLeafNodeStatistics.h Outdated Show resolved Hide resolved
lib/maths/CBoostedTreeLeafNodeStatistics.cc Outdated Show resolved Hide resolved
lib/maths/CBoostedTreeLeafNodeStatistics.cc Outdated Show resolved Hide resolved
lib/maths/CBoostedTreeLeafNodeStatistics.cc Show resolved Hide resolved
Comment on lines +54 to +55
// We wrap the writer in another lambda which we know takes advantage
// of std::function small size optimization to avoid heap allocations.
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea 👍

@tveasey
Copy link
Contributor Author

tveasey commented Feb 14, 2020

Thanks for the review @valeriy42. I've addressed all your feedback, can you take another look and let me know if you're happy?

Copy link
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. Good job 👍

@tveasey tveasey merged commit 2916819 into elastic:master Feb 17, 2020
@tveasey tveasey deleted the multiclass-4 branch February 17, 2020 09:43
tveasey added a commit to tveasey/ml-cpp-1 that referenced this pull request Feb 17, 2020
tveasey added a commit that referenced this pull request Feb 17, 2020
@tveasey tveasey mentioned this pull request Feb 17, 2020
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