Medial Code Documentation
|
Objective function for regression. More...
#include <regression_objective.hpp>
Public Member Functions | |
RegressionL2loss (const Config &config) | |
RegressionL2loss (const std::vector< std::string > &strs) | |
void | Init (const Metadata &metadata, data_size_t num_data) override |
Initialize. | |
void | GetGradients (const double *score, score_t *gradients, score_t *hessians) const override |
calculating first order derivative of loss function | |
const char * | GetName () const override |
void | ConvertOutput (const double *input, double *output) const override |
std::string | ToString () const override |
bool | IsConstantHessian () const override |
double | BoostFromScore (int) const override |
![]() | |
virtual | ~ObjectiveFunction () |
virtual destructor | |
virtual bool | IsRenewTreeOutput () const |
virtual double | RenewTreeOutput (double ori_output, const double *, const data_size_t *, const data_size_t *, data_size_t) const |
virtual double | RenewTreeOutput (double ori_output, double, const data_size_t *, const data_size_t *, data_size_t) const |
virtual bool | ClassNeedTrain (int) const |
virtual bool | SkipEmptyClass () const |
virtual int | NumModelPerIteration () const |
virtual int | NumPredictOneRow () const |
virtual bool | NeedAccuratePrediction () const |
The prediction should be accurate or not. True will disable early stopping for prediction. | |
ObjectiveFunction & | operator= (const ObjectiveFunction &)=delete |
Disable copy. | |
ObjectiveFunction (const ObjectiveFunction &)=delete | |
Disable copy. | |
Protected Attributes | |
bool | sqrt_ |
data_size_t | num_data_ |
Number of data. | |
const label_t * | label_ |
Pointer of label. | |
const label_t * | weights_ |
Pointer of weights. | |
std::vector< label_t > | trans_label_ |
Additional Inherited Members | |
![]() | |
static LIGHTGBM_EXPORT ObjectiveFunction * | CreateObjectiveFunction (const std::string &type, const Config &config) |
Create object of objective function. | |
static LIGHTGBM_EXPORT ObjectiveFunction * | CreateObjectiveFunction (const std::string &str) |
Load objective function from string object. | |
Objective function for regression.
|
inlineoverridevirtual |
Reimplemented from LightGBM::ObjectiveFunction.
|
inlineoverridevirtual |
Reimplemented from LightGBM::ObjectiveFunction.
|
inlineoverridevirtual |
calculating first order derivative of loss function
score | prediction score in this round \gradients Output gradients \hessians Output hessians |
Implements LightGBM::ObjectiveFunction.
Reimplemented in LightGBM::RegressionPoissonLoss, LightGBM::RegressionQuantileloss, LightGBM::RegressionMAPELOSS, and LightGBM::RegressionTweedieLoss.
|
inlineoverridevirtual |
Implements LightGBM::ObjectiveFunction.
|
inlineoverridevirtual |
Initialize.
metadata | Label data |
num_data | Number of data |
Implements LightGBM::ObjectiveFunction.
Reimplemented in LightGBM::RegressionPoissonLoss, and LightGBM::RegressionMAPELOSS.
|
inlineoverridevirtual |
Reimplemented from LightGBM::ObjectiveFunction.
|
inlineoverridevirtual |
Implements LightGBM::ObjectiveFunction.