File statistic_format.hpp

namespace boosting

Functions

static inline bool shouldSparseStatisticsBePreferred(const IOutputMatrix &outputMatrix, bool defaultRuleUsed, bool partialHeadsUsed)

Returns whether a sparse representation of the gradients and Hessians should be preferred or not.

Parameters:
  • outputMatrix – A reference to an object of type IOutputMatrix that provides row-wise access to the ground truth of the training examples

  • defaultRuleUsed – True, if a default rule is used, false otherwise

  • partialHeadsUsed – True, if the partial heads are used by the rules, false otherwise

Returns:

True, if a sparse representation should be preferred, false otherwise

class IStatisticsConfig
#include <statistic_format.hpp>

Defines an interface for all classes that allow to configure which format should be used for storing statistics about the quality of predictions for training examples.

Subclassed by boosting::IClassificationStatisticsConfig, boosting::IRegressionStatisticsConfig

Public Functions

inline virtual ~IStatisticsConfig()
virtual bool isDense() const = 0

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

Returns:

True, if a dense format is used, false otherwise

virtual bool isSparse() const = 0

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

Returns:

True, if a sparse format is used, false otherwise

class IClassificationStatisticsConfig : public boosting::IStatisticsConfig
#include <statistic_format.hpp>

Defines an interface for all classes the allow to configure which format should be used for storing statistics about the quality of predictions for training examples in classification problems.

Subclassed by boosting::AutomaticStatisticsConfig, boosting::DenseStatisticsConfig, boosting::SparseStatisticsConfig

Public Functions

inline virtual ~IClassificationStatisticsConfig() override
virtual std::unique_ptr<IClassificationStatisticsProviderFactory> createClassificationStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const BlasFactory &blasFactory, const LapackFactory &lapackFactory) const = 0

Creates and returns a new object of type IClassificationStatisticsProviderFactory 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

  • blasFactory – A reference to an object of type BlasFactory that allows to create objects for executing BLAS routines

  • lapackFactory – A reference to an object of type LapackFactory that allows to create object for executing LAPACK routines

Returns:

An unique pointer to an object of type IClassificationStatisticsProviderFactory that has been created

class IRegressionStatisticsConfig : public boosting::IStatisticsConfig
#include <statistic_format.hpp>

Defines an interface for all classes the allow to configure which format should be used for storing statistics about the quality of predictions for training examples in regression problems.

Subclassed by boosting::AutomaticStatisticsConfig, boosting::DenseStatisticsConfig, boosting::SparseStatisticsConfig

Public Functions

inline virtual ~IRegressionStatisticsConfig() override
virtual std::unique_ptr<IRegressionStatisticsProviderFactory> createRegressionStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseRegressionMatrix &regressionMatrix, const BlasFactory &blasFactory, const LapackFactory &lapackFactory) const = 0

Creates and returns a new object of type IRegressionStatisticsProviderFactory 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

  • regressionMatrix – A reference to an object of type IRowWiseRegressionMatrix that provides row-wise access to the regression scores of the training examples

  • blasFactory – A reference to an object of type BlasFactory that allows to create objects for executing BLAS routines

  • lapackFactory – A reference to an object of type LapackFactory that allows to create objects for executing LAPACK routines

Returns:

An unique pointer to an object of type IRegressionStatisticsProviderFactory that has been created