File label_binning_equal_width.hpp¶
-
namespace boosting
-
class IEqualWidthLabelBinningConfig¶
- #include <label_binning_equal_width.hpp>
Defines an interface for all classes that allow to configure a method that assigns labels to bins in a way such that each bin contains labels for which the predicted score is expected to belong to the same value range.
Subclassed by boosting::EqualWidthLabelBinningConfig
Public Functions
-
inline virtual ~IEqualWidthLabelBinningConfig()¶
-
virtual float32 getBinRatio() const = 0¶
Returns the percentage that specifies how many bins are used.
- Returns:
The percentage that specifies how many bins are used
-
virtual IEqualWidthLabelBinningConfig &setBinRatio(float32 binRatio) = 0¶
Sets the percentage that specifies how many should be used.
- Parameters:
binRatio – A percentage that specifies how many bins should be used, e.g., if 100 labels are available, a percentage of 0.5 means that
ceil(0.5 * 100) = 50bins should be used. Must be in (0, 1)- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
virtual uint32 getMinBins() const = 0¶
Returns the minimum number of bins that is used.
- Returns:
The minimum number of bins that is used
-
virtual IEqualWidthLabelBinningConfig &setMinBins(uint32 minBins) = 0¶
Sets the minimum number of bins that should be used.
- Parameters:
minBins – The minimum number of bins that should be used. Must be at least 1
- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
virtual uint32 getMaxBins() const = 0¶
Returns the maximum number of bins that is used.
- Returns:
The maximum number of bins that is used
-
virtual IEqualWidthLabelBinningConfig &setMaxBins(uint32 maxBins) = 0¶
Sets the maximum number of bins that should be used.
- Parameters:
maxBins – The maximum number of bins that should be used. Must be at least the minimum number of bins or 0, if the maximum number of bins should not be restricted
- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
inline virtual ~IEqualWidthLabelBinningConfig()¶
-
class EqualWidthLabelBinningConfig : public boosting::ILabelBinningConfig, public boosting::IEqualWidthLabelBinningConfig¶
- #include <label_binning_equal_width.hpp>
Allows to configure a method that assigns labels to bins in a way such that each bin contains labels for which the predicted score is expected to belong to the same value range.
Public Functions
-
EqualWidthLabelBinningConfig(ReadableProperty<IRegularizationConfig> l1RegularizationConfig, ReadableProperty<IRegularizationConfig> l2RegularizationConfig)¶
- Parameters:
l1RegularizationConfig – A
ReadablePropertythat allows to access theIRegularizationConfigthat stores the configuration of the L1 regularizationl2RegularizationConfig – A
ReadablePropertythat allows to access theIRegularizationConfigthat stores the configuration of the L2 regularization
-
virtual float32 getBinRatio() const override¶
Returns the percentage that specifies how many bins are used.
- Returns:
The percentage that specifies how many bins are used
-
virtual IEqualWidthLabelBinningConfig &setBinRatio(float32 binRatio) override¶
Sets the percentage that specifies how many should be used.
- Parameters:
binRatio – A percentage that specifies how many bins should be used, e.g., if 100 labels are available, a percentage of 0.5 means that
ceil(0.5 * 100) = 50bins should be used. Must be in (0, 1)- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
virtual uint32 getMinBins() const override¶
Returns the minimum number of bins that is used.
- Returns:
The minimum number of bins that is used
-
virtual IEqualWidthLabelBinningConfig &setMinBins(uint32 minBins) override¶
Sets the minimum number of bins that should be used.
- Parameters:
minBins – The minimum number of bins that should be used. Must be at least 1
- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
virtual uint32 getMaxBins() const override¶
Returns the maximum number of bins that is used.
- Returns:
The maximum number of bins that is used
-
virtual IEqualWidthLabelBinningConfig &setMaxBins(uint32 maxBins) override¶
Sets the maximum number of bins that should be used.
- Parameters:
maxBins – The maximum number of bins that should be used. Must be at least the minimum number of bins or 0, if the maximum number of bins should not be restricted
- Returns:
A reference to an object of type
EqualWidthLabelBinningConfigthat allows further configuration of the method that assigns labels to bins
-
virtual std::unique_ptr<IDecomposableRuleEvaluationFactory> createDecomposableCompleteRuleEvaluationFactory() const override¶
Creates and returns a new object of type
IDecomposableRuleEvaluationFactorythat allows to calculate the predictions of complete rules according to the specified configuration.- Returns:
An unique pointer to an object of type
IDecomposableRuleEvaluationFactorythat has been created
-
virtual std::unique_ptr<ISparseDecomposableRuleEvaluationFactory> createDecomposableFixedPartialRuleEvaluationFactory(float32 outputRatio, uint32 minOutputs, uint32 maxOutputs) const override¶
Creates and returns a new object of type
ISparseDecomposableRuleEvaluationFactorythat allows to calculate the prediction of partial rules, which predict for a predefined number of outputs, according to the specified configuration.- Parameters:
outputRatio – A percentage that specifies for how many outputs the rule heads should predict
minOutputs – The minimum number of outputs for which the rule heads should predict
maxOutputs – The maximum number of outputs for which the rule heads should predict
- Returns:
An unique pointer to an object of type
ISparseDecomposableRuleEvaluationFactorythat has been created
-
virtual std::unique_ptr<ISparseDecomposableRuleEvaluationFactory> createDecomposableDynamicPartialRuleEvaluationFactory(float32 threshold, float32 exponent) const override¶
Creates and returns a new object of type
ISparseDecomposableRuleEvaluationFactorythat allows to calculate the prediction of partial rules, which predict for a subset of the available outputs that is determined dynamically, according to the specified configuration.- Parameters:
threshold – A threshold that affects for how many outputs the rule heads should predict
exponent – An exponent that is used to weigh the estimated predictive quality for individual outputs
- Returns:
An unique pointer to an object of type
ISparseDecomposableRuleEvaluationFactorythat has been created
-
virtual std::unique_ptr<INonDecomposableRuleEvaluationFactory> createNonDecomposableCompleteRuleEvaluationFactory(const BlasFactory &blasFactory, const LapackFactory &lapackFactory) const override¶
Creates and returns a new object of type
INonDecomposableRuleEvaluationFactorythat allows to calculate the predictions of complete rules according to the specified configuration.- Parameters:
blasFactory – A reference to an object of type
BlasFactorythat allows to create objects for executing BLAS routineslapackFactory – A reference to an object of type
LapackFactorythat allows to create objects for executing LAPACK routines
- Returns:
An unique pointer to an object of type
INonDecomposableRuleEvaluationFactorythat has been created
-
virtual std::unique_ptr<INonDecomposableRuleEvaluationFactory> createNonDecomposableFixedPartialRuleEvaluationFactory(float32 outputRatio, uint32 minOutputs, uint32 maxOutputs, const BlasFactory &blasFactory, const LapackFactory &lapackFactory) const override¶
Creates and returns a new object of type
INonDecomposableRuleEvaluationFactorythat allows to calculate the predictions of partial rules, which predict for a predefined number of outputs, according to the specified configuration.- Parameters:
outputRatio – A percentage that specifies for how many outputs the rule heads should predict
minOutputs – The minimum number of outputs for which the rule heads should predict
maxOutputs – The maximum number of outputs for which the rule heads should predict
blasFactory – A reference to an object of type
BlasFactorythat allows to create objects for executing BLAS routineslapackFactory – A reference to an object of type
LapackFactorythat allows to create objects for executing LAPACK routines
- Returns:
An unique pointer to an object of type
INonDecomposableRuleEvaluationFactorythat has been created
-
virtual std::unique_ptr<INonDecomposableRuleEvaluationFactory> createNonDecomposableDynamicPartialRuleEvaluationFactory(float32 threshold, float32 exponent, const BlasFactory &blasFactory, const LapackFactory &lapackFactory) const override¶
Creates and returns a new object of type
INonDecomposableRuleEvaluationFactorythat allows to calculate the predictions of partial rules, which predict for a subset of the available labels that is determined dynamically, according to the specified configuration.- Parameters:
threshold – A threshold that affects for how many labels the rule heads should predict
exponent – An exponent that is used to weigh the estimated predictive quality for individual labels
blasFactory – A reference to an object of type
BlasFactorythat allows to create objects for executing BLAS routineslapackFactory – A reference to an object of type
LapackFactorythat allows to create objects for executing LAPACK routines
- Returns:
An unique pointer to an object of type
INonDecomposableRuleEvaluationFactorythat has been created
Private Members
-
const ReadableProperty<IRegularizationConfig> l1RegularizationConfig_¶
-
const ReadableProperty<IRegularizationConfig> l2RegularizationConfig_¶
-
EqualWidthLabelBinningConfig(ReadableProperty<IRegularizationConfig> l1RegularizationConfig, ReadableProperty<IRegularizationConfig> l2RegularizationConfig)¶
-
class IEqualWidthLabelBinningConfig¶