File loss.hpp¶
-
namespace boosting
-
class ILoss : public IEvaluationMeasure, public IDistanceMeasure¶
- #include <loss.hpp>
Defines an interface for all loss functions.
Subclassed by boosting::ILabelWiseLoss
Public Functions
-
inline virtual ~ILoss() override¶
-
inline virtual ~ILoss() override¶
-
class ILossConfig¶
- #include <loss.hpp>
Defines an interface for all classes that allow to configure a loss function.
Subclassed by boosting::IExampleWiseLossConfig, boosting::ILabelWiseLossConfig
Public Functions
-
inline virtual ~ILossConfig()¶
-
virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const Blas &blas, const Lapack &lapack, bool preferSparseStatistics) const = 0¶
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 exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrix
that provides access to the labels of the training examplesblas – A reference to an object of type
Blas
that allows to execute BLAS routineslapack – A reference to an object of type
Lapack
that allows to execute LAPACK routinespreferSparseStatistics – True, if a sparse representation of statistics should be preferred, if possible, false otherwise
- Returns:
An unique pointer to an object of type
IStatisticsProviderFactory
that has been created
-
virtual std::unique_ptr<IEvaluationMeasureFactory> createEvaluationMeasureFactory() const = 0¶
Creates and returns a new object of type
IEvaluationMeasureFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
IEvaluationMeasureFactory
that has been created
-
virtual std::unique_ptr<IDistanceMeasureFactory> createDistanceMeasureFactory() const = 0¶
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
-
virtual std::unique_ptr<IMarginalProbabilityFunctionFactory> createMarginalProbabilityFunctionFactory() const = 0¶
Creates and returns a new object of type
IMarginalProbabilityFunctionFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
IMarginalProbabilityFunctionFactory
that has been created or a null pointer, if the loss function does not support the prediction of marginal probabilities
-
virtual std::unique_ptr<IJointProbabilityFunctionFactory> createJointProbabilityFunctionFactory() const = 0¶
Creates and returns a new object of type
IJointProbabilityFunctionFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
IJointProbabilityFunctionFactory
that has been created to a null pointer, if the loss function does not support the prediction of joint probabilities
-
virtual bool isDecomposable() const = 0¶
Returns whether the loss function is decomposable or not.
- Returns:
True, if the loss function is decomposable, false otherwise
-
virtual bool isSparse() const = 0¶
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 ~ILossConfig()¶
-
class ILoss : public IEvaluationMeasure, public IDistanceMeasure¶