pub enum Loss {
SquaredError,
LogLikelyhood,
LAD,
RegLinear,
RegLogistic,
BinaryLogistic,
BinaryLogitraw,
MultiSoftprob,
MultiSoftmax,
RankPairwise,
}
Expand description
This enum defines the loss type.
We support three loss types for training and inference:
- SquaredError for regression. The label and the predicted value will be a float number.
- LogLikelyhood for binary classification. The label value should be -1 or 1. The predicted value should be a float number between 0 and 1, which is the possibility of label 1.
- LAD for regression. The label and the predicted value will be a float number.
Note that LogLikelyhood
only support binary classification.
We also suppot seven objectives from Xgboost for inference. See xgboost
- RegLinear (“reg:linear” in xgboost): linear regression.
- RegLogistic (“reg:logistic” in xgboost): logistic regression.
- BinaryLogistic (“binary:logistic” in xgboost): logistic regression for binary classification, output probability
- BinaryLogitraw (“binary:logitraw” in xgboost): logistic regression for binary classification, output score before logistic transformation
- MultiSoftprob (“multi:softprob” in xgboost): multiclass classification. Call gbdt::predict_multiclass to get the predictions.
- MultiSoftmax (“multi:softmax” in xgboost): multiclass classification. Call gbdt::predict_multiclass to get the predictions.
- RankPairwise (“rank:pairwise” in xgboost): pairwise rank. See xgboost’s demo
Variants
SquaredError
SquaredError (“SquaredError”) for regression. The label and the predicted value will be a float number.
LogLikelyhood
LogLikelyhood (“LogLikelyhood”) for binary classification. The label value should be -1 or 1. The predicted value should be a float number between 0 and 1, which is the possibility of label 1.
LAD
LAD (“LAD”) for regression. The label and the predicted value will be a float number.
RegLinear
RegLinear (“reg:linear”) from Xgboost: linear regression.
RegLogistic
RegLogistic (“reg:logistic”) from Xgboost: logistic regression.
BinaryLogistic
BinaryLogistic (“binary:logistic”) from Xgboost: logistic regression for binary classification, output probability
BinaryLogitraw
BinaryLogitraw (“binary:logitraw”) from Xgboost: logistic regression for binary classification, output score before logistic transformation
MultiSoftprob
MultiSoftprob (“multi:softprob”) from Xgboost: multiclass classification. Call gbdt::predict_multiclass to get the predictions.
MultiSoftmax
MultiSoftmax (“multi:softmax”) from Xgboost: multiclass classification. Call gbdt::predict_multiclass to get the predictions.
RankPairwise
RankPairwise (“rank:pairwise”) from Xgboost: pairwise rank. See xgboost’s demo