diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 7e5281f..fc438e0 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -113,7 +113,7 @@
Fits the calibration in a cross-validation manner, i.e., it generates posterior probabilities for all training instances via cross-validation, and then retrains the classifier on all training instances. -The posterior probabilities thus generated are used for calibrating the outpus of the classifier.
+The posterior probabilities thus generated are used for calibrating the outputs of the classifier.Bases: object
A LabelledCollection is a set of objects each with a label associated to it. This class implements many sampling -routines.
+A LabelledCollection is a set of objects each with a label attached to each of them. +This class implements several sampling routines and other utilities.
Gets the instances and the true prevalence. This is useful when implementing evaluation protocols from -a LabelledCollection object.
+aLabelledCollection
object.
a tuple (instances, prevalence) from this collection
@@ -299,7 +299,7 @@ as listed by self.classes_Generator of stratified folds to be used in k-fold cross validation.
Returns a new LabelledCollection
as the union of this collection with another collection.
a – instance of LabelledCollection
b – instance of LabelledCollection
a LabelledCollection
representing the union of both collections
Return a random sample (an instance of LabelledCollection
) of desired size and desired prevalence
values. For each class, the sampling is drawn without replacement if the requested prevalence is larger than
the actual prevalence of the class, or with replacement otherwise.
shuffle – if set to True (default), shuffles the index before returning it
random_state – seed for reproducing sampling
Returns an index to be used to extract a random sample of desired size and desired prevalence values. If the prevalence values are not specified, then returns the index of a uniform sampling. For each class, the sampling is drawn without replacement if the requested prevalence is larger than @@ -425,6 +443,7 @@ the actual prevalence of the class, or with replacement otherwise.
it is constrained. E.g., for binary collections, only the prevalence p for the first class (as listed in self.classes_ can be specified, while the other class takes prevalence value 1-pshuffle – if set to True (default), shuffles the index before returning it
random_state – seed for reproducing sampling
Bases: AbstractStochasticSeededProtocol
, OnLabelledCollectionProtocol
Implementation of the artificial prevalence protocol (APP). The APP consists of exploring a grid of prevalence values containing n_prevalences points (e.g., @@ -520,7 +520,8 @@ qp.environ[“SAMPLE_SIZE”]. If this is not set, a ValueError exception is rai grid (default is 21)
repeats – number of copies for each valid prevalence vector (default is 10)
smooth_limits_epsilon – the quantity to add and subtract to the limits 0 and 1
random_state – allows replicating samples across runs (default None)
random_state – allows replicating samples across runs (default 0, meaning that the sequence of samples +will be the same every time the protocol is called)
return_type – set to “sample_prev” (default) to get the pairs of (sample, prevalence) at each iteration, or to “labelled_collection” to get instead instances of LabelledCollection
Bases: AbstractProtocol
An AbstractStochasticSeededProtocol is a protocol that generates, via any random procedure (e.g.,
via random sampling), sequences of random_state – the seed for allowing to replicate any sequence of samples. Default is None, meaning that
-the sequence will be different every time the protocol is called. random_state – the seed for allowing to replicate any sequence of samples. Default is 0, meaning that
+the sequence will be consistent every time the protocol is called.quapy.data.base.LabelledCollection
samples.
@@ -616,8 +617,8 @@ needed for extracting the samples, and
Bases: AbstractStochasticSeededProtocol
Generates mixtures of two domains (A and B) at controlled rates, but preserving the original class prevalence.
mixture_points – an integer indicating the number of points to take from a linear scale (e.g., 21 will generate the mixture points [1, 0.95, 0.9, …, 0]), or the array of mixture values itself. the specific points
random_state –
random_state – allows replicating samples across runs (default 0, meaning that the sequence of samples +will be the same every time the protocol is called)
Bases: AbstractStochasticSeededProtocol
, OnLabelledCollectionProtocol
A generator of samples that implements the natural prevalence protocol (NPP). The NPP consists of drawing samples uniformly at random, therefore approximately preserving the natural prevalence of the collection.
@@ -730,7 +732,8 @@ samples uniformly at random, therefore approximately preserving the natural prevsample_size – integer, the number of instances in each sample; if None (default) then it is taken from qp.environ[“SAMPLE_SIZE”]. If this is not set, a ValueError exception is raised.
repeats – the number of samples to generate. Default is 100.
random_state – allows replicating samples across runs (default None)
random_state – allows replicating samples across runs (default 0, meaning that the sequence of samples +will be the same every time the protocol is called)
return_type – set to “sample_prev” (default) to get the pairs of (sample, prevalence) at each iteration, or to “labelled_collection” to get instead instances of LabelledCollection
Bases: AbstractStochasticSeededProtocol
, OnLabelledCollectionProtocol
A variant of APP
that, instead of using a grid of equidistant prevalence values,
relies on the Kraemer algorithm for sampling unit (k-1)-simplex uniformly at random, with
@@ -817,7 +820,8 @@ combinations of the grid values of APP makes this endeavour intractable.
sample_size – integer, the number of instances in each sample; if None (default) then it is taken from qp.environ[“SAMPLE_SIZE”]. If this is not set, a ValueError exception is raised.
repeats – the number of samples to generate. Default is 100.
random_state – allows replicating samples across runs (default None)
random_state – allows replicating samples across runs (default 0, meaning that the sequence of samples +will be the same every time the protocol is called)
return_type – set to “sample_prev” (default) to get the pairs of (sample, prevalence) at each iteration, or to “labelled_collection” to get instead instances of LabelledCollection
Bases: AggregativeQuantifier
Bases: OneVsAllGeneric
, AggregativeQuantifier
Allows any binary quantifier to perform quantification on single-label datasets.
The method maintains one binary quantifier for each class, and then l1-normalizes the outputs so that the
class prevelences sum up to 1.
@@ -795,12 +795,15 @@ This variant was used, along with the
- Implements the aggregation of label predictions.
Class labels, in the same order in which class prevalence values are to be computed. -This default implementation actually returns the class labels of the learner.
-array-like
-If the base quantifier is not probabilistic, returns a matrix of shape (n,m,) with n the number of instances and m the number of classes. The entry (i,j) is a binary value indicating whether instance i `belongs to class `j. The binary classifications are independent of each other, meaning that an instance @@ -845,63 +836,6 @@ probabilities are independent of each other, meaning that, in general, they do n
Trains the aggregative quantifier
-data – a quapy.data.base.LabelledCollection
consisting of the training data
fit_classifier – whether or not to train the learner (default is True). Set to False if the -learner has been trained outside the quantifier.
self
-Get parameters for this estimator.
-deep (bool, default=True) – If True, will return the parameters for this estimator and -contained subobjects that are estimators.
-params – Parameter names mapped to their values.
-dict
-Set the parameters of this estimator.
-The method works on simple estimators as well as on nested objects
-(such as Pipeline
). The latter have
-parameters of the form <component>__<parameter>
so that it’s
-possible to update each component of a nested object.
**params (dict) – Estimator parameters.
-self – Estimator instance.
-estimator instance
-Bases: object
Bases: OneVsAll
, BaseQuantifier
Allows any binary quantifier to perform quantification on single-label datasets. The method maintains one binary quantifier for each class, and then l1-normalizes the outputs so that the class prevelence values sum up to 1.
Trains a quantifier.
+data – a quapy.data.base.LabelledCollection
consisting of the training data
self
+Generate class prevalence estimates for the sample’s instances
+instances – array-like
+np.ndarray of shape (n_classes,) with class prevalence estimates.
+