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

Remove alpha parameter of Magnitude-Shape plot and outlier detector. #424

Merged
merged 3 commits into from
Feb 23, 2022

Conversation

vnmabus
Copy link
Member

@vnmabus vnmabus commented Feb 21, 2022

  • This alpha parameter was only used in the asymptotic case, when the
    number of samples was too high.
  • Add instead a cutoff_factor parameter that multiplies the cutoff and
    can be used for an arbitrary number of samples, to consider more or less
    functions as outliers.

- This alpha parameter was only used in the asymptotic case, when the
number of samples was too high.
- Add instead a cutoff_factor parameter that multiplies the cutoff and
can be used for an arbitrary number of samples, to consider more or less
functions as outliers.
@@ -445,7 +443,7 @@ def _parameters_asymptotic(
# Calculation of the cutoff value and scaling factor to identify
# outliers.
scaling = estimated_c * dfd / estimated_m / dfn
cutoff_value = scipy.stats.f.ppf(self.alpha, dfn, dfd, loc=0, scale=1)
cutoff_value = scipy.stats.f.ppf(0.993, dfn, dfd, loc=0, scale=1)

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
WPS432 Found magic number: 0.993

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #424 (c626fce) into develop (85046fc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #424   +/-   ##
========================================
  Coverage    80.24%   80.24%           
========================================
  Files           92       92           
  Lines         7229     7229           
========================================
  Hits          5801     5801           
  Misses        1428     1428           
Impacted Files Coverage Δ
.../exploratory/outliers/_directional_outlyingness.py 91.53% <100.00%> (ø)
...exploratory/visualization/_magnitude_shape_plot.py 68.31% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85046fc...c626fce. Read the comment docs.

@vnmabus vnmabus merged commit 34c7f92 into develop Feb 23, 2022
@vnmabus vnmabus deleted the msplot_cutoff_multiplier branch June 3, 2022 18:47
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.

1 participant