Ports GMNet (from https://github.com/pglez84/gmnet) into quapy/method/_gmnet.py,
mirroring how HistNetQ was ported: dropping that repo's quantificationlib-backed
bag generators in favor of QuaPy's own sampling protocols, and adding geotorch
(now a 'neural' extra dependency) to keep the Gaussian layers' covariance matrices
positive-definite during training.
- GMNet represents each bag instance by its likelihood under one or more learned
mixtures of Gaussians ("GM branches"), mean-pools these representations over the
bag, and predicts prevalence from the result. Supports multiple stacked GM
branches with an optional CKA-regularization term encouraging their latent
representations to be dissimilar.
- Fixes two aspects of the original architecture that assumed a fixed, training-time
bag_size baked into the network (a reshape step, and forward-hook-based activation
capture for CKA): both are now computed from the actual input shape/plain
attributes at forward time, so the model also works on predict()'s arbitrary-sized
test samples, not just same-size bags.
- Factors the bag-based training loop shared by HistNetQ and GMNet (bag generation,
fit/fit_from_samples, early stopping, LR scheduling, checkpointing, predict) out of
_histnet.py into a new BagTrainedQuantifier base class in
quapy/method/_neural_bags.py; HistNetQ's public API and behavior are unchanged.
- Aliased in meta.py (torch/geotorch-optional, mirroring HistNetQ/QuaNet) and
registered in META_METHODS.
- Adds test_gmnet covering single-branch and multi-branch+CKA (via
fit_from_samples/mix_bags) variants.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same fix as master (63075e4): conf.py uses pydata_sphinx_theme and
sphinx_design, but the docs extra never listed them, so pip install
.[docs] couldn't build the docs.
setuptools 82 removed pkg_resources entirely, which httpstan still
imports at runtime; CI's prior `pip install --upgrade setuptools`
step grabs the latest, so an unpinned setuptools didn't help.