<spanid="quapy-method-aggregative-module"></span><h2>quapy.method.aggregative module<aclass="headerlink"href="#module-quapy.method.aggregative"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ACC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ACC"title="Permalink to this definition">¶</a></dt>
<p><aclass="reference external"href="https://link.springer.com/article/10.1007/s10618-008-0097-y">Adjusted Classify & Count</a>,
the “adjusted” variant of <aclass="reference internal"href="#quapy.method.aggregative.CC"title="quapy.method.aggregative.CC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">CC</span></code></a>, that corrects the predictions of CC
according to the <cite>misclassification rates</cite>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a classifier</p></li>
<li><p><strong>val_split</strong>– indicates the proportion of data to be used as a stratified held-out validation set in which the
misclassification rates are to be estimated.
This parameter can be indicated as a real value (between 0 and 1, default 0.4), representing a proportion of
validation data, or as an integer, indicating that the misclassification rates should be estimated via
<cite>k</cite>-fold cross validation (this integer stands for the number of folds <cite>k</cite>), or as a
<aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ACC.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">classify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ACC.classify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="pre">int</span><spanclass="p"><spanclass="pre">,</span></span><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a><spanclass="p"><spanclass="pre">]</span></span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ACC.fit"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">classmethod</span></em><spanclass="sig-name descname"><spanclass="pre">solve_adjustment</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">PteCondEstim</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">prevs_estim</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ACC.solve_adjustment"title="Permalink to this definition">¶</a></dt>
<dd><p>Solves the system linear system <spanclass="math notranslate nohighlight">\(Ax = B\)</span> with <spanclass="math notranslate nohighlight">\(A\)</span> = <cite>PteCondEstim</cite> and <spanclass="math notranslate nohighlight">\(B\)</span> = <cite>prevs_estim</cite></p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>PteCondEstim</strong>– a <cite>np.ndarray</cite> of shape <cite>(n_classes,n_classes,)</cite> with entry <cite>(i,j)</cite> being the estimate
of <spanclass="math notranslate nohighlight">\(P(y_i|y_j)\)</span>, that is, the probability that an instance that belongs to <spanclass="math notranslate nohighlight">\(y_j\)</span> ends up being
classified as belonging to <spanclass="math notranslate nohighlight">\(y_i\)</span></p></li>
<li><p><strong>prevs_estim</strong>– a <cite>np.ndarray</cite> of shape <cite>(n_classes,)</cite> with the class prevalence estimates</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an adjusted <cite>np.ndarray</cite> of shape <cite>(n_classes,)</cite> with the corrected class prevalence estimates</p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">AdjustedClassifyAndCount</span></span><aclass="headerlink"href="#quapy.method.aggregative.AdjustedClassifyAndCount"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.ACC</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">AggregativeProbabilisticQuantifier</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">posterior_probabilities</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier.posterior_probabilities"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">predict_proba</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier.predict_proba"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">probabilistic</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier.probabilistic"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier.quantify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeProbabilisticQuantifier.set_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">AggregativeQuantifier</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier"title="Permalink to this definition">¶</a></dt>
results. Aggregative Quantifiers thus implement a <aclass="reference internal"href="#quapy.method.aggregative.AggregativeQuantifier.classify"title="quapy.method.aggregative.AggregativeQuantifier.classify"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">classify()</span></code></a> method and maintain a <aclass="reference internal"href="#quapy.method.aggregative.AggregativeQuantifier.learner"title="quapy.method.aggregative.AggregativeQuantifier.learner"><codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">learner</span></code></a> attribute.
Subclasses of this abstract class must implement the method <aclass="reference internal"href="#quapy.method.aggregative.AggregativeQuantifier.aggregate"title="quapy.method.aggregative.AggregativeQuantifier.aggregate"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">aggregate()</span></code></a> which computes the aggregation
of label predictions. The method <aclass="reference internal"href="#quapy.method.aggregative.AggregativeQuantifier.quantify"title="quapy.method.aggregative.AggregativeQuantifier.quantify"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">quantify()</span></code></a> comes with a default implementation based on</p>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.aggregate"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">aggregative</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.aggregative"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.classes_"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">classify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.classify"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.get_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">learner</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.learner"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.quantify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.set_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">CC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.CC"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.CC.aggregate"title="Permalink to this definition">¶</a></dt>
<dd><p>Computes class prevalence estimates by counting the prevalence of each of the predicted labels.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>classif_predictions</strong>– array-like with label predictions</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><cite>np.ndarray</cite> of shape <cite>(self.n_classes_,)</cite> with class prevalence estimates.</p>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.CC.fit"title="Permalink to this definition">¶</a></dt>
<dd><p>Trains the Classify & Count method unless <cite>fit_learner</cite> is False, in which case, the classifier is assumed to
be already fit and there is nothing else to do.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– if False, the classifier is assumed to be fit</p></li>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ClassifyAndCount</span></span><aclass="headerlink"href="#quapy.method.aggregative.ClassifyAndCount"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.CC"title="quapy.method.aggregative.CC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.CC</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ELM</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">loss</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'01'</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ELM"title="Permalink to this definition">¶</a></dt>
<li><p><strong>svmperf_base</strong>– path to the folder containing the binary files of <cite>SVM perf</cite></p></li>
<li><p><strong>loss</strong>– the loss to optimize (see <aclass="reference internal"href="quapy.classification.html#quapy.classification.svmperf.SVMperf.valid_losses"title="quapy.classification.svmperf.SVMperf.valid_losses"><codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">quapy.classification.svmperf.SVMperf.valid_losses</span></code></a>)</p></li>
<li><p><strong>kwargs</strong>– rest of SVM perf’s parameters</p></li>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ELM.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">classify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">y</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ELM.classify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ELM.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">EMQ</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.EMQ"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">classmethod</span></em><spanclass="sig-name descname"><spanclass="pre">EM</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">tr_prev</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">posterior_probabilities</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">epsilon</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.0001</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.EMQ.EM"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">EPSILON</span></span><emclass="property"><spanclass="pre">=</span><spanclass="pre">0.0001</span></em><aclass="headerlink"href="#quapy.method.aggregative.EMQ.EPSILON"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">MAX_ITER</span></span><emclass="property"><spanclass="pre">=</span><spanclass="pre">1000</span></em><aclass="headerlink"href="#quapy.method.aggregative.EMQ.MAX_ITER"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_posteriors</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">epsilon</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.0001</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.EMQ.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.EMQ.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<spanclass="sig-name descname"><spanclass="pre">predict_proba</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">epsilon</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.0001</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.EMQ.predict_proba"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ExpectationMaximizationQuantifier</span></span><aclass="headerlink"href="#quapy.method.aggregative.ExpectationMaximizationQuantifier"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.EMQ"title="quapy.method.aggregative.EMQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.EMQ</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ExplicitLossMinimisation</span></span><aclass="headerlink"href="#quapy.method.aggregative.ExplicitLossMinimisation"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.ELM"title="quapy.method.aggregative.ELM"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.ELM</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">HDy</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.HDy"title="Permalink to this definition">¶</a></dt>
HDy is a probabilistic method for training binary quantifiers, that models quantification as the problem of
minimizing the divergence (in terms of the Hellinger Distance) between two cumulative distributions of posterior
probabilities returned by the classifier. One of the distributions is generated from the unlabelled examples and
the other is generated from a validation set. This latter distribution is defined as a mixture of the
class-conditional distributions of the posterior probabilities returned for the positive and negative validation
examples, respectively. The parameters of the mixture thus represent the estimates of the class prevalence values.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a binary classifier</p></li>
<li><p><strong>val_split</strong>– a float in range (0,1) indicating the proportion of data to be used as a stratified held-out
validation distribution, or a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_posteriors</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.HDy.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a><spanclass="p"><spanclass="pre">]</span></span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.HDy.fit"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">HellingerDistanceY</span></span><aclass="headerlink"href="#quapy.method.aggregative.HellingerDistanceY"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.HDy"title="quapy.method.aggregative.HDy"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.HDy</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MAX</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.MAX"title="Permalink to this definition">¶</a></dt>
<p>Threshold Optimization variant for <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ACC</span></code></a> as proposed by
<aclass="reference external"href="https://dl.acm.org/doi/abs/10.1145/1150402.1150423">Forman 2006</a> and
<aclass="reference external"href="https://link.springer.com/article/10.1007/s10618-008-0097-y">Forman 2008</a> that looks
for the threshold that maximizes <cite>tpr-fpr</cite>.
The goal is to bring improved stability to the denominator of the adjustment.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a classifier</p></li>
<li><p><strong>val_split</strong>– indicates the proportion of data to be used as a stratified held-out validation set in which the
misclassification rates are to be estimated.
This parameter can be indicated as a real value (between 0 and 1, default 0.4), representing a proportion of
validation data, or as an integer, indicating that the misclassification rates should be estimated via
<cite>k</cite>-fold cross validation (this integer stands for the number of folds <cite>k</cite>), or as a
<aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MS</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.MS"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MS2</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.MS2"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MedianSweep</span></span><aclass="headerlink"href="#quapy.method.aggregative.MedianSweep"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.MS"title="quapy.method.aggregative.MS"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.MS</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MedianSweep2</span></span><aclass="headerlink"href="#quapy.method.aggregative.MedianSweep2"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.MS2"title="quapy.method.aggregative.MS2"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.MS2</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">OneVsAll</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">binary_quantifier</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">n_jobs</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">-</span><spanclass="pre">1</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll"title="Permalink to this definition">¶</a></dt>
<p>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.
This variant was used, along with the <aclass="reference internal"href="#quapy.method.aggregative.EMQ"title="quapy.method.aggregative.EMQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EMQ</span></code></a> quantifier, in
<aclass="reference external"href="https://link.springer.com/content/pdf/10.1007/s13278-016-0327-z.pdf">Gao and Sebastiani, 2016</a>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a binary classifier</p></li>
<li><p><strong>n_jobs</strong>– number of parallel workers</p></li>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions_bin</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.aggregate"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">binary</span></span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.binary"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.classes_"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">classify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.classify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.get_params"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">posterior_probabilities</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.posterior_probabilities"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a matrix of shape <cite>(n,m,2)</cite> with <cite>n</cite> the number of instances and <cite>m</cite> the number of classes. The entry
<cite>(i,j,1)</cite> (resp. <cite>(i,j,0)</cite>) is a value in [0,1] indicating the posterior probability that instance <cite>i</cite> belongs
(resp. does not belong) to class <cite>j</cite>.
The posterior probabilities are independent of each other, meaning that, in general, they do not sum
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">probabilistic</span></span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.probabilistic"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.quantify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.OneVsAll.set_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">PACC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PACC"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_posteriors</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PACC.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">classify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PACC.classify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="pre">int</span><spanclass="p"><spanclass="pre">,</span></span><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a><spanclass="p"><spanclass="pre">]</span></span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PACC.fit"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">PCC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PCC"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_posteriors</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PCC.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.PCC.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ProbabilisticAdjustedClassifyAndCount</span></span><aclass="headerlink"href="#quapy.method.aggregative.ProbabilisticAdjustedClassifyAndCount"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.PACC"title="quapy.method.aggregative.PACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.PACC</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ProbabilisticClassifyAndCount</span></span><aclass="headerlink"href="#quapy.method.aggregative.ProbabilisticClassifyAndCount"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.PCC"title="quapy.method.aggregative.PCC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.PCC</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SLD</span></span><aclass="headerlink"href="#quapy.method.aggregative.SLD"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <aclass="reference internal"href="#quapy.method.aggregative.EMQ"title="quapy.method.aggregative.EMQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.EMQ</span></code></a></p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SVMAE</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.SVMAE"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SVMKLD</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.SVMKLD"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SVMNKLD</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.SVMNKLD"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SVMQ</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.SVMQ"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">SVMRAE</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">svmperf_base</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.SVMRAE"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">T50</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.T50"title="Permalink to this definition">¶</a></dt>
<p>Threshold Optimization variant for <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ACC</span></code></a> as proposed by
<aclass="reference external"href="https://dl.acm.org/doi/abs/10.1145/1150402.1150423">Forman 2006</a> and
<aclass="reference external"href="https://link.springer.com/article/10.1007/s10618-008-0097-y">Forman 2008</a> that looks
for the threshold that makes <cite>tpr</cite> cosest to 0.5.
The goal is to bring improved stability to the denominator of the adjustment.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a classifier</p></li>
<li><p><strong>val_split</strong>– indicates the proportion of data to be used as a stratified held-out validation set in which the
misclassification rates are to be estimated.
This parameter can be indicated as a real value (between 0 and 1, default 0.4), representing a proportion of
validation data, or as an integer, indicating that the misclassification rates should be estimated via
<cite>k</cite>-fold cross validation (this integer stands for the number of folds <cite>k</cite>), or as a
<aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">ThresholdOptimization</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization"title="Permalink to this definition">¶</a></dt>
<p>Abstract class of Threshold Optimization variants for <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ACC</span></code></a> as proposed by
<aclass="reference external"href="https://dl.acm.org/doi/abs/10.1145/1150402.1150423">Forman 2006</a> and
<spanclass="sig-name descname"><spanclass="pre">aggregate</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">classif_predictions</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.aggregate"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="pre">int</span><spanclass="p"><spanclass="pre">,</span></span><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a><spanclass="p"><spanclass="pre">]</span></span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.fit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p></li>
<li><p><strong>fit_learner</strong>– whether or not to train the learner (default is True). Set to False if the
learner has been trained outside the quantifier.</p></li>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">X</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">sklearn.base.BaseEstimator</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.4</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.X"title="Permalink to this definition">¶</a></dt>
<p>Threshold Optimization variant for <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ACC</span></code></a> as proposed by
<aclass="reference external"href="https://dl.acm.org/doi/abs/10.1145/1150402.1150423">Forman 2006</a> and
<aclass="reference external"href="https://link.springer.com/article/10.1007/s10618-008-0097-y">Forman 2008</a> that looks
for the threshold that yields <cite>tpr=1-fpr</cite>.
The goal is to bring improved stability to the denominator of the adjustment.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>learner</strong>– a sklearn’s Estimator that generates a classifier</p></li>
<li><p><strong>val_split</strong>– indicates the proportion of data to be used as a stratified held-out validation set in which the
misclassification rates are to be estimated.
This parameter can be indicated as a real value (between 0 and 1, default 0.4), representing a proportion of
validation data, or as an integer, indicating that the misclassification rates should be estimated via
<cite>k</cite>-fold cross validation (this integer stands for the number of folds <cite>k</cite>), or as a
<aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<spanid="quapy-method-base-module"></span><h2>quapy.method.base module<aclass="headerlink"href="#module-quapy.method.base"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.base.</span></span><spanclass="sig-name descname"><spanclass="pre">BaseQuantifier</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier"title="Permalink to this definition">¶</a></dt>
<p>Abstract Quantifier. A quantifier is defined as an object of a class that implements the method <aclass="reference internal"href="#quapy.method.base.BaseQuantifier.fit"title="quapy.method.base.BaseQuantifier.fit"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">fit()</span></code></a> on
<aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a>, the method <aclass="reference internal"href="#quapy.method.base.BaseQuantifier.quantify"title="quapy.method.base.BaseQuantifier.quantify"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">quantify()</span></code></a>, and the <aclass="reference internal"href="#quapy.method.base.BaseQuantifier.set_params"title="quapy.method.base.BaseQuantifier.set_params"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">set_params()</span></code></a> and
<aclass="reference internal"href="#quapy.method.base.BaseQuantifier.get_params"title="quapy.method.base.BaseQuantifier.get_params"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">get_params()</span></code></a> for model selection (see <aclass="reference internal"href="quapy.html#quapy.model_selection.GridSearchQ"title="quapy.model_selection.GridSearchQ"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">quapy.model_selection.GridSearchQ()</span></code></a>)</p>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">aggregative</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.aggregative"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">binary</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.binary"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.classes_"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.fit"title="Permalink to this definition">¶</a></dt>
<ddclass="field-odd"><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.get_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">n_classes</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.n_classes"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">probabilistic</span></span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.probabilistic"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.quantify"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.BaseQuantifier.set_params"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.base.</span></span><spanclass="sig-name descname"><spanclass="pre">BinaryQuantifier</span></span><aclass="headerlink"href="#quapy.method.base.BinaryQuantifier"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">binary</span></span><aclass="headerlink"href="#quapy.method.base.BinaryQuantifier.binary"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.base.</span></span><spanclass="sig-name descname"><spanclass="pre">isaggregative</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">model</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="#quapy.method.base.BaseQuantifier"title="quapy.method.base.BaseQuantifier"><spanclass="pre">quapy.method.base.BaseQuantifier</span></a></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.isaggregative"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.base.</span></span><spanclass="sig-name descname"><spanclass="pre">isbinary</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">model</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="#quapy.method.base.BaseQuantifier"title="quapy.method.base.BaseQuantifier"><spanclass="pre">quapy.method.base.BaseQuantifier</span></a></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.isbinary"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.base.</span></span><spanclass="sig-name descname"><spanclass="pre">isprobabilistic</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">model</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="#quapy.method.base.BaseQuantifier"title="quapy.method.base.BaseQuantifier"><spanclass="pre">quapy.method.base.BaseQuantifier</span></a></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.base.isprobabilistic"title="Permalink to this definition">¶</a></dt>
<spanid="quapy-method-meta-module"></span><h2>quapy.method.meta module<aclass="headerlink"href="#module-quapy.method.meta"title="Permalink to this headline">¶</a></h2>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">EACC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_grid</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">optim</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_mod_sel</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.EACC"title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an ensemble of <aclass="reference internal"href="#quapy.method.aggregative.ACC"title="quapy.method.aggregative.ACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.ACC</span></code></a> quantifiers, as used by
<aclass="reference external"href="https://www.sciencedirect.com/science/article/pii/S1566253517303652">Pérez-Gállego et al., 2019</a>.</p>
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">ECC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_grid</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">optim</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_mod_sel</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.ECC"title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an ensemble of <aclass="reference internal"href="#quapy.method.aggregative.CC"title="quapy.method.aggregative.CC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.CC</span></code></a> quantifiers, as used by
<aclass="reference external"href="https://www.sciencedirect.com/science/article/pii/S1566253517303652">Pérez-Gállego et al., 2019</a>.</p>
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">EEMQ</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_grid</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">optim</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_mod_sel</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.EEMQ"title="Permalink to this definition">¶</a></dt>
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">EHDy</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_grid</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">optim</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_mod_sel</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.EHDy"title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an ensemble of <aclass="reference internal"href="#quapy.method.aggregative.HDy"title="quapy.method.aggregative.HDy"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.HDy</span></code></a> quantifiers, as used by
<aclass="reference external"href="https://www.sciencedirect.com/science/article/pii/S1566253517303652">Pérez-Gállego et al., 2019</a>.</p>
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">EPACC</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">learner</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_grid</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">optim</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">param_mod_sel</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.EPACC"title="Permalink to this definition">¶</a></dt>
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-name descname"><spanclass="pre">VALID_POLICIES</span></span><emclass="property"><spanclass="pre">=</span><spanclass="pre">{'ave',</span><spanclass="pre">'ds',</span><spanclass="pre">'mae',</span><spanclass="pre">'mkld',</span><spanclass="pre">'mnkld',</span><spanclass="pre">'mrae',</span><spanclass="pre">'mse',</span><spanclass="pre">'ptr'}</span></em><aclass="headerlink"href="#quapy.method.meta.Ensemble.VALID_POLICIES"title="Permalink to this definition">¶</a></dt>
<li><p><strong>quantifier</strong>– base quantification member of the ensemble</p></li>
<li><p><strong>size</strong>– number of members</p></li>
<li><p><strong>red_size</strong>– number of members to retain after selection (depending on the policy)</p></li>
<li><p><strong>min_pos</strong>– minimum number of positive instances to consider a sample as valid</p></li>
<li><p><strong>policy</strong>– the selection policy; available policies include: <cite>ave</cite> (default), <cite>ptr</cite>, <cite>ds</cite>, and accuracy
(which is instantiated via a valid error name, e.g., <cite>mae</cite>)</p></li>
<li><p><strong>max_sample_size</strong>– maximum number of instances to consider in the samples (set to None
to indicate no limit, default)</p></li>
<li><p><strong>val_split</strong>– a float in range (0,1) indicating the proportion of data to be used as a stratified held-out
validation split, or a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> (the split itself).</p></li>
<li><p><strong>n_jobs</strong>– number of parallel workers (default 1)</p></li>
<li><p><strong>verbose</strong>– set to True (default is False) to get some information in standard output</p></li>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">aggregative</span></span><aclass="headerlink"href="#quapy.method.meta.Ensemble.aggregative"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">binary</span></span><aclass="headerlink"href="#quapy.method.meta.Ensemble.binary"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.meta.Ensemble.classes_"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">val_split</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a><spanclass="p"><spanclass="pre">]</span></span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.fit"title="Permalink to this definition">¶</a></dt>
<ddclass="field-odd"><p><strong>data</strong>– a <aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.data.base.LabelledCollection</span></code></a> consisting of the training data</p>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.get_params"title="Permalink to this definition">¶</a></dt>
<dd><p>This function should not be used within <aclass="reference internal"href="quapy.html#quapy.model_selection.GridSearchQ"title="quapy.model_selection.GridSearchQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.model_selection.GridSearchQ</span></code></a> (is here for compatibility
with the abstract class).
Instead, use <cite>Ensemble(GridSearchQ(q),…)</cite>, with <cite>q</cite> a Quantifier (recommended), or
<cite>Ensemble(Q(GridSearchCV(l)))</cite> with <cite>Q</cite> a quantifier class that has a learner <cite>l</cite> optimized for</p>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">probabilistic</span></span><aclass="headerlink"href="#quapy.method.meta.Ensemble.probabilistic"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.quantify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.set_params"title="Permalink to this definition">¶</a></dt>
<dd><p>This function should not be used within <aclass="reference internal"href="quapy.html#quapy.model_selection.GridSearchQ"title="quapy.model_selection.GridSearchQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.model_selection.GridSearchQ</span></code></a> (is here for compatibility
with the abstract class).
Instead, use <cite>Ensemble(GridSearchQ(q),…)</cite>, with <cite>q</cite> a Quantifier (recommended), or
<cite>Ensemble(Q(GridSearchCV(l)))</cite> with <cite>Q</cite> a quantifier class that has a learner <cite>l</cite> optimized for</p>
<dd><p>Ensemble factory. Provides a unified interface for instantiating ensembles that can be optimized (via model
selection for quantification) for a given evaluation metric using <aclass="reference internal"href="quapy.html#quapy.model_selection.GridSearchQ"title="quapy.model_selection.GridSearchQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.model_selection.GridSearchQ</span></code></a>.
If the evaluation metric is classification-oriented
(instead of quantification-oriented), then the optimization will be carried out via sklearn’s
<p>Example to instantiate an <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a> based on <aclass="reference internal"href="#quapy.method.aggregative.PACC"title="quapy.method.aggregative.PACC"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.method.aggregative.PACC</span></code></a>
in which the base members are optimized for <aclass="reference internal"href="quapy.html#quapy.error.mae"title="quapy.error.mae"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">quapy.error.mae()</span></code></a> via
<aclass="reference internal"href="quapy.html#quapy.model_selection.GridSearchQ"title="quapy.model_selection.GridSearchQ"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">quapy.model_selection.GridSearchQ</span></code></a>. The ensemble follows the policy <cite>Accuracy</cite> based
on <aclass="reference internal"href="quapy.html#quapy.error.mae"title="quapy.error.mae"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">quapy.error.mae()</span></code></a> (the same measure being optimized),
meaning that a static selection of members of the ensemble is made based on their performance
<li><p><strong>kwargs</strong>– kwargs for the class <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an instance of <aclass="reference internal"href="#quapy.method.meta.Ensemble"title="quapy.method.meta.Ensemble"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Ensemble</span></code></a></p>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.meta.</span></span><spanclass="sig-name descname"><spanclass="pre">get_probability_distribution</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">posterior_probabilities</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">bins</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">8</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.get_probability_distribution"title="Permalink to this definition">¶</a></dt>
<spanid="quapy-method-neural-module"></span><h2>quapy.method.neural module<aclass="headerlink"href="#module-quapy.method.neural"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">device</span></span><aclass="headerlink"href="#quapy.method.neural.QuaNetModule.device"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">forward</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">doc_embeddings</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">doc_posteriors</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">statistics</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetModule.forward"title="Permalink to this definition">¶</a></dt>
<dd><p>Defines the computation performed at every call.</p>
<p>Should be overridden by all subclasses.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>Although the recipe for forward pass needs to be defined within
this function, one should call the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Module</span></code> instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.</p>
<spanclass="sig-name descname"><spanclass="pre">init_hidden</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetModule.init_hidden"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.classes_"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">clean_checkpoint</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.clean_checkpoint"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">clean_checkpoint_dir</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.clean_checkpoint_dir"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">fit_learner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.fit"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">get_aggregative_estims</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">posteriors</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.get_aggregative_estims"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.get_params"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.quantify"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.QuaNetTrainer.set_params"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.neural.</span></span><spanclass="sig-name descname"><spanclass="pre">mae_loss</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">output</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">target</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.neural.mae_loss"title="Permalink to this definition">¶</a></dt>
<spanid="quapy-method-non-aggregative-module"></span><h2>quapy.method.non_aggregative module<aclass="headerlink"href="#module-quapy.method.non_aggregative"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">quapy.method.non_aggregative.</span></span><spanclass="sig-name descname"><spanclass="pre">MaximumLikelihoodPrevalenceEstimation</span></span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">classes_</span></span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.classes_"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">fit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><aclass="reference internal"href="quapy.data.html#quapy.data.base.LabelledCollection"title="quapy.data.base.LabelledCollection"><spanclass="pre">quapy.data.base.LabelledCollection</span></a></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.fit"title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the training prevalence and stores it.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>data</strong>– the training sample</p>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">deep</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.get_params"title="Permalink to this definition">¶</a></dt>
<dd><p>Does nothing, since this learner has no parameters.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>deep</strong>– for compatibility with sklearn</p>
<spanclass="sig-name descname"><spanclass="pre">quantify</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">instances</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.quantify"title="Permalink to this definition">¶</a></dt>
<dd><p>Ignores the input instances and returns, as the class prevalence estimantes, the training prevalence.</p>
<spanclass="sig-name descname"><spanclass="pre">set_params</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">parameters</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.set_params"title="Permalink to this definition">¶</a></dt>