File loss_non_decomposable_squared_hinge.hpp¶
-
namespace boosting
-
class NonDecomposableSquaredHingeLossConfig : public boosting::INonDecomposableClassificationLossConfig¶
- #include <loss_non_decomposable_squared_hinge.hpp>
Allows to configure a loss function that implements a multivariate variant of the squared hinge loss that is non-decomposable.
Public Functions
-
NonDecomposableSquaredHingeLossConfig(ReadableProperty<IHeadConfig> headConfig)¶
- Parameters:
headConfig – A
ReadablePropertythat allows to access theIHeadConfigthat stores the configuration of rule heads
-
virtual std::unique_ptr<IClassificationStatisticsProviderFactory> createClassificationStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const Blas &blas, const Lapack &lapack, bool preferSparseStatistics) const override¶
Creates and returns a new object of type
IClassificationStatisticsProviderFactoryaccording 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
IClassificationStatisticsProviderFactorythat has been created
-
virtual std::unique_ptr<IMarginalProbabilityFunctionFactory> createMarginalProbabilityFunctionFactory() const override¶
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 override¶
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 float64 getDefaultPrediction() const override¶
Returns the default prediction for an example that is not covered by any rules.
- Returns:
The default prediction
-
virtual std::unique_ptr<INonDecomposableClassificationLossFactory> createNonDecomposableClassificationLossFactory() const override¶
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
Private Members
-
const ReadableProperty<IHeadConfig> headConfig_¶
-
NonDecomposableSquaredHingeLossConfig(ReadableProperty<IHeadConfig> headConfig)¶
-
class NonDecomposableSquaredHingeLossConfig : public boosting::INonDecomposableClassificationLossConfig¶