Repository navigation
Feature/refactor - #160
Merged
Merged
Feature/refactor#160
Conversation
# Conflicts: # docs/criteria/goodness-of-fit/normality/anderson_darling_normality_criterion.md # docs/criteria/goodness-of-fit/normality/bhs_normality_criterion.md # docs/criteria/goodness-of-fit/normality/bonett_seier_normality_criterion.md # docs/criteria/goodness-of-fit/normality/bontemps_meddahi1_normality_criterion.md # docs/criteria/goodness-of-fit/normality/bontemps_meddahi2_normality_criterion.md # docs/criteria/goodness-of-fit/normality/cabana_cabana1_normality_criterion.md # docs/criteria/goodness-of-fit/normality/cabana_cabana2_normality_criterion.md # docs/criteria/goodness-of-fit/normality/chen_shapiro_normality_criterion.md # docs/criteria/goodness-of-fit/normality/coin_normality_criterion.md # docs/criteria/goodness-of-fit/normality/cvm_normality_criterion.md # docs/criteria/goodness-of-fit/normality/dagostino_normality_criterion.md # docs/criteria/goodness-of-fit/normality/dagostino_pearson_normality_criterion.md # docs/criteria/goodness-of-fit/normality/desgagne_lafaye_normality_criterion.md # docs/criteria/goodness-of-fit/normality/doornik_hansen_normality_criterion.md # docs/criteria/goodness-of-fit/normality/epps_pulley_normality_criterion.md # docs/criteria/goodness-of-fit/normality/filliben_normality_criterion.md # docs/criteria/goodness-of-fit/normality/glen_leemis_barr_normality_criterion.md # docs/criteria/goodness-of-fit/normality/gmg_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_average_degree_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_clique_number_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_connected_components_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_edges_number_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_independence_number_normality_criterion.md # docs/criteria/goodness-of-fit/normality/graph_max_degree_normality_criterion.md # docs/criteria/goodness-of-fit/normality/hosking1_normality_criterion.md # docs/criteria/goodness-of-fit/normality/hosking2_normality_criterion.md # docs/criteria/goodness-of-fit/normality/hosking3_normality_criterion.md # docs/criteria/goodness-of-fit/normality/hosking4_normality_criterion.md # docs/criteria/goodness-of-fit/normality/jarque_bera_normality_criterion.md # docs/criteria/goodness-of-fit/normality/kolmogorov_smirnov_normality_criterion.md # docs/criteria/goodness-of-fit/normality/kurtosis_normality_criterion.md # docs/criteria/goodness-of-fit/normality/lilliefors_normality_criterion.md # docs/criteria/goodness-of-fit/normality/looney_gulledge_normality_criterion.md # docs/criteria/goodness-of-fit/normality/martinez_iglewicz_normality_criterion.md # docs/criteria/goodness-of-fit/normality/robust_jarque_bera_normality_criterion.md # docs/criteria/goodness-of-fit/normality/ryan_joiner_normality_criterion.md # docs/criteria/goodness-of-fit/normality/sf_normality_criterion.md # docs/criteria/goodness-of-fit/normality/shapiro_wilk_normality_criterion.md # docs/criteria/goodness-of-fit/normality/skew_normality_criterion.md # docs/criteria/goodness-of-fit/normality/spiegelhalter_normality_criterion.md # docs/criteria/goodness-of-fit/normality/swrg_normality_criterion.md # docs/criteria/goodness-of-fit/normality/zhang_q_normality_criterion.md # docs/criteria/goodness-of-fit/normality/zhang_q_star_normality_criterion.md # docs/criteria/goodness-of-fit/normality/zhang_wu_a_normality_criterion.md # docs/criteria/goodness-of-fit/normality/zhang_wu_c_normality_criterion.md # src/pysatl_criterion/hypothesis_testing/critical_values/loader/remote_loader.py # src/pysatl_criterion/persistence/models/base.py # src/pysatl_criterion/persistence/models/limit_distribution.py # src/pysatl_criterion/persistence/sqlalchemy/datastorage.py # tests/persistence/test_limit_distribution.py
quepum
reviewed
Nov 7, 2026
Comment on lines
+26
to
+27
| def __init__(self, parameters: dict[str, float] | ParameterValues | None): | ||
| self.parameter_values = parameters if isinstance(parameters, ParameterValues) else None |
Contributor
There was a problem hiding this comment.
Тут небольшое расхождение с докстрингом: он обещает, что можно передать обычный dict, но parameter_values заполняется только для ParameterValues. Из-за этого get_hypothesis_generator и supports_hypothesis потом такую гипотезу не принимают
Contributor
There was a problem hiding this comment.
GoodnessOfFitHypothesis теперь принимает только один аргумент
quepum
approved these changes
Nov 7, 2026
This was referenced Nov 23, 2026
f1i3g3
approved these changes
Nov 23, 2026
f1i3g3
left a comment
Contributor
There was a problem hiding this comment.
По остальному напишу отдельно
|
|
||
| - name: Run tests | ||
| run: poetry run pytest --random-order | ||
| if: matrix.python-version != '3.12' |
Comment on lines
+69
to
+75
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: test-reports-python-${{ matrix.python-version }} | ||
| path: | | ||
| ${{ runner.temp }}/pytest-results.xml | ||
| coverage.xml |
Comment on lines
+26
to
+32
| | Criteria | Hypothesis | Estimation | | ||
| |------------------------------------|-----------------------------------------------|-----------------------------------------------------------------------------| | ||
| | 13 EDF, 5 frequency, Neyman smooth | Both shapes fixed independently of the sample | None | | ||
| | Ebner–Liebenberg | Both shapes unknown; support fixed | Beta MLE on each call | | ||
| | Raschke | Both shapes unknown; support fixed | Beta MLE, normal quantile transform, normal location/scale MLE on each call | | ||
| | Riad–Abd El Mabood; Vasicek–KL | Both shapes unknown; support fixed | Beta MLE; same weight/window in each bootstrap replicate | | ||
|
|
Contributor
There was a problem hiding this comment.
Оно автоматически обновляется?
Contributor
There was a problem hiding this comment.
Добавить тест на custom loader?
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor the statistical testing library around explicit distribution parameters, reusable goodness-of-fit algorithms, and independent persistence contracts, while expanding statistical methods and validation coverage.
Quick changelog
What's new?
Distribution parameters now have stable identities, explicit parameterizations, and immutable validated values. Hypotheses distinguish unknown parameters from defaults, and statistics declare which parameter configurations they support. Distribution evaluation is exposed through a shared interface backed by SciPy.
Goodness-of-fit implementations reuse common empirical distribution function (EDF) and frequency algorithms through validated factories. The criterion catalog is expanded and revised across distribution families, with configurable binning strategies, parameter estimation updates, and dedicated calibration workflows for supported fitted-Beta and exponential tests.
Multiple testing moves into a dedicated package with validated inputs and structured results. It includes FWER and FDR adjustments such as Holm, Hochberg, Hommel, Benjamini–Hochberg, and two-stage procedures, alongside Simes global testing and Westfall–Young resampling methods.
Persistence now uses abstract stores, query models, and a unit of work, with SQLAlchemy handling database operations. Distribution updates and derived critical-value invalidation share a transaction, while loaders support transferring calibration data between stores.
The PR also adds independent numerical references, mathematical validation cases, persistence regressions, and statistical simulation checks. CI gains scheduled statistical validation and PostgreSQL/MySQL integration checks. Development tooling uses locked Poetry dependency groups, Ruff, and mypy.
Existing callers should review the updated parameter construction and multiple-testing APIs when migrating.