log.loss: Log Loss mlr custom measure

Description Usage Format Examples

Description

Log Loss mlr custom measure

Usage

1

Format

An object of class Measure of length 10.

Examples

1
2
3
4
5
6
7
8
9
## Define tasks
iris$Species <- as.integer(iris$Species == "virginica")
lrn = makeLearner("classif.nnet", predict.type = "prob")
iris.task <- makeClassifTask(data = iris, target = "Species")
## Train a learner and make predictions
mod = train(learner = lrn, iris.task)
pred = predict(mod, task = iris.task)
## Calculate the performance using the new measure
performance(pred, measures = log.loss)

dfalbel/mymlr documentation built on May 15, 2019, 5:09 a.m.