|
Medial Code Documentation
|
The interface of Objective Function. More...
#include <objective_function.h>
Public Member Functions | |
| virtual | ~ObjectiveFunction () |
| virtual destructor | |
| virtual void | Init (const Metadata &metadata, data_size_t num_data)=0 |
| Initialize. | |
| virtual void | GetGradients (const double *score, score_t *gradients, score_t *hessians) const =0 |
| calculating first order derivative of loss function | |
| virtual const char * | GetName () const =0 |
| virtual bool | IsConstantHessian () const |
| 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 double | BoostFromScore (int) 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. | |
| virtual void | ConvertOutput (const double *input, double *output) const |
| virtual std::string | ToString () const =0 |
| ObjectiveFunction & | operator= (const ObjectiveFunction &)=delete |
| Disable copy. | |
| ObjectiveFunction (const ObjectiveFunction &)=delete | |
| Disable copy. | |
Static Public Member Functions | |
| 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. | |
The interface of Objective Function.
|
static |
Create object of objective function.
| type | Specific type of objective function |
| config | Config for objective function |
|
pure virtual |
calculating first order derivative of loss function
| score | prediction score in this round \gradients Output gradients \hessians Output hessians |
Implemented in LightGBM::BinaryLogloss, LightGBM::MulticlassSoftmax, LightGBM::MulticlassOVA, LightGBM::LambdarankNDCG, LightGBM::RegressionL2loss, LightGBM::RegressionL1loss, LightGBM::RegressionHuberLoss, LightGBM::RegressionFairLoss, LightGBM::RegressionPoissonLoss, LightGBM::RegressionQuantileloss, LightGBM::RegressionMAPELOSS, LightGBM::RegressionGammaLoss, LightGBM::RegressionTweedieLoss, LightGBM::CrossEntropy, and LightGBM::CrossEntropyLambda.
|
pure virtual |
Initialize.
| metadata | Label data |
| num_data | Number of data |
Implemented in LightGBM::BinaryLogloss, LightGBM::MulticlassSoftmax, LightGBM::MulticlassOVA, LightGBM::LambdarankNDCG, LightGBM::RegressionL2loss, LightGBM::RegressionPoissonLoss, LightGBM::RegressionMAPELOSS, LightGBM::CrossEntropy, and LightGBM::CrossEntropyLambda.
|
inlinevirtual |
The prediction should be accurate or not. True will disable early stopping for prediction.
Reimplemented in LightGBM::BinaryLogloss, LightGBM::MulticlassSoftmax, LightGBM::MulticlassOVA, and LightGBM::LambdarankNDCG.