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

Apply DecisionTree op with Assignment #1137

Merged
merged 1 commit into from
Mar 19, 2022

Conversation

varunagrawal
Copy link
Collaborator

This PR adds a new variant of the DecisionTree::apply method where the function being passed in takes both the leaf value and the assignment as input.
This allows the function to use closures to index into other trees as an example, but is more general that that since you can choose what to do with the assignment. I have added a test case which demonstrates this via a simple pruning example.

Best part is that this is a fully functional operation (aka functional style, lambdas, closures, all the good stuff).

@varunagrawal varunagrawal added the feature New proposed feature label Mar 19, 2022
@varunagrawal varunagrawal self-assigned this Mar 19, 2022
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Cool

@varunagrawal varunagrawal merged commit e3d68e7 into develop Mar 19, 2022
@varunagrawal varunagrawal deleted the decisiontree/apply-with-assignment branch March 19, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New proposed feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants