From 49fc486c53c6d3d06717397674a76c7f06952706 Mon Sep 17 00:00:00 2001 From: Alejandro Moreo Date: Tue, 14 Feb 2023 17:00:50 +0100 Subject: [PATCH] preparing to merge --- README.md | 31 +-- docs/build/html/Datasets.html | 2 +- docs/build/html/Evaluation.html | 211 +++++++----------- docs/build/html/Methods.html | 137 +++++++----- docs/build/html/Model-Selection.html | 137 ++++++------ docs/build/html/Plotting.html | 45 ++-- docs/build/html/_sources/Datasets.md.txt | 3 +- docs/build/html/_sources/Evaluation.md.txt | 207 ++++++----------- docs/build/html/_sources/Methods.md.txt | 134 ++++++----- .../html/_sources/Model-Selection.md.txt | 137 ++++++------ docs/build/html/_sources/Plotting.md.txt | 45 ++-- docs/build/html/_sources/index.rst.txt | 2 + docs/build/html/genindex.html | 45 +++- docs/build/html/index.html | 8 + docs/build/html/objects.inv | Bin 2822 -> 2928 bytes docs/build/html/quapy.data.html | 48 ++-- docs/build/html/quapy.html | 194 ++++++++++++++-- docs/build/html/quapy.method.html | 5 +- docs/build/html/searchindex.js | 2 +- examples/model_selection.py | 57 +++++ quapy/CHANGE_LOG.txt | 22 +- quapy/data/base.py | 70 ++++-- quapy/evaluation.py | 10 +- quapy/model_selection.py | 4 +- quapy/plot.py | 14 +- quapy/protocol.py | 9 + quapy/tests/test_labelcollection.py | 47 ++++ 27 files changed, 927 insertions(+), 699 deletions(-) create mode 100644 examples/model_selection.py diff --git a/README.md b/README.md index 10c769f..8f8b7de 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ for facilitating the analysis and interpretation of the experimental results. ### Last updates: +* Version 0.1.7 is released! major changes can be consulted [here](quapy/FCHANGE_LOG.txt). * A detailed documentation is now available [here](https://hlt-isti.github.io/QuaPy/) * The developer API documentation is available [here](https://hlt-isti.github.io/QuaPy/build/html/modules.html) @@ -59,13 +60,14 @@ See the [Wiki](https://github.com/HLT-ISTI/QuaPy/wiki) for detailed examples. ## Features * Implementation of many popular quantification methods (Classify-&-Count and its variants, Expectation Maximization, -quantification methods based on structured output learning, HDy, QuaNet, and quantification ensembles). -* Versatile functionality for performing evaluation based on artificial sampling protocols. +quantification methods based on structured output learning, HDy, QuaNet, quantification ensembles, among others). +* Versatile functionality for performing evaluation based on sampling generation protocols (e.g., APP, NPP, etc.). * Implementation of most commonly used evaluation metrics (e.g., AE, RAE, SE, KLD, NKLD, etc.). * Datasets frequently used in quantification (textual and numeric), including: * 32 UCI Machine Learning datasets. * 11 Twitter quantification-by-sentiment datasets. * 3 product reviews quantification-by-sentiment datasets. + * 4 tasks from LeQua competition (_new in v0.1.7!_) * Native support for binary and single-label multiclass quantification scenarios. * Model selection functionality that minimizes quantification-oriented loss functions. * Visualization tools for analysing the experimental results. @@ -80,29 +82,6 @@ quantification methods based on structured output learning, HDy, QuaNet, and qua * pandas, xlrd * matplotlib -## SVM-perf with quantification-oriented losses -In order to run experiments involving SVM(Q), SVM(KLD), SVM(NKLD), -SVM(AE), or SVM(RAE), you have to first download the -[svmperf](http://www.cs.cornell.edu/people/tj/svm_light/svm_perf.html) -package, apply the patch -[svm-perf-quantification-ext.patch](./svm-perf-quantification-ext.patch), and compile the sources. -The script [prepare_svmperf.sh](prepare_svmperf.sh) does all the job. Simply run: - -``` -./prepare_svmperf.sh -``` - -The resulting directory [svm_perf_quantification](./svm_perf_quantification) contains the -patched version of _svmperf_ with quantification-oriented losses. - -The [svm-perf-quantification-ext.patch](./svm-perf-quantification-ext.patch) is an extension of the patch made available by -[Esuli et al. 2015](https://dl.acm.org/doi/abs/10.1145/2700406?casa_token=8D2fHsGCVn0AAAAA:ZfThYOvrzWxMGfZYlQW_y8Cagg-o_l6X_PcF09mdETQ4Tu7jK98mxFbGSXp9ZSO14JkUIYuDGFG0) -that allows SVMperf to optimize for -the _Q_ measure as proposed by [Barranquero et al. 2015](https://www.sciencedirect.com/science/article/abs/pii/S003132031400291X) -and for the _KLD_ and _NKLD_ measures as proposed by [Esuli et al. 2015](https://dl.acm.org/doi/abs/10.1145/2700406?casa_token=8D2fHsGCVn0AAAAA:ZfThYOvrzWxMGfZYlQW_y8Cagg-o_l6X_PcF09mdETQ4Tu7jK98mxFbGSXp9ZSO14JkUIYuDGFG0). -This patch extends the above one by also allowing SVMperf to optimize for -_AE_ and _RAE_. - ## Documentation @@ -113,6 +92,8 @@ are provided: * [Datasets](https://github.com/HLT-ISTI/QuaPy/wiki/Datasets) * [Evaluation](https://github.com/HLT-ISTI/QuaPy/wiki/Evaluation) +* [Protocols](https://github.com/HLT-ISTI/QuaPy/wiki/Protocols) * [Methods](https://github.com/HLT-ISTI/QuaPy/wiki/Methods) +* [SVMperf](https://github.com/HLT-ISTI/QuaPy/wiki/ExplicitLossMinimization) * [Model Selection](https://github.com/HLT-ISTI/QuaPy/wiki/Model-Selection) * [Plotting](https://github.com/HLT-ISTI/QuaPy/wiki/Plotting) diff --git a/docs/build/html/Datasets.html b/docs/build/html/Datasets.html index 9c9eaa7..1636fa0 100644 --- a/docs/build/html/Datasets.html +++ b/docs/build/html/Datasets.html @@ -86,7 +86,7 @@ Take a look at the following code:

sample = data.sampling(sample_size, *prev) print('instances:', sample.instances) -print('labels:', sample.labels) +print('labels:', sample.classes) print('prevalence:', F.strprev(sample.prevalence(), prec=2)) diff --git a/docs/build/html/Evaluation.html b/docs/build/html/Evaluation.html index 9252ff2..1b41a03 100644 --- a/docs/build/html/Evaluation.html +++ b/docs/build/html/Evaluation.html @@ -20,7 +20,7 @@ - +