htjb / margarine

Code to replicate posterior probability distributions with bijectors/KDEs and perform marginal KL/bayesian dimensionality calculations.
MIT License
13 stars 8 forks source link

Reducing max cluster size and adding a catch for small clusters #24

Closed htjb closed 1 year ago

htjb commented 1 year ago

Solving #23 and #21.

Reduced the maximum cluster number to 20 and added a warning if cluster_number = 20 suggesting that the user should explore their data a bit more externally to margarine.

Added a catch that lowers the cluster number if any of the clusters are smaller than 100 samples. Prevents errors when we try to train/test split clusters with fewer than 5 samples and ensures that the test size for each cluster is somewhat reasonable (minimum 20 samples).

htjb commented 1 year ago

Need a test for small clusters!

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 94.44% and project coverage change: +0.16 :tada:

Comparison is base (35243df) 88.76% compared to head (46fb86b) 88.93%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #24 +/- ## ========================================== + Coverage 88.76% 88.93% +0.16% ========================================== Files 4 4 Lines 454 470 +16 ========================================== + Hits 403 418 +15 - Misses 51 52 +1 ``` | [Impacted Files](https://app.codecov.io/gh/htjb/margarine/pull/24?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Harry+Bevins) | Coverage Δ | | |---|---|---| | [margarine/maf.py](https://app.codecov.io/gh/htjb/margarine/pull/24?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Harry+Bevins#diff-bWFyZ2FyaW5lL21hZi5weQ==) | `95.95% <94.44%> (-0.14%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.