File rule_evaluation_label_wise_partial_fixed_binned.hpp¶
-
namespace boosting
-
class LabelWiseFixedPartialBinnedRuleEvaluationFactory : public boosting::ISparseLabelWiseRuleEvaluationFactory¶
- #include <rule_evaluation_label_wise_partial_fixed_binned.hpp>
Allows to create instances of the class
ISparseLabelWiseRuleEvaluationFactory
that allow to calculate the predictions of partial rules, which predict for a predefined number of labels, using gradient-based label binning.Public Functions
-
LabelWiseFixedPartialBinnedRuleEvaluationFactory(float32 labelRatio, uint32 minLabels, uint32 maxLabels, float64 l1RegularizationWeight, float64 l2RegularizationWeight, std::unique_ptr<ILabelBinningFactory> labelBinningFactoryPtr)¶
- Parameters:
labelRatio – A percentage that specifies for how many labels the rule heads should predict, e.g., if 100 labels are available, a percentage of 0.5 means that the rule heads predict for a subset of
ceil(0.5 * 100) = 50
labels. Must be in (0, 1)minLabels – The minimum number of labels for which the rule heads should predict. Must be at least 2
maxLabels – The maximum number of labels for which the rule heads should predict. Must be at least
minLabels
or 0, if the maximum number of labels should not be restrictedl1RegularizationWeight – The weight of the L1 regularization that is applied for calculating the scores to be predicted by rules
l2RegularizationWeight – The weight of the L2 regularization that is applied for calculating the scores to be predicted by rules
labelBinningFactoryPtr – An unique pointer to an object of type
ILabelBinningFactory
that allows to create the implementation to be used to assign labels to bins
-
virtual std::unique_ptr<IRuleEvaluation<DenseLabelWiseStatisticVector>> create(const DenseLabelWiseStatisticVector &statisticVector, const CompleteIndexVector &indexVector) const override¶
Creates a new instance of the class
IRuleEvaluation
that allows to calculate the predictions of rules that predict for all available labels, based on the gradients and Hessians that are stored by aDenseLabelWiseStatisticVector
.- Parameters:
statisticVector – A reference to an object of type
DenseLabelWiseStatisticVector
. This vector is only used to identify the function that is able to deal with this particular type of vector via function overloadingindexVector – A reference to an object of the type
CompleteIndexVector
that provides access to the indices of the labels for which the rules may predict
- Returns:
An unique pointer to an object of type
IRuleEvaluation
that has been created
-
virtual std::unique_ptr<IRuleEvaluation<DenseLabelWiseStatisticVector>> create(const DenseLabelWiseStatisticVector &statisticVector, const PartialIndexVector &indexVector) const override¶
Creates a new instance of the class
IRuleEvaluation
that allows to calculate the predictions of rules that predict for a subset of the available labels, based on the gradients and Hessians that are stored by aDenseLabelWiseStatisticVector
.- Parameters:
statisticVector – A reference to an object of type
DenseLabelWiseStatisticVector
. This vector is only used to identify the function that is able to deal with this particular type of vector via function overloadingindexVector – A reference to an object of the type
PartialIndexVector
that provides access to the indices of the labels for which the rules may predict
- Returns:
An unique pointer to an object of type
IRuleEvaluation
that has been created
-
virtual std::unique_ptr<IRuleEvaluation<SparseLabelWiseStatisticVector>> create(const SparseLabelWiseStatisticVector &statisticVector, const CompleteIndexVector &indexVector) const override¶
Creates a new instance of the class
IRuleEvaluation
that allows to calculate the predictions of rules that predict for all available labels, based on the gradients and Hessians that are stored by aSparseLabelWiseStatisticVector
.- Parameters:
statisticVector – A reference to an object of type
SparseLabelWiseStatisticVector
. This vector is only used to identify the function that is able to deal with this particular type of vector via function overloadingindexVector – A reference to an object of the type
CompleteIndexVector
that provides access to the indices of the labels for which the rules may predict
- Returns:
An unique pointer to an object of type
IRuleEvaluation
that has been created
-
virtual std::unique_ptr<IRuleEvaluation<SparseLabelWiseStatisticVector>> create(const SparseLabelWiseStatisticVector &statisticVector, const PartialIndexVector &indexVector) const override¶
Creates a new instance of the class
IRuleEvaluation
that allows to calculate the predictions of rules that predict for a subset of the available labels, based on the gradients and Hessians that are stored by aSparseLabelWiseStatisticVector
.- Parameters:
statisticVector – A reference to an object of type
SparseLabelWiseStatisticVector
. This vector is only used to identify the function that is able to deal with this particular type of vector via function overloadingindexVector – A reference to an object of the type
PartialIndexVector
that provides access to the indices of the labels for which the rules may predict
- Returns:
An unique pointer to an object of type
IRuleEvaluation
that has been created
-
LabelWiseFixedPartialBinnedRuleEvaluationFactory(float32 labelRatio, uint32 minLabels, uint32 maxLabels, float64 l1RegularizationWeight, float64 l2RegularizationWeight, std::unique_ptr<ILabelBinningFactory> labelBinningFactoryPtr)¶
-
class LabelWiseFixedPartialBinnedRuleEvaluationFactory : public boosting::ISparseLabelWiseRuleEvaluationFactory¶