[][src]Enum gbdt::config::Loss

pub enum Loss {
    SquaredError,
    LogLikelyhood,
    LAD,
    RegLinear,
    RegLogistic,
    BinaryLogistic,
    BinaryLogitraw,
    MultiSoftprob,
    MultiSoftmax,
    RankPairwise,
}

This enum defines the loss type.

We support three loss types for training and inference:

  1. SquaredError for regression. The label and the predicted value will be a float number.
  2. 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.
  3. 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

  1. RegLinear ("reg:linear" in xgboost): linear regression.
  2. RegLogistic ("reg:logistic" in xgboost): logistic regression.
  3. BinaryLogistic ("binary:logistic" in xgboost): logistic regression for binary classification, output probability
  4. BinaryLogitraw ("binary:logitraw" in xgboost): logistic regression for binary classification, output score before logistic transformation
  5. MultiSoftprob ("multi:softprob" in xgboost): multiclass classification. Call gbdt::predict_multiclass to get the predictions.
  6. MultiSoftmax ("multi:softmax" in xgboost): multiclass classification. Call gbdt::predict_multiclass to get the predictions.
  7. 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 Default for Loss[src]

fn default() -> Self[src]

SquaredError are used as default loss type.

impl Clone for 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]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Debug for Loss[src]

impl Serialize for Loss[src]

impl<'de> Deserialize<'de> for Loss[src]

Auto Trait Implementations

impl Send for Loss

impl Sync for Loss

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]