5 Commits

Author SHA1 Message Date
346d85c4f7 feat(distributions): add logweibull, ricegamma, and logricegamma
Add three new continuous random variables for log-domain and
linear-domain clutter modeling with compound Gamma-Rice structure.

Fix numerical stability of k_dist._logpdf and logk._log_kve via a
three-regime log(kve) asymptotic (direct / large-z Hankel / large-order
Gamma); replace quad-based k_dist._cdf with Gauss-Laguerre quadrature.

Fix fitter: use np.asarray instead of np.abs in fit(), pass fit_params
to goodness_of_fit so the observed-data statistic reuses fitted params.
Skip non-finite quantiles in QQ plots. Add plot_qq_plots_sns(); rename
histogram_with_fits_seaborn() to histogram_with_fits_sns(). Add unit
tests for logweibull and logricegamma.
2026-05-07 11:55:33 -03:00
c59bc55fe5 feat(distributions): add logk distribution and k_dist compound sampler
Introduce logk_gen (Y = ln X where X ~ K) with analytically derived
mean/variance via the CGF, numerically stable logpdf using an asymptotic
Bessel expansion for large arguments, CDF delegation to k_dist, and a
compound-gamma rvs sampler.

Add _rvs to k_dist via the same compound-gamma algorithm and extend
TestKDistPdf with stats and rvs coverage. Add a full TestLogK suite
covering pdf normalization, change-of-variable identity, CDF consistency,
analytical moment checks, and rvs moment checks.

Module-level docstring added to distributions.py
2026-04-27 17:19:51 -03:00
e780bb956e feat(distributions): add lograyleigh and logrice distributions
Add Log-Rayleigh and Log-Rice continuous distributions as
scipy rv_continuous subclasses with PDF, CDF, SF, PPF, ISF,
moments, entropy, and RVS methods.

Log-Rice reduces to Log-Rayleigh when nu=0. Both are derived
via the change-of-variable Y = ln X on their respective parent
distributions. Includes unit tests verifying numerical
correctness and the change-of-variable identity.
2026-04-27 11:11:32 -03:00
9a3f5959cd feat(distributions): add lognakagami, loggamma, and kl_statistic
Implement two new scipy-compatible distributions : Log-Nakagami
(lognakagami) and Log-Gamma (loggamma_dist), with complete
logpdf/cdf/ppf/stats/entropy/rvs methods derived from the
change-of-variable Y = ln(X).

Add kl_statistic, a KDE-based KL-divergence goodness-of-fit callable
compatible with the Fitter class. Extend k_gen with _stats (improving speed), _cdf, and
a fit guard, and switch kv → kve to improve numerical stability at large arguments.

Add unit tests for all three additions covering normalization,
monotonicity, ppf inversion, moment formulas, and Fitter integration.
2026-04-26 23:17:22 -03:00
d07590e73d ADD:
ruff for code formatting

BIC statistic AND BIC test implemented

test_distributions.py for test new created dists with pytest

REFACTOR:
k_gen pdf changed from 2 params to generalized
2026-04-16 11:52:44 -03:00