File label_binning.hpp¶
-
namespace boosting
-
template<typename CriterionType>
struct LabelInfo¶ - #include <label_binning.hpp>
Stores information about a vector that provides access to the binning criteria 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 criterion in the vector.
Public Members
-
CriterionType minPositive¶
The minimum among all statistics that belong to the positive bins.
-
CriterionType maxPositive¶
The maximum among all statistics that belong to the positive bins.
-
CriterionType minNegative¶
The minimum among all statistics that belong to the negative bins.
-
CriterionType maxNegative¶
The maximum among all statistics that belong to the negative bins.
-
CriterionType minPositive¶
-
template<typename CriteriaType>
class ILabelBinning¶ - #include <label_binning.hpp>
Defines an interface for methods that assign labels to bins, based on corresponding criteria.
- Template Parameters:
CriteriaType – The type of the criteria
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<CriteriaType> getLabelInfo(typename View<CriteriaType>::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<CriteriaType> labelInfo, typename View<CriteriaType>::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
-
class ILabelBinningFactory¶
- #include <label_binning.hpp>
Defines an interface for all factories that allow to create instances of the type
ILabelBinning.Public Functions
-
inline virtual ~ILabelBinningFactory()¶
-
virtual std::unique_ptr<ILabelBinning<float32>> create32Bit() const = 0¶
Creates and returns a new object of type
ILabelBinning<float32>.- Returns:
An unique pointer to an object of type
ILabelBinning<float32>that has been created
-
virtual std::unique_ptr<ILabelBinning<float64>> create64Bit() const = 0¶
Creates and returns a new object of type
ILabelBinning<float64>.- Returns:
An unique pointer to an object of type
ILabelBinning<float64>that 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 BlasFactory &blasFactory, const LapackFactory &lapackFactory) 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:
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 = 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
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 = 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
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
-
inline virtual ~ILabelBinningConfig()¶
-
template<typename CriterionType>