File loss_label_wise_squared_hinge.hpp¶
-
namespace boosting
-
class LabelWiseSquaredHingeLossConfig : public boosting::ISparseLabelWiseLossConfig¶
- #include <loss_label_wise_squared_hinge.hpp>
Allows to configure a loss function that implements a multi-label variant of the squared hinge loss that is applied label-wise.
Public Functions
-
LabelWiseSquaredHingeLossConfig(const std::unique_ptr<IHeadConfig> &headConfigPtr)¶
- Parameters:
headConfigPtr – A reference to an unique pointer that stores the configuration of rule heads
-
virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, const Blas &blas, const Lapack &lapack, bool preferSparseStatistics) const override¶
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<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<ISparseLabelWiseLossFactory> createSparseLabelWiseLossFactory() const override¶
Creates and returns a new object of type
ISparseLabelWiseLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
ISparseLabelWiseLossFactorythat has been created
Private Members
-
const std::unique_ptr<IHeadConfig> &headConfigPtr_¶
-
LabelWiseSquaredHingeLossConfig(const std::unique_ptr<IHeadConfig> &headConfigPtr)¶
-
class LabelWiseSquaredHingeLossConfig : public boosting::ISparseLabelWiseLossConfig¶