We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From the docstring I would expect min_weight_fraction_leaf to have a similar effect as min_samples_leaf, but it doesn't, as shown by the code below:
min_weight_fraction_leaf
min_samples_leaf
from sklearn.datasets import load_digits from sklearn.tree import DecisionTreeClassifier import numpy as np data = load_digits(10) features, labels = data.data, data.target tree = DecisionTreeClassifier(random_state=10, min_weight_fraction_leaf=0.2).fit(features, labels) tree.tree_.value.sum(axis=2).min()
1
There is leafs with single data points, but that's less than 0.2 * n_samples. @rhiever reported this. Ping @arjoly @glouppe @jmschrei
The text was updated successfully, but these errors were encountered:
seems related to #6945
Sorry, something went wrong.
indeed, thanks @nelson-liu.
No branches or pull requests
From the docstring I would expect
min_weight_fraction_leaf
to have a similar effect asmin_samples_leaf
, but it doesn't, as shown by the code below:There is leafs with single data points, but that's less than 0.2 * n_samples.
@rhiever reported this.
Ping @arjoly @glouppe @jmschrei
The text was updated successfully, but these errors were encountered: