Commit Graph

13 Commits

Author SHA1 Message Date
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 Fernandez 24ab704661 all examples but 15 (qunfold) properly working 2025-10-01 17:41:36 +02:00
Alejandro Moreo Fernandez 505d2de823 elm examples 2023-02-13 12:01:52 +01:00
Alejandro Moreo Fernandez 7b2d3cb7f1 example using svmperf 2023-02-11 10:08:31 +01:00
Alejandro Moreo Fernandez 2485117f05 adding documentation and adding one new example 2023-02-08 19:06:53 +01:00
Alejandro Moreo Fernandez 3eb760901f doc update, official baselines for T1A and T1B refactored 2021-11-12 14:30:02 +01:00
Alejandro Moreo Fernandez e8c3e29911 svm-perf leaks model, fixing... 2021-06-15 07:49:16 +02:00
Alejandro Moreo Fernandez 854d759dc4 making everything work like in the wiki 2021-02-17 18:05:22 +01:00
Alejandro Moreo Fernandez 70da8f7925 updating the documentation 2021-02-16 19:38:52 +01:00
Alejandro Moreo Fernandez 5e64d2588a import fixes 2021-01-15 18:32:32 +01:00
Alejandro Moreo Fernandez 9bc3a9f28a evaluation by artificial prevalence sampling added. New methods added. New util functions added to quapy.functional and quapy.utils 2020-12-10 19:04:33 +01:00
Alejandro Moreo Fernandez 78988c87f9 svmperf wrapper added 2020-12-03 16:59:13 +01:00