File learner_common.hpp

namespace boosting
class BoostedRuleLearnerConfigurator : public RuleLearnerConfigurator
#include <learner_common.hpp>

Allows to configure the individual modules of a rule learner that makes use of gradient boosting, depending on an IBoostedRuleLearnerConfig.

Public Functions

inline BoostedRuleLearnerConfigurator(std::unique_ptr<IBoostedRuleLearnerConfig> configPtr, const Blas<float32>::Routines &float32BlasRoutines, const Blas<float64>::Routines &float64BlasRoutines, const Lapack<float32>::Routines &float32LapackRoutines, const Lapack<float64>::Routines &float64LapackRoutines)
Parameters:
  • configPtr – An unique pointer to an object of type IBoostedRuleLearnerConfig

  • float32BlasRoutines – A reference to an object of type Blas::Routines that stores function pointers to all supported BLAS routines operating on 32-bit floating point values

  • float64BlasRoutines – A reference to an object of type Blas::Routines that stores function pointers to all supported BLAS routines operating on 64-bit floating point values

  • float32LapackRoutines – A reference to an object of type Lapack::Routines that stores function pointers to all supported LAPACK routines operating on 32-bit floating point values

  • float64LapackRoutines – A reference to an object of type Lapack::Routines that stores function pointers to all supported LAPACK routines operating on 64-bit floating point values

inline std::unique_ptr<IModelBuilderFactory> createModelBuilderFactory() const override

See also

RuleLearnerConfigurator::createModelBuilderFactory

inline std::unique_ptr<IClassificationStatisticsProviderFactory> createClassificationStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix) const override

See also

RuleLearnerConfigurator::createClassificationStatisticsProviderFactory

inline std::unique_ptr<IRegressionStatisticsProviderFactory> createRegressionStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseRegressionMatrix &regressionMatrix) const override

See also

RuleLearnerConfigurator::createRegressionStatisticsProviderFactory

Private Members

const std::unique_ptr<IBoostedRuleLearnerConfig> configPtr_
const BlasFactory blasFactory_
const LapackFactory lapackFactory_
class BoostedRuleLearnerConfig : public RuleLearnerConfig, public virtual boosting::IBoostedRuleLearnerConfig
#include <learner_common.hpp>

Allows to configure a rule learner that makes use of gradient boosting.

Public Functions

inline BoostedRuleLearnerConfig()
inline virtual ~BoostedRuleLearnerConfig() override
inline virtual Property<IHeadConfig> getHeadConfig() final override

Returns a Property that allows to access the IHeadConfig that stores configuration of the rule heads that should be induced by the rule learner.

Returns:

A reference to a Property that allows to access the IHeadConfig that stores the configuration of the rule heads

inline virtual Property<IStatisticTypeConfig> getStatisticTypeConfig() final override

Returns a Property that allows to access the IStatisticTypeConfig that stores the configuration of the data type that should be used by the rule learner for representing gradients and Hessians.

inline virtual ReadableProperty<IStatisticsConfig> getStatisticsConfig() const final override

Returns a ReadableProperty that allows to access the IStatisticsConfig that stores the configuration of the statistics that should be used by the rule learner.

Returns:

A ReadableProperty that allows to access the IStatisticsConfig that stores the configuration of the statistics

inline virtual SharedProperty<IClassificationStatisticsConfig> getClassificationStatisticsConfig() final override

Returns a SharedProperty that allows to access the IClassificationStatisticsConfig that stores the configuration of the statistics that should be used by the rule learner in classification problems.

Returns:

A SharedProperty that allows to access the IClassificationStatisticsConfig that stores the configuration of the statistics

inline virtual SharedProperty<IRegressionStatisticsConfig> getRegressionStatisticsConfig() final override

Returns a SharedProperty that allows to access the IRegressionStatisticsConfig that stores the configuration of the statistics that should be used by the rule learner in regression problems.

Returns:

A SharedProperty that allows to access the IRegressionStatisticsConfig that stores the configuration of the statistics

inline virtual Property<IRegularizationConfig> getL1RegularizationConfig() final override

Returns a Property that allows to access the IRegularizationConfig that stores the configuration of the L1 regularization term.

Returns:

A reference to an unique pointer of type IRegularizationConfig that stores the configuration of the L1 regularization term

inline virtual Property<IRegularizationConfig> getL2RegularizationConfig() final override

Returns a Property that allows to access the IRegularizationConfig that stores the configuration of the L2 regularization term.

Returns:

A Property that allows to access the IRegularizationConfig that stores the configuration of the L2 regularization term

inline virtual ReadableProperty<ILossConfig> getLossConfig() const final override

Returns a ReadableProperty that allows to access the ILossConfig that stores the configuration of the loss function.

Returns:

A ReadableProperty that allows to access the ILossConfig that stores the configuration of the loss function

inline virtual SharedProperty<IClassificationLossConfig> getClassificationLossConfig() final override

Returns a SharedProperty that allows to access the IClassificationLossConfig that stores the configuration of the loss function that should be used in classification problems.

Returns:

A SharedProperty that allows to access the IClassificationLossConfig that stores the configuration of the loss function that should be used in classification problems

inline virtual SharedProperty<IRegressionLossConfig> getRegressionLossConfig() final override

Returns a SharedProperty that allows to access the IRegressionLossConfig that stores the configuration of the loss function that should be used in regression problems.

Returns:

A SharedProperty that allows to access the IRegressionLossConfig that stores the configuration of the loss function that should be used in regression problems

inline virtual Property<ILabelBinningConfig> getLabelBinningConfig() final override

Returns a Property that allows to access the ILabelBinningConfig that stores the configuration of the method for the assignment of labels to bins.

Returns:

A Property that allows to access the ILabelBinningConfig that stores the configuration of the method for the assignment of labels to bins

Protected Attributes

std::unique_ptr<IHeadConfig> headConfigPtr_

An unique pointer that stores the configuration of the rule heads.

std::unique_ptr<IStatisticTypeConfig> statisticTypeConfigPtr_

An unique pointer that stores the configuration of the data type that should be used for representing gradients and Hessians.

std::shared_ptr<IClassificationStatisticsConfig> classificationStatisticsConfigPtr_

A shared pointer that stores the configuration of the statistics that should be use in classification problems.

std::shared_ptr<IRegressionStatisticsConfig> regressionStatisticsConfigPtr_

A shared pointer that stores the configuration of the statistics that should be use in regression problems.

std::shared_ptr<IClassificationLossConfig> classificationLossConfigPtr_

A shared pointer that stores the configuration of the loss function that should be used in classification problems.

std::shared_ptr<IRegressionLossConfig> regressionLossConfigPtr_

A shared pointer that stores the configuration of the loss function that should be used in regression problems.

std::unique_ptr<IRegularizationConfig> l1RegularizationConfigPtr_

An unique pointer that stores the configuration of the L1 regularization term.

std::unique_ptr<IRegularizationConfig> l2RegularizationConfigPtr_

An unique pointer that stores the configuration of the L2 regularization term.

std::unique_ptr<ILabelBinningConfig> labelBinningConfigPtr_

An unique pointer that stores the configuration of the method that is used to assign labels to bins.