File statistic_format_sparse.hpp

namespace boosting
class SparseStatisticsConfig : public boosting::IClassificationStatisticsConfig, public boosting::IRegressionStatisticsConfig
#include <statistic_format_sparse.hpp>

Allows to configure a sparse format for storing statistics about the quality of predictions for training examples.

Public Functions

SparseStatisticsConfig(ReadableProperty<IClassificationLossConfig> classificationLossConfig, ReadableProperty<IRegressionLossConfig> regressionLossConfig)
Parameters:
  • classificationLossConfig – A ReadableProperty that allows to access the IClassificationLossConfig that stores the configuration of the loss function that should be used in classification problems

  • regressionLossConfig – A ReadableProperty that allows to access the IRegressionLossConfig that stores the configuration of the loss function that should be used in regression problems

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

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

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

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

virtual bool isDense() const override

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 override

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

Private Members

const ReadableProperty<IClassificationLossConfig> classificationLossConfig_
const ReadableProperty<IRegressionLossConfig> regressionLossConfig_