File loss_label_wise_squared_error.hpp¶
-
namespace boosting
-
class LabelWiseSquaredErrorLossConfig : public boosting::ILabelWiseLossConfig¶
- #include <loss_label_wise_squared_error.hpp>
Allows to configure a loss function that implements a multi-label variant of the squared error loss that is applied label-wise.
Public Functions
-
LabelWiseSquaredErrorLossConfig(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
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<IMarginalProbabilityFunctionFactory> createMarginalProbabilityFunctionFactory() const override¶
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 override¶
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 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<ILabelWiseLossFactory> createLabelWiseLossFactory() const override¶
Creates and returns a new object of type
ILabelWiseLossFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
ILabelWiseLossFactory
that has been created
Private Members
-
const std::unique_ptr<IHeadConfig> &headConfigPtr_¶
-
LabelWiseSquaredErrorLossConfig(const std::unique_ptr<IHeadConfig> &headConfigPtr)¶
-
class LabelWiseSquaredErrorLossConfig : public boosting::ILabelWiseLossConfig¶