Commit Graph

129 Commits

Author SHA1 Message Date
Alejandro Moreo Fernandez 2a50fe902c Fix broken imports left over from the BBSE/LEIP commit
quapy/classification/__init__.py imported a labelshift module that doesn't exist
anywhere in the repo (and nothing else references it), breaking `import quapy`
entirely; the import is removed.

quapy/method/aggregative.py imported a nonexistent `_liep` module instead of the
actual file, _liep_draft.py, which itself never got a LEIP class added (only
helper functions such as leip()). Guards the import so LEIP degrades to an
"not available" placeholder, like the other optional neural methods, instead of
crashing the whole package. test_leip/test_leip_fixed_tau still fail as a result;
finishing LEIP is left for a follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 14:47:13 +02:00
Alejandro Moreo Fernandez d046681986 added bbse hard and soft and classifier adaptation wrapper 2026-08-26 18:08:37 +02:00
Alejandro Moreo 8b0327f00a added EDx and improve doc 2026-07-07 15:46:45 +02:00
Alejandro Moreo 4bfa212459 adding EDy and improved manuals 2026-07-06 17:30:42 +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 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
Andrea Esuli 51190c2c7d val_split in pcc 2026-02-09 15:15:08 +01:00
Alejandro Moreo Fernandez 3847db3838 mergin and solving pytests 2025-10-06 12:03:31 +02:00
Alejandro Moreo Fernandez 24ab704661 all examples but 15 (qunfold) properly working 2025-10-01 17:41:36 +02:00
Alejandro Moreo Fernandez edbc8bc201 clean 2025-10-01 10:26:57 +02:00
Alejandro Moreo Fernandez 3c16536b3d cleaning examples 2025-09-26 15:22:41 +02:00
Alejandro Moreo Fernandez 99c1755c81 improving plots 2025-09-25 13:18:35 +02:00
Alejandro Moreo Fernandez 265fcc2d92 tests passed; working on examples 2025-07-13 14:27:14 +02:00
Alejandro Moreo Fernandez e76e1de6a9 refactoring codebase 2025-05-23 12:27:49 +02:00
Alejandro Moreo Fernandez aac133817b dealing with unit tests 2025-04-25 13:52:05 +02:00
Alejandro Moreo Fernandez 960ca5076e refactoring no labelled collection and other improvements in EMQ 2025-04-23 12:25:05 +02:00
Alejandro Moreo Fernandez 5738821d10 refactoring w/o labelled collection 2025-04-20 22:09:18 +02:00
Alejandro Moreo Fernandez 075be93a23 refactoring w/o labelled collection 2025-04-20 22:05:46 +02:00
Alejandro Moreo Fernandez 2728dfbaa6 bayesian cc now inherits from the new abstract class WithConfidenceABC, just like AggregativeBootstrap 2024-11-29 18:15:09 +01:00
Alejandro Moreo Fernandez 68d2f84de3 bugfix in bayesian method; float conversion was needed 2024-11-27 17:43:22 +01:00
Alejandro Moreo Fernandez 24c28edfd9 adding scmq 2024-10-16 16:00:23 +02:00
Alejandro Moreo Fernandez 7e4e0e20a1 wiki datasets merged 2024-07-03 16:39:52 +02:00
Alejandro Moreo Fernandez 781ce82b90 np.product --> np.prod 2024-07-02 09:52:00 +02:00
Alejandro Moreo Fernandez ad11b86168 adding environment variables for N_JOBS, and adding a default classifier (sklearn's logistic regression) for when the classifier is not specified in aggregative quantifiers 2024-05-30 10:53:53 +02:00
Alejandro Moreo Fernandez 8517338765
Merge branch 'devel' into ucimulti 2024-04-29 17:58:06 +02:00
Alejandro Moreo Fernandez 561b672200 updated unit tests 2024-04-16 15:12:22 +02:00
Alejandro Moreo Fernandez 9207114cfa improving unit tests 2024-04-15 18:00:38 +02:00
Alejandro Moreo Fernandez b53d417240 merged 2024-04-12 13:35:13 +02:00
Alejandro Moreo Fernandez aa894a3472 merging PR; I have taken this opportunity to refactor some issues I didnt like, including the normalization of prevalence vectors, and improving the documentation here and there 2024-03-19 15:01:42 +01:00
Alejandro Moreo Fernandez 36ac6db27d fixing doc 2024-03-18 23:39:55 +01:00
Paweł Czyż 5cdd158fcc Add invariant ratio estimators. 2024-03-15 18:14:42 +01:00
Paweł Czyż d34b086a76 Refactor solving routine 2024-03-15 17:58:23 +01:00
Paweł Czyż 4dd66b1921 Add projection onto the probability simplex 2024-03-15 17:15:16 +01:00
Alejandro Moreo Fernandez 3921b8368e merging BayesianCC implemented by Pawel Czyz 2024-03-15 16:24:45 +01:00
Paweł Czyż 2cc4908326 Sketch of the Bayesian quantification 2024-03-15 14:01:24 +01:00
Paweł Czyż 3705264529 Fix a typo. 2024-03-14 10:39:26 +01:00
Alejandro Moreo Fernandez 320b3eac38 small fixes in kdey (now should work with string labels) and EMQ (in case some training prior prob was 0, it broke) 2024-02-23 16:29:53 +01:00
Alejandro Moreo Fernandez 40cb8f78fe pytests before release 2024-02-14 12:27:19 +01:00
Alejandro Moreo Fernandez a8230827e2 testing IFCB dataset 2024-02-08 14:33:22 +01:00
Alejandro Moreo Fernandez fcc3f8a0d9 fixing sphinx doc 2024-02-07 18:31:34 +01:00
Alejandro Moreo Fernandez e6dcfbced1 adding M.Bunse's reference for the solver='minimize' option of ACC, PACC 2024-01-25 18:03:35 +01:00
Alejandro Moreo Fernandez 74efa9751d adding the approximate solution to ACC and PACC as suggested by Mirko Bunse 2024-01-25 16:43:00 +01:00
Alejandro Moreo Fernandez 7ac834bd2c refactoring aggregation methods 2024-01-25 14:33:41 +01:00
Alejandro Moreo Fernandez ff00de18cb updating documentation a bit 2024-01-19 18:24:38 +01:00
Alejandro Moreo Fernandez 8d22ba39f4 method MS2 (Medium Sweep 2) fixed 2024-01-19 18:11:22 +01:00
Alejandro Moreo Fernandez b68b58ad11 fixed optimization threshold methods (again) 2024-01-18 18:26:40 +01:00
Alejandro Moreo Fernandez c0d92a2083 optimization threshold variants fixed 2024-01-18 18:22:22 +01:00
Alejandro Moreo Fernandez 9b2470c992 testing optimization threshold variants, not working 2024-01-17 19:15:50 +01:00