Skip to content

feat: add RVS generators for LogLogistic, InverseGamma, Pareto, and Hyperbolic - #171

Open
faux66 wants to merge 1 commit into
mainfrom
feat/missing-rvs-generators
Open

faux66 wants to merge 1 commit into
mainfrom
feat/missing-rvs-generators

Conversation

@faux66

@faux66 faux66 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the remaining four continuous AbstractRVSGenerator implementations for distributions that already have descriptors and scipy backend bindings in pysatl-criterion:

  • LogLogisticGenerator (DistributionType.LOG_LOGISTIC, alpha, beta)
  • InverseGammaGenerator (DistributionType.INVERSE_GAMMA, alpha, beta)
  • ParetoGenerator (DistributionType.PARETO, shape, scale)
  • HyperbolicGenerator (DistributionType.HYPERBOLIC, alpha, beta, delta, mu)

Changes

  • Added sampling helpers in src/pysatl_criterion/core/distributions/continues/:
    • log_logistic.py (scipy.stats.fisk.rvs)
    • inverse_gamma.py (scipy.stats.invgamma.rvs)
    • pareto.py (scipy.stats.pareto.rvs)
    • hyperbolic.py (scipy.stats.genhyperbolic.rvs)
  • Added LogLogisticGenerator, InverseGammaGenerator, ParetoGenerator, and HyperbolicGenerator in src/pysatl_criterion/generator/generators.py with Descriptor.DEFAULT.parse(...) validation, random_state forwarding, and explicit abs(beta) < alpha validation in HyperbolicGenerator.
  • Updated tests/generator/test_generators.py and tests/test_public_api_coverage.py with metadata, np.random.Generator reproducibility, invalid-parameter validation for HyperbolicGenerator, and KS-test consistency checks (n=5000, p > 0.01) against descriptor.bind(...).cdf.

Verification

  • pytest tests/generator/test_generators.py tests/test_public_api_coverage.py — 92 passed
  • ruff check and ruff format --check on all 7 modified/added files — passed

@f1i3g3
f1i3g3 requested a review from alex98247 November 28, 2026 12:01
@f1i3g3 f1i3g3 added enhancement New feature or request python Pull requests that update python code 1.1.0 testing Pull requests that update tests code distribution labels Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.1.0 distribution enhancement New feature or request python Pull requests that update python code testing Pull requests that update tests code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants