Learn R Programming

gencve (version 0.3)

logloss: log-loss function for multiclass prediction

Description

Cross entropy or logloss is computed.

Usage

logloss(y, yp)

Arguments

y
vector of test cases
yp
corresonding vector of predictions

Value

the log-loss

References

Log loss is used in Kaggle competitions.

See Also

misclassificationrate

Examples

Run this code
#logloss for perfect fit
t <- ifelse(runif(50)<0.5, "a", "b")
logloss(y=t, yp=t)

Run the code above in your browser using DataLab