<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>
<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>
<dd><p>Trains a ACC quantifier
:param data: the training set
:param fit_learner: set to False to bypass the training (the learner is assumed to be already fit)
:param val_split: either a float in (0,1) indicating the proportion of training instances to use for</p>
<blockquote>
<div><p>validation (e.g., 0.3 for using 30% of the training set as validation data), or a LabelledCollection
indicating the validation set itself, or an int indicating the number k of folds to be used in kFCV
<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>
<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>
<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>
<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>
<emclass="property"><spanclass="pre">property</span></em><spanclass="sig-name descname"><spanclass="pre">n_classes</span></span><aclass="headerlink"href="#quapy.method.aggregative.AggregativeQuantifier.n_classes"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></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.CC.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.CC.fit"title="Permalink to this definition">¶</a></dt>
<dd><p>Trains the Classify & Count method unless _fit_learner_ is False, in which case it is assumed to be already fit.
:param data: training data
:param fit_learner: if False, the classifier is assumed to be fit
<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>
<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>
<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>
<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>
<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>
<dd><p>Trains a HDy quantifier
:param data: the training set
:param fit_learner: set to False to bypass the training (the learner is assumed to be already fit)
:param val_split: either a float in (0,1) indicating the proportion of training instances to use for</p>
<blockquote>
<div><p>validation (e.g., 0.3 for using 30% of the training set as validation data), or a LabelledCollection
<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>
<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>
<spanclass="sig-name descname"><spanclass="pre">optimize_threshold</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">probabilities</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.MS.optimize_threshold"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-name descname"><spanclass="pre">optimize_threshold</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">probabilities</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.MS2.optimize_threshold"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>
<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>
<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>
<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>
<dd><p>Trains a PACC quantifier
:param data: the training set
:param fit_learner: set to False to bypass the training (the learner is assumed to be already fit)
:param val_split: either a float in (0,1) indicating the proportion of training instances to use for</p>
<blockquote>
<div><p>validation (e.g., 0.3 for using 30% of the training set as validation data), or a LabelledCollection
indicating the validation set itself, or an int indicating the number k of folds to be used in kFCV
<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>
<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>
<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>
<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>
<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">compute_fpr</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">FP</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">TN</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.compute_fpr"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">compute_table</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">y_</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.compute_table"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">compute_tpr</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">TP</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">FP</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.compute_tpr"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>
<spanclass="sig-name descname"><spanclass="pre">optimize_threshold</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">probabilities</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.aggregative.ThresholdOptimization.optimize_threshold"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">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>
<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>
<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>
<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">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>
<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>
<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>
<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>
<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>
<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>
<dd><p>Methods from the articles:
Pérez-Gállego, P., Quevedo, J. R., & del Coz, J. J. (2017).
Using ensembles for problems with characterizable changes in data distribution: A case study on quantification.
Information Fusion, 34, 87-100.
and
Pérez-Gállego, P., Castano, A., Quevedo, J. R., & del Coz, J. J. (2019).
Dynamic ensemble selection for quantification tasks.
<spanclass="sig-name descname"><spanclass="pre">accuracy_policy</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">error_name</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.accuracy_policy"title="Permalink to this definition">¶</a></dt>
<dd><p>Selects the red_size best performant quantifiers in a static way (i.e., dropping all non-selected instances).
For each model in the ensemble, the performance is measured in terms of _error_name_ on the quantification of
the samples used for training the rest of the models in the ensemble.</p>
<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">ds_policy</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">predictions</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">test</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.ds_policy"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">ds_policy_get_posteriors</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.meta.Ensemble.ds_policy_get_posteriors"title="Permalink to this definition">¶</a></dt>
<dd><p>In the original article, this procedure is not described in a sufficient level of detail. The paper only says
that the distribution of posterior probabilities from training and test examples is compared by means of the
Hellinger Distance. However, how these posterior probabilities are generated is not specified. In the article,
a Logistic Regressor (LR) is used as the classifier device and that could be used for this purpose. However, in
general, a Quantifier is not necessarily an instance of Aggreggative Probabilistic Quantifiers, and so, that the
quantifier builds on top of a probabilistic classifier cannot be given for granted. Additionally, it would not
be correct to generate the posterior probabilities for training documents that have concurred in training the
classifier that generates them.
This function thus generates the posterior probabilities for all training documents in a cross-validation way,
using a LR with hyperparameters that have previously been optimized via grid search in 5FCV.
:return P,f, where P is a ndarray containing the posterior probabilities of the training data, generated via
cross-validation and using an optimized LR, and the function to be used in order to generate posterior
<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>
<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>
<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">ptr_policy</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">predictions</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.ptr_policy"title="Permalink to this definition">¶</a></dt>
<dd><p>Selects the predictions made by models that have been trained on samples with a prevalence that is most similar
to a first approximation of the test prevalence as made by all models in the ensemble.</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.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>
<spanclass="sig-name descname"><spanclass="pre">sout</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">msg</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.meta.Ensemble.sout"title="Permalink to this definition">¶</a></dt>
<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>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>data</strong>– the training data on which to train QuaNet. If fit_learner=True, the data will be split in</p>
</dd>
</dl>
<p>40/40/20 for training the classifier, training QuaNet, and validating QuaNet, respectively. If
fit_learner=False, the data will be split in 66/34 for training QuaNet and validating it, respectively.
:param fit_learner: if true, trains the classifier on a split containing 40% of the data
<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><spanclass="sig-paren">(</span><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.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>, <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.non_aggregative.MaximumLikelihoodPrevalenceEstimation.fit"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">get_params</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#quapy.method.non_aggregative.MaximumLikelihoodPrevalenceEstimation.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">documents</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.non_aggregative.MaximumLikelihoodPrevalenceEstimation.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.non_aggregative.MaximumLikelihoodPrevalenceEstimation.set_params"title="Permalink to this definition">¶</a></dt>