Commit Graph

40 Commits

Author SHA1 Message Date
Alejandro Moreo Fernandez 195552ef55 update docs 2026-07-17 16:45:12 +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 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 bb423c6856 removed warning 2026-02-09 15:16:39 +01:00
Alejandro Moreo Fernandez 8adcc33c59 merged 2025-10-03 11:00:06 +02:00
Alejandro Moreo Fernandez 24a91b6e9b going through examples, currently working on second one 2025-06-15 14:57:40 +02:00
Alejandro Moreo Fernandez e76e1de6a9 refactoring codebase 2025-05-23 12:27:49 +02:00
Alejandro Moreo Fernandez 8876d311e7 working on SCMQ, MCSQ, MCMQ ensembles 2024-12-02 17:39:06 +01:00
Alejandro Moreo Fernandez e580e33b83 removing the warning supression in datasets 2024-08-22 18:11:47 +02:00
Alejandro Moreo Fernandez 561b672200 updated unit tests 2024-04-16 15:12:22 +02:00
Alejandro Moreo Fernandez a04723a976 switching 2024-03-20 17:31:07 +01: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
Paweł Czyż 2cc4908326 Sketch of the Bayesian quantification 2024-03-15 14:01:24 +01:00
Alejandro Moreo Fernandez c0d92a2083 optimization threshold variants fixed 2024-01-18 18:22:22 +01:00
Alejandro Moreo Fernandez 896fa042d6 fixing threshold optimization-based techniques 2024-01-17 09:33:39 +01:00
Alejandro Moreo Fernandez 29db15ae25 added DMx and DMy, with a classmethod that returns HDx and HDy respectively 2023-11-09 18:13:54 +01:00
Alejandro Moreo Fernandez c3cf0e2d49 adding DistributionMatchingX, the covariate-specific equivalent counterpart of DistributionMatching 2023-11-08 16:13:48 +01:00
Alejandro Moreo Fernandez 76cf784844 added HDx and an example comparing HDy vs HDx 2023-11-08 15:34:17 +01:00
Alejandro Moreo Fernandez 2485117f05 adding documentation and adding one new example 2023-02-08 19:06:53 +01:00
Alejandro Moreo Fernandez 8b0b9f522a some bugfixes, unittest and minor changes 2023-01-16 13:51:29 +01:00
Pablo González 46e294002f dys implementation 2022-07-11 12:21:49 +02:00
Alejandro Moreo Fernandez eba6fd8123 optimization conditional in the prediction function 2022-05-26 17:59:23 +02:00
Alejandro Moreo Fernandez b453c8fcbc first commit protocols 2022-05-20 16:48:46 +02:00
Alejandro Moreo Fernandez ba18d00334 trying to figure out how to refactor protocols meaninguflly 2021-12-20 11:39:44 +01:00
Alejandro Moreo Fernandez 5deb92b457 update doc 2021-12-07 17:16:39 +01:00
Alejandro Moreo Fernandez 7468519495 testing baselines for lequa 2021-11-24 11:20:42 +01:00
Andrea Esuli 5b772c7eda Bug fixes on use of classes_. Tests. 2021-05-05 17:12:44 +02:00
Alejandro Moreo Fernandez 5e64d2588a import fixes 2021-01-15 18:32:32 +01:00
Alejandro Moreo Fernandez 326a8ab803 added Ensemble methods (methods ALL, ACC, Ptr, DS from Pérez-Gallego et al 2017 and 2019) and some UCI ML datasets used in those articles (only 5 datasets out of 32 they used) 2021-01-06 14:58:29 +01:00
Alejandro Moreo Fernandez 7d6f523e4b uniform sampling added if *prevs is empty 2020-12-17 18:17:17 +01:00
Alejandro Moreo Fernandez c8a1a70c8a refactoring aggregative methods as methods that not only implement 'classify' and 'quantify', but that also implement 'aggregate' and that, by default, have a default implementation of 'quantify' as a pipeline of 'classify' and 'aggregate'; this helps speeding up evaluations A LOT, since the documents can be pre-classified and the samples are carried out across pre-classified values (labels, or posterior probabilities), and thus only aggregate is called many times within the artificial sampling protocol 2020-12-11 19:28:17 +01:00
Alejandro Moreo Fernandez e55caf82fd merged 2020-12-10 19:08:22 +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 9c8d29156c aggregative methods adapted. Explicit loss minimization methods (SVMQ, SVMKLD, ...) added and with support to binary or single-label. HDy added 2020-12-04 19:32:08 +01:00
Alejandro Moreo Fernandez a882424eeb many aggregative methods added 2020-12-03 18:12:28 +01:00