[−][src]Enum gbdt::config::Loss
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
Trait Implementations
impl Clone for Loss
[src]
fn clone(&self) -> Loss
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Loss> for Loss
[src]
fn eq(&self, other: &Loss) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Default for Loss
[src]
impl Debug for Loss
[src]
impl Serialize for Loss
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Loss
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,