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 CContiguousView that provides random access to the labels of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

  • statisticView – A reference to an object of type DenseNonDecomposableStatisticView to 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 BinaryCsrView that provides row-wise access to the labels of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

  • statisticView – A reference to an object of type DenseNonDecomposableStatisticView to be updated

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> &regressionMatrix, 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 CContiguousView that provides random access to the regression scores of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

  • statisticView – A reference to an object of type DenseNonDecomposableStatisticView to be updated

virtual void updateNonDecomposableStatistics(uint32 exampleIndex, const CsrView<const float32> &regressionMatrix, 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 CsrView that provides row-wise access to the regression scores of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

  • statisticView – A reference to an object of type DenseNonDecomposableStatisticView to be updated

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 INonDecomposableClassificationLoss that 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 IDecomposableClassificationLoss that has been created

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 INonDecomposableRegressionLoss that 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 IDecomposableRegressionLoss that 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

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 INonDecomposableClassificationLossFactory according to the specified configuration.

Returns:

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

inline virtual std::unique_ptr<IClassificationEvaluationMeasureFactory> createClassificationEvaluationMeasureFactory() const final override

Creates and returns a new object of type IClassificationEvaluationMeasureFactory according to the specified configuration.

Returns:

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

inline virtual std::unique_ptr<IDistanceMeasureFactory> createDistanceMeasureFactory() const final override

Creates and returns a new object of type IDistanceMeasureFactory according to the specified configuration.

Returns:

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

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 INonDecomposableRegressionLossFactory according to the specified configuration.

Returns:

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

inline virtual std::unique_ptr<IRegressionEvaluationMeasureFactory> createRegressionEvaluationMeasureFactory() const final override

Creates and returns a new object of type IRegressionEvaluationMeasureFactory according to the specified configuration.

Returns:

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