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

Unexpected number of leaves by computing get_leaves() #402

Closed
DylanWangWQF opened this issue Jul 19, 2024 · 1 comment
Closed

Unexpected number of leaves by computing get_leaves() #402

DylanWangWQF opened this issue Jul 19, 2024 · 1 comment

Comments

@DylanWangWQF
Copy link

model = Model(MODEL_ID, api=BigML(username=USERNAME, api_key=BB_KEY))
leaves = get_leaves(model)
print(len(leaves))
Output: 428 leaves

428 leaves are obviously incorrect, as shown in the model figure below.
The error is probably comes from this line

leaves += get_tree_leaves(child, fields,

Screenshot 2024-07-19 at 16 43 43

@mmerce
Copy link
Member

mmerce commented Oct 7, 2024

Hi @DylanWangWQF.
This was indeed a mistake that has been fixed in #404. Thanks for the heads up!

@mmerce mmerce closed this as completed Oct 7, 2024
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

No branches or pull requests

2 participants