File label_binning.hpp¶
-
namespace boosting
-
struct LabelInfo¶
- #include <label_binning.hpp>
Stores information about a vector that provides access to the statistics for individual labels. This includes the number of positive and negative bins, the labels should be assigned to, as well as the minimum and maximum statistic in the vector.
Public Members
-
class ILabelBinning¶
- #include <label_binning.hpp>
Defines an interface for methods that assign labels to bins, based on the corresponding gradients and Hessians.
Public Types
Public Functions
-
inline virtual ~ILabelBinning()¶
-
virtual uint32 getMaxBins(uint32 numLabels) const = 0¶
Returns an upper bound for the number of bins used by the binning method, given a specific number of labels for which rules may predict.
- Parameters:
numLabels – The number of labels for which rules may predict
- Returns:
The maximum number of bins used by the binning method
-
virtual LabelInfo getLabelInfo(View<float64>::const_iterator criteria, uint32 numCriteria) const = 0¶
Retrieves and returns information that is required to apply the binning method.
This function must be called prior to the function
createBinsto obtain information, e.g. the number of bins to be used, that is required to apply the binning method. This function may also be used to prepare, e.g. sort, the given vector. TheLabelInforeturned by this function must be passed to the functioncreateBinslater on.- Parameters:
criteria – An iterator to the label-wise criteria that should be used to assign individual labels to bins
numCriteria – The number of label-wise criteria
- Returns:
A struct of type
LabelInfothat stores the information
-
virtual void createBins(LabelInfo labelInfo, View<float64>::const_iterator criteria, uint32 numCriteria, Callback callback, ZeroCallback zeroCallback) const = 0¶
Assigns the labels to bins based on label-wise criteria.
- Parameters:
labelInfo – A struct of type
LabelInfothat stores information that is required to apply the binning methodcriteria – An iterator to the label-wise criteria that should be used to assign individual labels to bins
numCriteria – The number of label-wise criteria
callback – A callback that is invoked when a label is assigned to a bin
zeroCallback – A callback that is invoked when a label for which the criterion is zero is encountered
-
inline virtual ~ILabelBinning()¶
-
class ILabelBinningFactory¶
- #include <label_binning.hpp>
Defines an interface for all factories that allows to create instances of the type
ILabelBinning.Public Functions
-
inline virtual ~ILabelBinningFactory()¶
-
virtual std::unique_ptr<ILabelBinning> create() const = 0¶
Creates and returns a new object of type
ILabelBinning.- Returns:
An unique pointer to an object of type
ILabelBinningthat has been created
-
inline virtual ~ILabelBinningFactory()¶
-
class ILabelBinningConfig¶
- #include <label_binning.hpp>
Defines an interface for all classes that allow to configure a method that assigns labels to bins.
Subclassed by boosting::AutomaticLabelBinningConfig, boosting::EqualWidthLabelBinningConfig, boosting::NoLabelBinningConfig
Public Functions
-
inline virtual ~ILabelBinningConfig()¶
-
virtual std::unique_ptr<IDecomposableRuleEvaluationFactory> createDecomposableCompleteRuleEvaluationFactory() const = 0¶
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 = 0¶
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 = 0¶
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 Blas &blas, const Lapack &lapack) const = 0¶
Creates and returns a new object of type
INonDecomposableRuleEvaluationFactorythat allows to calculate the predictions of complete rules according to the specified configuration.- Parameters:
- 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 Blas &blas, const Lapack &lapack) const = 0¶
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
blas – A reference to an object of type
Blasthat allows to execute BLAS routineslapack – A reference to an object of type
Lapackthat allows to execute 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 Blas &blas, const Lapack &lapack) const = 0¶
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
blas – A reference to an object of type
Blasthat allows to execute BLAS routineslapack – A reference to an object of type
Lapackthat allows to execute LAPACK routines
- Returns:
An unique pointer to an object of type
INonDecomposableRuleEvaluationFactorythat has been created
-
inline virtual ~ILabelBinningConfig()¶
-
struct LabelInfo¶