File loss_non_decomposable.hpp¶
-
namespace boosting
-
template<typename StatisticType>
class INonDecomposableClassificationLoss : public virtual boosting::IClassificationLoss<StatisticType>, public virtual boosting::IDecomposableClassificationLoss<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Defines an interface for all non-decomposable loss functions that can be used in classification problems.
- Template Parameters:
StatisticType – The type of the gradients and Hessians that are calculated by the loss function
Public Functions
-
inline virtual ~INonDecomposableClassificationLoss() override¶
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const CContiguousView<StatisticType> &scoreMatrix, DenseNonDecomposableStatisticView<StatisticType> &statisticView) const = 0¶
Updates the statistics of the example at a specific index.
- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
labelMatrix – A reference to an object of type
CContiguousViewthat provides random access to the labels of the training examplesscoreMatrix – A reference to an object of type
CContiguousViewthat stores the currently predicted scoresstatisticView – A reference to an object of type
DenseNonDecomposableStatisticViewto be updated
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const BinaryCsrView &labelMatrix, const CContiguousView<StatisticType> &scoreMatrix, DenseNonDecomposableStatisticView<StatisticType> &statisticView) const = 0¶
Updates the statistics of the example at a specific index.
- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
labelMatrix – A reference to an object of type
BinaryCsrViewthat provides row-wise access to the labels of the training examplesscoreMatrix – A reference to an object of type
CContiguousViewthat stores the currently predicted scoresstatisticView – A reference to an object of type
DenseNonDecomposableStatisticViewto be updated
-
template<typename StatisticType>
class INonDecomposableRegressionLoss : public virtual boosting::IRegressionLoss<StatisticType>, public virtual boosting::IDecomposableRegressionLoss<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Defines an interface for all non-decomposable loss functions that can be used in regression problems.
- Template Parameters:
StatisticType – The type of the gradients and Hessians that are calculated by the loss function
Public Functions
-
inline virtual ~INonDecomposableRegressionLoss() override¶
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const float32> ®ressionMatrix, const CContiguousView<StatisticType> &scoreMatrix, DenseNonDecomposableStatisticView<StatisticType> &statisticView) const = 0¶
Updates the statistics of the example at a specific index.
- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
regressionMatrix – A reference to an object of type
CContiguousViewthat provides random access to the regression scores of the training examplesscoreMatrix – A reference to an object of type
CContiguousViewthat stores the currently predicted scoresstatisticView – A reference to an object of type
DenseNonDecomposableStatisticViewto be updated
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CsrView<const float32> ®ressionMatrix, const CContiguousView<StatisticType> &scoreMatrix, DenseNonDecomposableStatisticView<StatisticType> &statisticView) const = 0¶
Updates the statistics of the example at a specific index.
- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
regressionMatrix – A reference to an object of type
CsrViewthat provides row-wise access to the regression scores of the training examplesscoreMatrix – A reference to an object of type
CContiguousViewthat stores the currently predicted scoresstatisticView – A reference to an object of type
DenseNonDecomposableStatisticViewto be updated
-
template<typename StatisticType>
class INonDecomposableClassificationLossFactory : public boosting::IDecomposableClassificationLossFactory<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
INonDecomposableClassificationLoss.- Template Parameters:
StatisticType – The type of the gradients and Hessians that are calculated by the loss function
Public Functions
-
inline virtual ~INonDecomposableClassificationLossFactory() override¶
-
virtual std::unique_ptr<INonDecomposableClassificationLoss<StatisticType>> createNonDecomposableClassificationLoss() const = 0¶
Creates and returns a new object of type
INonDecomposableClassificationLoss.- Returns:
An unique pointer to an object of type
INonDecomposableClassificationLossthat has been created
-
inline virtual std::unique_ptr<IDecomposableClassificationLoss<StatisticType>> createDecomposableClassificationLoss() const final override¶
Creates and returns a new object of type
IDecomposableClassificationLoss.- Returns:
An unique pointer to an object of type
IDecomposableClassificationLossthat has been created
-
template<typename StatisticType>
class INonDecomposableRegressionLossFactory : public boosting::IDecomposableRegressionLossFactory<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
INonDecomposableRegressionLoss.- Template Parameters:
StatisticType – The type of the gradients and Hessians that are calculated by the loss function
Public Functions
-
inline virtual ~INonDecomposableRegressionLossFactory() override¶
-
virtual std::unique_ptr<INonDecomposableRegressionLoss<StatisticType>> createNonDecomposableRegressionLoss() const = 0¶
Creates and returns a new object of type
INonDecomposableRegressionLoss.- Returns:
An unique pointer to an object of type
INonDecomposableRegressionLossthat has been created
-
inline virtual std::unique_ptr<IDecomposableRegressionLoss<StatisticType>> createDecomposableRegressionLoss() const final override¶
Creates and returns a new object of type
IDecomposableRegressionLoss.- Returns:
An unique pointer to an object of type
IDecomposableRegressionLossthat has been created
-
class INonDecomposableLossConfig : public virtual boosting::ILossConfig¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all classes that allow to configure a non-decomposable loss function.
Subclassed by boosting::INonDecomposableClassificationLossConfig, boosting::INonDecomposableRegressionLossConfig
Public Functions
-
inline virtual ~INonDecomposableLossConfig() override¶
-
inline virtual bool isDecomposable() const final override¶
Returns whether the loss function is decomposable or not.
- Returns:
True, if the loss function is decomposable, false otherwise
-
inline virtual bool isSparse() const override¶
Returns whether the loss function supports to use a sparse format for storing statistics or not.
- Returns:
True, if the loss function supports to use a sparse format for storing statistics, false otherwise
-
inline virtual ~INonDecomposableLossConfig() override¶
-
class INonDecomposableClassificationLossConfig : public virtual boosting::IClassificationLossConfig, public virtual boosting::INonDecomposableLossConfig¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all classes that allow to configure a non-decomposable loss function that can be used in classification problems.
Subclassed by boosting::NonDecomposableLogisticLossConfig, boosting::NonDecomposableSquaredErrorLossConfig, boosting::NonDecomposableSquaredHingeLossConfig
Public Functions
-
inline virtual ~INonDecomposableClassificationLossConfig() override¶
-
virtual std::unique_ptr<IPreset<float32>> createNonDecomposable32BitClassificationPreset() const = 0¶
Creates and returns a new object of type
IPreset<float32>.- Returns:
An unique pointer to an object of type
IPreset<float32>that has been created
-
virtual std::unique_ptr<IPreset<float64>> createNonDecomposable64BitClassificationPreset() const = 0¶
Creates and returns a new object of type
IPreset<float64>.- Returns:
An unique pointer to an object of type
IPreset<float64>that has been created
-
template<typename StatisticType>
class IPreset : public boosting::IClassificationLossConfig::IPreset<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Provides access to the interface of an
INonDecomposableClassificationLossConfig, abstracting away certain configuration options that have already been pre-determined.- Template Parameters:
StatisticType – The type that should be used for representing statistics
Public Functions
-
inline virtual ~IPreset() override¶
-
virtual std::unique_ptr<INonDecomposableClassificationLossFactory<StatisticType>> createNonDecomposableClassificationLossFactory() const = 0¶
Creates and returns a new object of type
INonDecomposableClassificationLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
INonDecomposableClassificationLossFactorythat has been created
-
inline virtual std::unique_ptr<IClassificationEvaluationMeasureFactory<StatisticType>> createClassificationEvaluationMeasureFactory() const final override¶
Creates and returns a new object of type
IClassificationEvaluationMeasureFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IClassificationEvaluationMeasureFactorythat has been created
-
inline virtual std::unique_ptr<IDistanceMeasureFactory<StatisticType>> createDistanceMeasureFactory() const final override¶
Creates and returns a new object of type
IDistanceMeasureFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IDistanceMeasureFactorythat has been created
-
inline virtual ~INonDecomposableClassificationLossConfig() override¶
-
class INonDecomposableRegressionLossConfig : public virtual boosting::IRegressionLossConfig, public virtual boosting::INonDecomposableLossConfig¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all classes that allow to configure a non-decomposable loss function that can be used in regression problems.
Subclassed by boosting::NonDecomposableSquaredErrorLossConfig
Public Functions
-
inline virtual ~INonDecomposableRegressionLossConfig() override¶
-
virtual std::unique_ptr<IPreset<float32>> createNonDecomposable32BitRegressionPreset() const = 0¶
Creates and returns a new object of type
IPreset<float32>.- Returns:
An unique pointer to an object of type
IPreset<float32>that has been created
-
virtual std::unique_ptr<IPreset<float64>> createNonDecomposable64BitRegressionPreset() const = 0¶
Creates and returns a new object of type
IPreset<float64>.- Returns:
An unique pointer to an object of type
IPreset<float64>that has been created
-
template<typename StatisticType>
class IPreset : public boosting::IRegressionLossConfig::IPreset<StatisticType>¶ - #include <loss_non_decomposable.hpp>
Provides access to the interface of an
INonDecomposableRegressionLossConfig, abstracting away certain configuration options that have already been pre-determined.- Template Parameters:
StatisticType – The type that should be used for representing statistics
Public Functions
-
inline virtual ~IPreset() override¶
-
virtual std::unique_ptr<INonDecomposableRegressionLossFactory<StatisticType>> createNonDecomposableRegressionLossFactory() const = 0¶
Creates and returns a new object of type
INonDecomposableRegressionLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
INonDecomposableRegressionLossFactorythat has been created
-
inline virtual std::unique_ptr<IRegressionEvaluationMeasureFactory<StatisticType>> createRegressionEvaluationMeasureFactory() const final override¶
Creates and returns a new object of type
IRegressionEvaluationMeasureFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IRegressionEvaluationMeasureFactorythat has been created
-
inline virtual ~INonDecomposableRegressionLossConfig() override¶
-
template<typename StatisticType>