mlrl.seco.cython.heuristic module

@author: Michael Rapp (michael.rapp.ml@gmail.com)

class mlrl.seco.cython.heuristic.FMeasureConfig

Bases: object

Allows to configure a heuristic that calculates as the (weighted) harmonic mean between the heuristics “Precision” and “Recall”, where the parameter “beta” allows to trade off between both heuristics. If beta = 1, both heuristics are weighed equally. If beta = 0, this heuristic is equivalent to “Precision”. As beta approaches infinity, this heuristic becomes equivalent to “Recall”.

get_beta() float

Returns the value of the “beta” parameter.

Returns:

The value of the “beta” parameter

set_beta(beta: float) FMeasureConfig

Sets the value of the “beta” parameter.

Parameters:

beta – The value of the “beta” parameter. Must be at least 0

Returns:

A FMeasureConfig that allows further configuration of the heuristic

class mlrl.seco.cython.heuristic.MEstimateConfig

Bases: object

Allows to configure a heuristic that trades off between the heuristics “Precision” and “WRA”, where the “m” parameter controls the trade-off between both heuristics. If m = 0, this heuristic is equivalent to “Precision”. As m approaches infinity, the isometrics of this heuristic become equivalent to those of “WRA”.

get_m() float

Returns the value of the “m” parameter.

Returns:

The value of the “m” parameter

set_m(m: float) MEstimateConfig

Sets the value of the “m” parameter.

Parameters:

m – The value of the “m” parameter. Must be at least 0

Returns:

A MEstimateConfig that allows further configuration of the heuristic