Commit Graph

597 Commits

Author SHA1 Message Date
Alejandro Moreo Fernandez ee803a339b silence pystan's repeated pkg_resources deprecation warning
stan.plugins.get_plugins() calls pkg_resources.iter_entry_points()
from several call sites during model building, each re-emitting
setuptools' deprecation notice since Python's default warning dedup
is keyed per call site, not per message. Not actionable upstream
noise, so filter it by message instead.
2026-07-17 17:43:41 +02:00
Alejandro Moreo Fernandez 125d4bd756 pin setuptools<82 in bayes extra
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.
2026-07-17 17:39:33 +02:00
Alejandro Moreo Fernandez 0965d99135 add setuptools to bayes extra
httpstan imports pkg_resources at runtime, which modern pip/venvs no
longer bootstrap by default, breaking the bayes extra in fresh CI envs.
2026-07-17 17:17:20 +02:00
Alejandro Moreo Fernandez 6e83bbef67 log the underlying ImportError when bayesian deps fail to import
Swallowing the exception made it impossible to tell which of
jax/numpyro/stan actually failed in CI.
2026-07-17 17:06:33 +02:00
Alejandro Moreo Fernandez 48a5240a6e import fix 2026-07-17 16:53:27 +02:00
Alejandro Moreo Fernandez 195552ef55 update docs 2026-07-17 16:45:12 +02:00
Alejandro Moreo 2cc2237165 EDy and EDx as separate methods with shared backbone functionals 2026-07-10 16:14:45 +02:00
Alejandro Moreo 8b0327f00a added EDx and improve doc 2026-07-07 15:46:45 +02:00
Alejandro Moreo 24a971304d improved evaluation manual 2026-07-06 17:45:08 +02:00
Alejandro Moreo 4bfa212459 adding EDy and improved manuals 2026-07-06 17:30:42 +02:00
Alejandro Moreo 574fc61032 improving doc manuals and added bonferroni parameter to interval construction 2026-07-06 12:11:24 +02:00
Alejandro Moreo Fernandez fd6373651e added methods to doc 2026-07-05 23:20:56 +02:00
Alejandro Moreo Fernandez c59ee76d9d added new changes to log 2026-07-04 19:20:21 +02:00
Alejandro Moreo Fernandez ed02be2c8d Add smoke tests for previously-untested modules, fix wasteful svmperf tmpdir creation
- Add smoke tests covering data/reader.py, method/_threshold_optim.py,
  classification/calibration.py, method/confidence.py, and the pure-numpy
  helpers in method/_bayesian.py (skipping the jax/stan-dependent model
  code itself, consistent with how the aggregative-method registry already
  treats it as optional)
- SVMperf: stop creating a tempfile.TemporaryDirectory() just to discard it
  immediately for its .name; generate the path directly instead of doing a
  pointless create/delete/recreate cycle (cleanup already happens via the
  class's own __del__)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-04 19:05:06 +02:00
Alejandro Moreo Fernandez b29966797a Fix 10 correctness bugs and clean up warnings/logging in core library
Correctness:
- OneVsAllAggregative.aggregation_fit: fix undefined variable and call to
  the nonexistent aggregate_fit (should be aggregation_fit)
- solve_adjustment: stop mutating the caller's fitted arrays in place for
  method='invariant-ratio'
- LabelledCollection.join(): fix classes always being None due to
  ndarray.sort() returning None; now unions each collection's own classes_
  so a class absent from a particular join is kept at zero prevalence
- Rename the duplicate newSVMKLD (nkld variant) to newSVMNKLD so both loss
  variants are reachable
- EMQ/DyS/DMy: resolve n_jobs via qp._get_njobs() like the other methods,
  so qp.environ['N_JOBS'] is respected
- AggregativeMedianEstimator: drop backend='threading' (global np.random
  state mutated via temp_seed is not thread-safe); use the safe process
  based default instead
- NeuralClassifier: default device now 'cpu', matching its own docstring
- ConfidenceEllipseSimplex: narrow bare except to np.linalg.LinAlgError
- SVMperf: stop merging stderr into stdout so failures report the actual
  subprocess error instead of crashing with AttributeError
- ConfidenceRegionABC: replace @lru_cache on bound methods (leaked every
  instance for the process lifetime) with per-instance caching

Style/quality:
- Replace print() with warnings.warn()/logging across aggregative.py,
  base.py, meta.py, model_selection.py, classification/neural.py,
  method/_neural.py, classification/svmperf.py, data/reader.py,
  data/datasets.py; also fixes a `raise RuntimeWarning(...)` in EMQ that
  would have crashed instead of warning
- Remove dead duplicate class MedianEstimator2 in meta.py
- Rename misleading _compute_tpr(TP, FP) parameter to FN, matching what
  callers actually pass
- Replace argparse.ArgumentError misuse with ValueError
- Remove commented-out dead code in protocol.py
- _lequa.py: fix CSV-parse failure raising an unrelated UnboundLocalError
  instead of a clear ValueError

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-04 18:49:44 +02:00
Alejandro Moreo f6c822ca8f improving docs and new example for image datasets 2026-07-03 17:07:02 +02:00
Alejandro Moreo 4916919833 added dataset for images 2026-07-02 18:21:35 +02:00
Alejandro Moreo a1dff57db0 refactoring and cleaning up 2026-06-30 18:02:23 +02:00
Alejandro Moreo e44056d860 integrating bayesian methods and related functionality, plus unit test refactor 2026-06-05 14:08:06 +02:00
Alejandro Moreo Fernandez 1907c040ad added total to lequa protocols for bag iteration 2026-03-03 10:06:08 +01:00
Andrea Esuli 5374ef3cae
Merge pull request #52 from aesuli/read_csv
Fix regex for whitespace delimiter in CSV reads
2026-02-23 09:32:53 +01:00
Andrea Esuli c1ae85950a
Fix regex for whitespace delimiter in CSV reads 2026-02-23 09:29:45 +01:00
Andrea Esuli f4ac6da7a4
Merge pull request #51 from aesuli/true_divide_where
removed true_divide warning
2026-02-09 15:30:35 +01:00
Andrea Esuli be23a321a7
Merge pull request #50 from aesuli/pcc_val_split
val_split in pcc
2026-02-09 15:29:44 +01:00
Andrea Esuli bb423c6856 removed warning 2026-02-09 15:16:39 +01:00
Andrea Esuli 51190c2c7d val_split in pcc 2026-02-09 15:15:08 +01:00
Alejandro Moreo Fernandez 7562e7c85f
Merge pull request #48 from lorenzovolpi/devel
Deprecated numpy call
2026-01-16 00:27:03 +01:00
Lorenzo Volpi bd59b5d190 fixed deprecated numpy call to in1d 2026-01-15 18:14:50 +01:00
Alejandro Moreo Fernandez 6db659e3c4 unifying n_bins in PQ and DMy 2025-11-18 10:13:34 +01:00
Alejandro Moreo Fernandez db49cd31be Merge branch 'devel' of github.com:HLT-ISTI/QuaPy into devel 2025-11-17 17:54:09 +01:00
Alejandro Moreo Fernandez 9da4fd57db added property samples to confidence regions 2025-11-17 17:53:56 +01:00
Alejandro Moreo Fernandez 5f6a151263 Merge branch 'pglez82-precisequant' into devel 2025-11-15 18:55:38 +01:00
Alejandro Moreo Fernandez 047cb9e533 merged 2025-11-15 18:54:04 +01:00
Alejandro Moreo Fernandez 6388d9b549 merged 2025-11-15 18:03:06 +01:00
Alejandro Moreo Fernandez d9cf6cc11d index in labelled collection from versions restored 2025-11-15 17:56:37 +01:00
pglez82 46e7246f3a adding stan file to setup 2025-11-15 17:04:55 +01:00
pglez82 c6492a0f20 fixing import 2025-11-15 17:04:44 +01:00
pglez82 e4c07e1835 changing the way the file is loaded 2025-11-15 16:51:48 +01:00
Alejandro Moreo Fernandez c2044cb200 Merge branch 'precisequant' of github.com:pglez82/QuaPy into pglez82-precisequant 2025-11-15 15:03:20 +01:00
pglez82 3268e9fada PQ (precise quantifier) 2025-11-14 18:35:40 +01:00
Alejandro Moreo Fernandez a868d2d561 import fix 2025-11-14 16:10:17 +01:00
Alejandro Moreo Fernandez 3c09b1c98a adding prev@densities in KDEyML, huge effiency improvement... 2025-11-13 18:45:07 +01:00
Alejandro Moreo Fernandez f227ed2f60 adding kdex 2025-10-23 14:12:39 +02:00
Alejandro Moreo Fernandez 41baeb78ca lazy index construction in labelled collection 2025-10-23 12:35:01 +02:00
Alejandro Moreo Fernandez 088ebcdd31 adding non aggregative methods experimental 2025-10-23 12:10:21 +02:00
Alejandro Moreo Fernandez c11b99e08a improved ReadMe method 2025-10-22 18:51:35 +02:00
Alejandro Moreo Fernandez 854b3ba3f9 documented ReadMe 2025-10-20 18:33:45 +02:00
Alejandro Moreo Fernandez eafe486893 adding readme to non-aggregative 2025-10-20 18:13:34 +02:00
Alejandro Moreo Fernandez 1fb8500e87 improved doc 2025-10-09 12:49:08 +02:00
Alejandro Moreo Fernandez d597820a59 missing doc of confidence methods 2025-10-09 12:10:26 +02:00