File loss_decomposable.hpp¶
-
namespace boosting
-
class IDecomposableClassificationLoss : public virtual boosting::IClassificationLoss, public virtual IClassificationEvaluationMeasure¶
- #include <loss_decomposable.hpp>
Defines an interface for all decomposable loss functions that can be used in classification problems.
Subclassed by boosting::INonDecomposableClassificationLoss, boosting::ISparseDecomposableClassificationLoss
Public Functions
-
inline virtual ~IDecomposableClassificationLoss() override¶
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const CContiguousView<float64> &scoreMatrix, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the labels, whose indices are provided by a
CompleteIndexVector.- 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 scoresindicesBegin – A
CompleteIndexVector::const_iteratorto the beginning of the label indicesindicesEnd – A
CompleteIndexVector::const_iteratorto the end of the label indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const CContiguousView<float64> &scoreMatrix, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the labels, whose indices are provided by a
PartialIndexVector.- 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 scoresindicesBegin – A
PartialIndexVector::const_iteratorto the beginning of the label indicesindicesEnd – A
PartialIndexVector::const_iteratorto the end of the label indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const BinaryCsrView &labelMatrix, const CContiguousView<float64> &scoreMatrix, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the labels, whose indices are provided by a
CompleteIndexVector.- 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 scoresindicesBegin – A
CompleteIndexVector::const_iteratorto the beginning of the label indicesindicesEnd – A
CompleteIndexVector::const_iteratorto the end of the label indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const BinaryCsrView &labelMatrix, const CContiguousView<float64> &scoreMatrix, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the labels, whose indices are provided by a
PartialIndexVector.- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
labelMatrix – A reference to an object of template type
BinaryCsrViewthat provides row-wise access to the ground truth of the training examplesscoreMatrix – A reference to an object of type
CContiguousViewthat stores the currently predicted scoresindicesBegin – A
PartialIndexVector::const_iteratorto the beginning of the label indicesindicesEnd – A
PartialIndexVector::const_iteratorto the end of the label indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
inline virtual ~IDecomposableClassificationLoss() override¶
-
class IDecomposableRegressionLoss : public virtual boosting::IRegressionLoss, public virtual IRegressionEvaluationMeasure¶
- #include <loss_decomposable.hpp>
Defines an interface for all decomposable loss functions that can be used in regression problems.
Subclassed by boosting::INonDecomposableRegressionLoss
Public Functions
-
inline virtual ~IDecomposableRegressionLoss() override¶
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const float32> ®ressionMatrix, const CContiguousView<float64> &scoreMatrix, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the outputs, whose indices are provided by a
CompleteIndexVector.- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
regressionMatrix – A reference to an object of template 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 scoresindicesBegin – A
CompleteIndexVector::const_iteratorto the beginning of the output indicesindicesEnd – A
CompleteIndexVector::const_iteratorto the end of the output indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CContiguousView<const float32> ®ressionMatrix, const CContiguousView<float64> &scoreMatrix, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the outputs, whose indices are provided by a
PartialIndexVector.- Parameters:
exampleIndex – The index of the example for which the gradients and Hessians should be updated
regressionMatrix – A reference to an object of template 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 scoresindicesBegin – A
PartialIndexVector::const_iteratorto the beginning of the output indicesindicesEnd – A
PartialIndexVector::const_iteratorto the end of the output indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CsrView<const float32> ®ressionMatrix, const CContiguousView<float64> &scoreMatrix, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the outputs, whose indices are provided by a
CompleteIndexVector.- 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 scoresindicesBegin – A
CompleteIndexVector::const_iteratorto the beginning of the output indicesindicesEnd – A
CompleteIndexVector::const_iteratorto the end of the output indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
virtual void updateDecomposableStatistics(uint32 exampleIndex, const CsrView<const float32> ®ressionMatrix, const CContiguousView<float64> &scoreMatrix, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd, CContiguousView<Tuple<float64>> &statisticView) const = 0¶
Updates the statistics of the example at a specific index, considering only the outputs, whose indices are provided by a
PartialIndexVector.- 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 scoresindicesBegin – A
PartialIndexVector::const_iteratorto the beginning of the output indicesindicesEnd – A
PartialIndexVector::const_iteratorto the end of the output indicesstatisticView – A reference to an object of type
CContiguousViewto be updated
-
inline virtual ~IDecomposableRegressionLoss() override¶
-
class IDecomposableClassificationLossFactory : public IClassificationEvaluationMeasureFactory, public IDistanceMeasureFactory¶
- #include <loss_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
IDecomposableClassificationLoss.Subclassed by boosting::INonDecomposableClassificationLossFactory, boosting::ISparseDecomposableClassificationLossFactory
Public Functions
-
inline virtual ~IDecomposableClassificationLossFactory() override¶
-
virtual std::unique_ptr<IDecomposableClassificationLoss> createDecomposableClassificationLoss() const = 0¶
Creates and returns a new object of type
IDecomposableClassificationLoss.- Returns:
An unique pointer to an object of type
IDecomposableClassificationLossthat has been created
-
inline virtual ~IDecomposableClassificationLossFactory() override¶
-
class IDecomposableRegressionLossFactory : public IRegressionEvaluationMeasureFactory¶
- #include <loss_decomposable.hpp>
Defines an interface for all factories that allow to create instances of the type
IDecomposableClassificationLoss.Subclassed by boosting::INonDecomposableRegressionLossFactory
Public Functions
-
inline virtual ~IDecomposableRegressionLossFactory() override¶
-
virtual std::unique_ptr<IDecomposableRegressionLoss> createDecomposableRegressionLoss() const = 0¶
Creates and returns a new object of type
IDecomposableRegressionLoss.- Returns:
An unique pointer to an object of type
IDecomposableRegressionLossthat has been created
-
inline virtual ~IDecomposableRegressionLossFactory() override¶
-
class IDecomposableLossConfig : public virtual boosting::ILossConfig¶
- #include <loss_decomposable.hpp>
Defines an interface for all classes that allow to configure a decomposable loss function.
Subclassed by boosting::IDecomposableClassificationLossConfig, boosting::IDecomposableRegressionLossConfig
Public Functions
-
inline virtual ~IDecomposableLossConfig() 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 ~IDecomposableLossConfig() override¶
-
class IDecomposableClassificationLossConfig : public virtual boosting::IDecomposableLossConfig, public virtual boosting::IClassificationLossConfig¶
- #include <loss_decomposable.hpp>
Defines an interface for all classes that allow to configure a decomposable loss function that can be used in classification problems.
Subclassed by boosting::DecomposableLogisticLossConfig, boosting::DecomposableSquaredErrorLossConfig, boosting::ISparseDecomposableClassificationLossConfig
Public Functions
-
inline virtual ~IDecomposableClassificationLossConfig() override¶
-
virtual std::unique_ptr<IDecomposableClassificationLossFactory> createDecomposableClassificationLossFactory() const = 0¶
Creates and returns a new object of type
IDecomposableClassificationLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IDecomposableClassificationLossFactorythat 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 ~IDecomposableClassificationLossConfig() override¶
-
class IDecomposableRegressionLossConfig : public virtual boosting::IDecomposableLossConfig, public virtual boosting::IRegressionLossConfig¶
- #include <loss_decomposable.hpp>
Defines an interface for all classes that allow to configure a decomposable loss function that can be used in regression problems.
Subclassed by boosting::DecomposableSquaredErrorLossConfig
Public Functions
-
inline virtual ~IDecomposableRegressionLossConfig() override¶
-
virtual std::unique_ptr<IDecomposableRegressionLossFactory> createDecomposableRegressionLossFactory() const = 0¶
Creates and returns a new object of type
IDecomposableRegressionLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IDecomposableRegressionLossFactorythat 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 ~IDecomposableRegressionLossConfig() override¶
-
class IDecomposableClassificationLoss : public virtual boosting::IClassificationLoss, public virtual IClassificationEvaluationMeasure¶