File statistic_format_sparse.hpp

namespace boosting
class SparseStatisticsConfig : public boosting::IStatisticsConfig
#include <statistic_format_sparse.hpp>

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

Public Functions

SparseStatisticsConfig(const std::unique_ptr<ILossConfig> &lossConfigPtr)
Parameters:

lossConfigPtr – A reference to an unique pointer that stores the configuration of the loss function

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_