File loss_decomposable_squared_error.hpp¶
-
namespace boosting
-
class DecomposableSquaredErrorLossConfig : public boosting::IDecomposableClassificationLossConfig, public boosting::IDecomposableRegressionLossConfig¶
- #include <loss_decomposable_squared_error.hpp>
Allows to configure a loss function that implements a multivariate variant of the squared error loss that is decomposable.
Public Functions
-
DecomposableSquaredErrorLossConfig(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<IRegressionStatisticsProviderFactory> createRegressionStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseRegressionMatrix ®ressionMatrix, const Blas &blas, const Lapack &lapack, bool preferSparseStatistics) const override¶
Creates and returns a new object of type
IRegressionStatisticsProviderFactoryaccording to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrixthat provides access to the feature values of the training examplesregressionMatrix – A reference to an object of type
IRowWiseRegressionMatrixthat provides access to the regression scores 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
IRegressionStatisticsProviderFactorythat 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<IDecomposableClassificationLossFactory> createDecomposableClassificationLossFactory() const override¶
Creates and returns a new object of type
IDecomposableClassificationLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IDecomposableClassificationLossFactorythat has been created
-
virtual std::unique_ptr<IDecomposableRegressionLossFactory> createDecomposableRegressionLossFactory() const override¶
Creates and returns a new object of type
IDecomposableRegressionLossFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IDecomposableRegressionLossFactorythat has been created
Private Members
-
const ReadableProperty<IHeadConfig> headConfig_¶
-
DecomposableSquaredErrorLossConfig(ReadableProperty<IHeadConfig> headConfig)¶
-
class DecomposableSquaredErrorLossConfig : public boosting::IDecomposableClassificationLossConfig, public boosting::IDecomposableRegressionLossConfig¶