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

[ENH] A modular approach to constructing forests that have permuted covariates #211

Merged
merged 24 commits into from
Feb 2, 2024

Conversation

adam2392
Copy link
Collaborator

@adam2392 adam2392 commented Jan 31, 2024

This may eventually replace FeatureImportance* if we need it to.

Changes proposed in this pull request:

  • We separate the training of a permuted forest and the final computation of a pvalue
  • I will also enable the permutation of covariates within Cython if the power computation experiment determines bootstrapping is better.
  • Adds oob_samples_ to any forest that is fit with bootstrap on

The forests should be classes without too much logic addition and the pvalue computation logic can be wrapped into a function.

Before submitting

  • I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

  • All GitHub Actions jobs for my pull request have passed.

adam2392 and others added 8 commits January 31, 2024 16:35
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (aa655d6) 88.29% compared to head (39f3db7) 88.45%.

❗ Current head 39f3db7 differs from pull request most recent head a9192f9. Consider uploading reports for the commit a9192f9 to get more accurate results

Files Patch % Lines
sktree/stats/forestht.py 26.31% 14 Missing ⚠️
sktree/ensemble/_extensions.py 96.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
+ Coverage   88.29%   88.45%   +0.16%     
==========================================
  Files          50       54       +4     
  Lines        4646     4825     +179     
==========================================
+ Hits         4102     4268     +166     
- Misses        544      557      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Copy link
Member

@PSSF23 PSSF23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if checks all pass.

Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
@adam2392 adam2392 merged commit 18c2f45 into main Feb 2, 2024
28 checks passed
@adam2392 adam2392 deleted the permpvalue branch February 2, 2024 22:57
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