Description Usage Format Examples
Log Loss mlr custom measure
1 |
An object of class Measure
of length 10.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.