File head_type_complete.hpp¶
-
namespace boosting
-
class CompleteHeadConfig : public boosting::IHeadConfig¶
- #include <head_type_complete.hpp>
Allows to configure complete rule heads that predict for all available labels.
Public Functions
-
CompleteHeadConfig(const std::unique_ptr<ILabelBinningConfig> &labelBinningConfigPtr, const std::unique_ptr<IMultiThreadingConfig> &multiThreadingConfigPtr, const std::unique_ptr<IRegularizationConfig> &l1RegularizationConfigPtr, const std::unique_ptr<IRegularizationConfig> &l2RegularizationConfigPtr)¶
- Parameters:
labelBinningConfigPtr – A reference to an unique pointer that stores the configuration of the method for assigning labels to bins
multiThreadingConfigPtr – A reference to an unique pointer that stores the configuration of the multi-threading behavior that should be used for the parallel update of statistics
l1RegularizationConfigPtr – A reference to an unique pointer that stores the configuration of the L1 regularization
l2RegularizationConfigPtr – A reference to an unique pointer that stores the configuration of the L2 regularization
-
virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const ILabelWiseLossConfig &lossConfig) const override¶
Creates and returns a new object of type
IStatisticsProviderFactory
according to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrix
that provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrix
that provides access to the labels of the training exampleslossConfig – A reference to an object of type
ILabelWiseLossConfig
that specifies the configuration of the loss function
- Returns:
An unique pointer to an object of type
IStatisticsProviderFactory
that has been created
-
virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const ISparseLabelWiseLossConfig &lossConfig) const override¶
Creates and returns a new object of type
IStatisticsProviderFactory
according to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrix
that provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrix
that provides access to the labels of the training exampleslossConfig – A reference to an object of type
ISparseLabelWiseLossConfig
that specifies the configuration of the loss function
- Returns:
An unique pointer to an object of type
IStatisticsProviderFactory
that has been created
-
virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const IExampleWiseLossConfig &lossConfig, const Blas &blas, const Lapack &lapack) const override¶
Creates and returns a new object of type
IStatisticsProviderFactory
according to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrix
that provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrix
that provides access to the labels of the training exampleslossConfig – A reference to an object of type
IExampleWiseLossConfig
that specifies the configuration of the loss functionblas – A reference to an object of type
Blas
that allows to execute BLAS routineslapack – A reference to an object of type
Lapack
that allows to execute LAPACK routines
- Returns:
An unique pointer to an object of type
IStatisticsProviderFactory
that has been created
-
virtual bool isPartial() const override¶
Returns, whether the heads of rules are partial, i.e., they predict for a subset of the available labels, or not.
- Returns:
True, if the heads of rules are partial, false otherwise
-
virtual bool isSingleLabel() const override¶
Returns whether the rule heads predict for a single label or not.
- Returns:
True, if the rule heads predict for a single label, false otherwise
Private Members
-
const std::unique_ptr<ILabelBinningConfig> &labelBinningConfigPtr_¶
-
const std::unique_ptr<IMultiThreadingConfig> &multiThreadingConfigPtr_¶
-
const std::unique_ptr<IRegularizationConfig> &l1RegularizationConfigPtr_¶
-
const std::unique_ptr<IRegularizationConfig> &l2RegularizationConfigPtr_¶
-
CompleteHeadConfig(const std::unique_ptr<ILabelBinningConfig> &labelBinningConfigPtr, const std::unique_ptr<IMultiThreadingConfig> &multiThreadingConfigPtr, const std::unique_ptr<IRegularizationConfig> &l1RegularizationConfigPtr, const std::unique_ptr<IRegularizationConfig> &l2RegularizationConfigPtr)¶
-
class CompleteHeadConfig : public boosting::IHeadConfig¶