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] Continuing CMI work #94

Closed
wants to merge 42 commits into from
Closed

[ENH] Continuing CMI work #94

wants to merge 42 commits into from

Conversation

adam2392
Copy link
Collaborator

Towards #48

Changes proposed in this pull request:

  • implements KSG estimator using scipy KDTree
  • implements KSG estimator using an unsupervised tree, which is validated on a Jupyter notebook

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>
Signed-off-by: Adam Li <adam2392@gmail.com>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@PSSF23 this implements the conditional sampling strategy that can enable both i) bootstrapping and ii) permutation of sample indices conditioned on a conditional array that we want to use to only permute "nearest-neighbors"

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

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

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage: 45.45% and project coverage change: -10.78% ⚠️

Comparison is base (52bca43) 86.81% compared to head (b4c029b) 76.04%.
Report is 4 commits behind head on main.

❗ Current head b4c029b differs from pull request most recent head 5e50021. Consider uploading reports for the commit 5e50021 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #94       +/-   ##
===========================================
- Coverage   86.81%   76.04%   -10.78%     
===========================================
  Files          24       32        +8     
  Lines        1919     2442      +523     
===========================================
+ Hits         1666     1857      +191     
- Misses        253      585      +332     
Files Changed Coverage Δ
sktree/ensemble/_supervised_forest.py 100.00% <ø> (ø)
sktree/experimental/simulate.py 41.25% <8.33%> (-46.88%) ⬇️
sktree/experimental/mutual_info.py 33.33% <10.52%> (+12.82%) ⬆️
sktree/experimental/forest.py 15.38% <15.38%> (ø)
sktree/experimental/ksg.py 17.12% <17.12%> (ø)
sktree/neighbors.py 58.58% <45.90%> (-27.63%) ⬇️
sktree/tree/_classes.py 73.09% <50.00%> (-3.29%) ⬇️
sktree/ensemble/_honest_forest.py 91.35% <54.54%> (-5.79%) ⬇️
sktree/experimental/tests/test_ksg.py 60.00% <60.00%> (ø)
sktree/experimental/monte_carlo.py 69.11% <69.11%> (ø)
... and 10 more

☔ 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>
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>
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
Copy link
Collaborator Author

I want to add a bunch of unit tests after I ensure that the supervised/unsupervised forests estimate mutual information correctly.

Rn either there's an issue w/ the simulation, or there's an issue w/ the code.

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 mentioned this pull request Aug 16, 2023
5 tasks
@adam2392 adam2392 deleted the branch temp2 April 26, 2024 07:58
@adam2392 adam2392 closed this Apr 26, 2024
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