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

improve the efficiency of tree leaf contribution calculation #9

Merged
merged 1 commit into from May 15, 2018

Conversation

SauceCat
Copy link
Contributor

The original code calculates the tree-level contribution vector for each instance. Provided each instance would definitely fall down to one of the leaf nodes, this process can be more efficient for the large dataset with some small modification:

  1. Calculate the contribution vector for each unique tree leaf nodes and store the result into a dictionary, whose keys are leaf nodes and each key refers to the contribution vector of the leaf node.
  2. Assign the contribution vector to each instance regarding which leaf node it is assigned. (Avoid the calculation for each instance)

@andosa andosa merged commit a52a6d7 into andosa:master May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants