logloss: log-loss function for multiclass prediction

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/misclassificationrate.R

Description

Cross entropy or logloss is computed.

Usage

1
logloss(y, yp)

Arguments

y

vector of test cases

yp

corresonding vector of predictions

Value

the log-loss

Author(s)

A. I. McLeod

References

Log loss is used in Kaggle competitions.

See Also

misclassificationrate

Examples

1
2
3
#logloss for perfect fit
t <- ifelse(runif(50)<0.5, "a", "b")
logloss(y=t, yp=t)

gencve documentation built on May 29, 2017, 7:12 p.m.