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
IStatisticsProviderFactoryaccording to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrixthat provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrixthat provides access to the labels of the training examplesblas – A reference to an object of type
Blasthat allows to execute BLAS routineslapack – A reference to an object of type
Lapackthat 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
IStatisticsProviderFactorythat has been created
-
virtual std::unique_ptr<IEvaluationMeasureFactory> createEvaluationMeasureFactory() const = 0¶
Creates and returns a new object of type
IEvaluationMeasureFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IEvaluationMeasureFactorythat has been created
-
virtual std::unique_ptr<IDistanceMeasureFactory> createDistanceMeasureFactory() const = 0¶
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
-
virtual std::unique_ptr<IMarginalProbabilityFunctionFactory> createMarginalProbabilityFunctionFactory() const = 0¶
Creates and returns a new object of type
IMarginalProbabilityFunctionFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IMarginalProbabilityFunctionFactorythat 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
IJointProbabilityFunctionFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IJointProbabilityFunctionFactorythat 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¶