File statistic_format_auto.hpp

namespace boosting
class AutomaticStatisticsConfig : public boosting::IStatisticsConfig
#include <statistic_format_auto.hpp>

Allows to configure a method that automatically decides for a format for storing statistics about the labels of the training examples.

Public Functions

AutomaticStatisticsConfig(const std::unique_ptr<ILossConfig> &lossConfigPtr, const std::unique_ptr<IHeadConfig> &headConfigPtr, const std::unique_ptr<IDefaultRuleConfig> &defaultRuleConfigPtr)
Parameters:
  • lossConfigPtr – A reference to an unique pointer that stores the configuration of the loss function

  • headConfigPtr – A reference to an unique pointer that stores the configuration of the rule heads

  • defaultRuleConfigPtr – A reference to an unique pointer that stores the configuration of the default rule

virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, 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 examples

  • labelMatrix – A reference to an object of type IRowWiseLabelMatrix that provides row-wise access to the labels of the training examples

  • blas – A reference to an object of type Blas that allows to execute BLAS routines

  • lapack – 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 isDense() const override

Returns whether a dense format is used for storing statistics about the labels of the training examples or not.

Returns:

True, if a dense format is used, false otherwise

virtual bool isSparse() const override

Returns whether a sparse format is used for storing statistics about the labels of the training examples or not.

Returns:

True, if a sparse format is used, false otherwise

Private Members

const std::unique_ptr<ILossConfig> &lossConfigPtr_
const std::unique_ptr<IHeadConfig> &headConfigPtr_
const std::unique_ptr<IDefaultRuleConfig> &defaultRuleConfigPtr_