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

Inconsistent naming #1298

Open
hannahbus opened this issue Apr 10, 2024 · 1 comment · May be fixed by #1310
Open

Inconsistent naming #1298

hannahbus opened this issue Apr 10, 2024 · 1 comment · May be fixed by #1310

Comments

@hannahbus
Copy link

Many thanks for a great package.

I've noticed a small inconsistency concerning random forests: the key in foo.best_config() is max_leaves, which differs from sklearn's max_leaf_nodes.

Programmer-RD-AI added a commit to Programmer-RD-AI/FLAML that referenced this issue May 28, 2024
This commit addresses the naming inconsistency between the `max_leaves` and `max_leaf_nodes` parameters as highlighted in issue microsoft#1298. To ensure backward compatibility and reduce potential confusion, the code now checks for both `max_leaves` and `max_leaf_nodes` in the parameter list.

If `max_leaves` is provided, it is translated to `max_leaf_nodes` internally. This approach maintains compatibility with older codebases while aligning with the `scikit-learn` naming convention.

- If `max_leaf_nodes` is present, it will take precedence.
- If only `max_leaves` is present, its value will be assigned to `max_leaf_nodes`, and `max_leaves` will be removed from the parameters.
- Ensured that all references in documentation and example codes are updated to reflect this change.

This fix promotes consistency across the user interface while preserving functionality and ensuring existing scripts do not break.
@Programmer-RD-AI
Copy link

I have created an PR #1310 to fix the issue mentioned...

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 a pull request may close this issue.

2 participants