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] Getting pvalue computation ready #222

Merged
merged 8 commits into from
Feb 21, 2024
Merged

[ENH] Getting pvalue computation ready #222

merged 8 commits into from
Feb 21, 2024

Conversation

adam2392
Copy link
Collaborator

Changes proposed in this pull request:

  • finalizes API for estimating pvalue using Coleman, or permutation forest approach
  • adds parallelization to the permutation forest sampling in the Coleman approach

Suggested # of trees is >=6_000. Suggested number of permutations in the Coleman approach is 10_000 or greater.

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.

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

@sampan501 sampan501 left a comment

Choose a reason for hiding this comment

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

This is basically just Coleman + new bootstrapping approach right?

@adam2392
Copy link
Collaborator Author

Yeah with some flexibility in the API

@sampan501 sampan501 self-requested a review February 20, 2024 16:55
@sampan501
Copy link
Member

Sweet, I'll merge when CIs are green

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

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

Comparison is base (d46e40b) 88.48% compared to head (5728550) 89.68%.

Files Patch % Lines
sktree/stats/forestht.py 92.30% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
+ Coverage   88.48%   89.68%   +1.19%     
==========================================
  Files          54       54              
  Lines        4891     4963      +72     
==========================================
+ Hits         4328     4451     +123     
+ Misses        563      512      -51     

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

@sampan501
Copy link
Member

@adam2392 I think the only thing missing is coverage. I don't believe there are any unit tests for this code

@adam2392
Copy link
Collaborator Author

@adam2392 I think the only thing missing is coverage. I don't believe there are any unit tests for this code

Will add

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

Lmk wdyt @sampan501

Thru testing, I noticed that the permutation forest is different in how it computes the pvalue. It needs to check opposite directionality, since the null is slightly different I think. (so i.e. a bug), but lmk if you spot an issue

Copy link
Member

@sampan501 sampan501 left a comment

Choose a reason for hiding this comment

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

Looks good except for some failed unit tests

Signed-off-by: Adam Li <adam2392@gmail.com>
@adam2392 adam2392 enabled auto-merge (squash) February 21, 2024 15:38
@adam2392 adam2392 merged commit 95e2597 into main Feb 21, 2024
30 checks passed
@sampan501 sampan501 deleted the coleman branch February 21, 2024 15:44
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.

2 participants