Ports the "hard" histogram variant of HistNetQ (from https://github.com/pglez84/histnetq) into quapy/method/_histnet.py, dropping that repo's quantificationlib-backed bag generators in favor of QuaPy's own sampling protocols (UPP by default). Implemented as a BaseQuantifier, alongside QuaNet, since it trains end-to-end on samples of known prevalence rather than following the classify-then-aggregate pattern. - HistNetQ.fit(X, y): resamples training/validation bags from a LabelledCollection via a configurable protocol (UPP by default; fresh random bags each training epoch, a fixed reproducible sequence for validation). - HistNetQ.fit_from_samples(protocol, val_protocol=None, mix_bags=False): trains directly from a protocol that already yields bags (e.g. LeQua's SamplesFromDir), with an optional mixer to synthesize extra intermediate-prevalence bags from the given ones. - Aliased in meta.py (torch-optional, mirroring the existing QuaNet guard) and registered in META_METHODS. - Adds test_histnetq covering both entry points on binary and multiclass synthetic data. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| stan | ||
| __init__.py | ||
| _bayesian.py | ||
| _energy.py | ||
| _helper.py | ||
| _histnet.py | ||
| _kdey.py | ||
| _neural.py | ||
| _threshold_optim.py | ||
| aggregative.py | ||
| base.py | ||
| composable.py | ||
| confidence.py | ||
| meta.py | ||
| non_aggregative.py | ||