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 median sampling error if only 1 distinct value #377

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

michael-nml
Copy link
Collaborator

@michael-nml michael-nml commented Apr 11, 2024

This commit addresses an exception that occurs during calculation of the median sampling error if the data containts only 1 distinct value.

Error being addressed:

The data appears to lie in a lower-dimensional subspace of the space in which it is expressed. This has resulted in a singular data covariance matrix, which cannot be treated using the algorithms implemented in gaussian_kde. Consider performing principle component analysis / dimensionality reduction and using gaussian_kde with the transformed data.

This commit addresses an exception that occurs during calculation of the
median sampling error if the data containts only 1 distinct value.

Error being addressed:
    The data appears to lie in a lower-dimensional subspace of the space
    in which it is expressed. This has resulted in a singular data
    covariance matrix, which cannot be treated using the algorithms
    implemented in `gaussian_kde`. Consider performing principle
    component analysis / dimensionality reduction and using
    `gaussian_kde` with the transformed data.
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 78.41%. Comparing base (7da83e7) to head (4816d95).

Files Patch % Lines
nannyml/sampling_error/summary_stats.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #377      +/-   ##
==========================================
- Coverage   78.44%   78.41%   -0.04%     
==========================================
  Files         110      110              
  Lines        8514     8520       +6     
  Branches     1514     1514              
==========================================
+ Hits         6679     6681       +2     
- Misses       1472     1476       +4     
  Partials      363      363              

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

@nnansters nnansters merged commit e98cab9 into main Apr 19, 2024
5 of 8 checks passed
@nnansters nnansters deleted the fix/median-sample-error branch April 19, 2024 21:18
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