File loss_non_decomposable.hpp¶
-
namespace boosting
-
class INonDecomposableClassificationLoss : public virtual boosting::IClassificationLoss, public virtual boosting::IDecomposableClassificationLoss¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all non-decomposable loss functions that can be used in classification problems.
Public Functions
-
inline virtual ~INonDecomposableClassificationLoss() override¶
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const CContiguousView<float64> &scoreMatrix, DenseNonDecomposableStatisticView &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<float64> &scoreMatrix, DenseNonDecomposableStatisticView &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
-
inline virtual ~INonDecomposableClassificationLoss() override¶
-
class INonDecomposableRegressionLoss : public virtual boosting::IRegressionLoss, public virtual boosting::IDecomposableRegressionLoss¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all non-decomposable loss functions that can be used in regression problems.
Public Functions
-
inline virtual ~INonDecomposableRegressionLoss() override¶
-
virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const float32> ®ressionMatrix, const CContiguousView<float64> &scoreMatrix, DenseNonDecomposableStatisticView &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<float64> &scoreMatrix, DenseNonDecomposableStatisticView &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
-
inline virtual ~INonDecomposableRegressionLoss() override¶
-
class INonDecomposableClassificationLossFactory : public boosting::IDecomposableClassificationLossFactory¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
INonDecomposableClassificationLoss.Public Functions
-
inline virtual ~INonDecomposableClassificationLossFactory() override¶
-
virtual std::unique_ptr<INonDecomposableClassificationLoss> 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> 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
-
inline virtual ~INonDecomposableClassificationLossFactory() override¶
-
class INonDecomposableRegressionLossFactory : public boosting::IDecomposableRegressionLossFactory¶
- #include <loss_non_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
INonDecomposableRegressionLoss.Public Functions
-
inline virtual ~INonDecomposableRegressionLossFactory() override¶
-
virtual std::unique_ptr<INonDecomposableRegressionLoss> 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> 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
-
inline virtual ~INonDecomposableRegressionLossFactory() override¶
-
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<INonDecomposableClassificationLossFactory> 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> 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> 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<INonDecomposableRegressionLossFactory> 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> 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¶
-
class INonDecomposableClassificationLoss : public virtual boosting::IClassificationLoss, public virtual boosting::IDecomposableClassificationLoss¶