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

[FIX] tree: Fix min_samples_leaf check #2507

Merged
merged 1 commit into from
Jul 27, 2017
Merged

Conversation

lanzagar
Copy link
Contributor

Issue

Setting "Min. number of instances in leaves" (or min_samples_leaf in the code) to K actually enforced leaves to have K + 1 instances.

Description of changes

Change the check for invalid nodes from <= min_samples_leaf to strict < min_samples_leaf

Includes
  • Code changes
  • Tests
  • Documentation

@lanzagar lanzagar added this to the 3.4.5 milestone Jul 27, 2017
@lanzagar lanzagar changed the title tree: Fix min_samples_leaf check [FIX] tree: Fix min_samples_leaf check Jul 27, 2017
@codecov-io
Copy link

Codecov Report

Merging #2507 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2507      +/-   ##
==========================================
- Coverage    74.6%   74.53%   -0.07%     
==========================================
  Files         321      321              
  Lines       56167    56167              
==========================================
- Hits        41901    41864      -37     
- Misses      14266    14303      +37

@nikicc
Copy link
Contributor

nikicc commented Jul 27, 2017

@lanzagar I can't reproduce this:
screen shot 2017-07-27 at 17 42 02

@lanzagar
Copy link
Contributor Author

Try the zoo data and select one instance from each class. Then try to build a full tree.

@nikicc
Copy link
Contributor

nikicc commented Jul 27, 2017

Ahh, I see. I can reproduce now.

@nikicc nikicc merged commit 0e53f25 into biolab:master Jul 27, 2017
@lanzagar lanzagar deleted the treefix branch July 28, 2017 14:08
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.

3 participants