makeMeasure | R Documentation |
A measure object encapsulates a function to evaluate the performance of a prediction. Information about already implemented measures can be obtained here: measures.
A learner is trained on a training set d1, results in a model m and predicts another set d2 (which may be a different one or the training set) resulting in the prediction. The performance measure can now be defined using all of the information of the original task, the fitted model and the prediction.
makeMeasure(
id,
minimize,
properties = character(0L),
fun,
extra.args = list(),
aggr = test.mean,
best = NULL,
worst = NULL,
name = id,
note = ""
)
id |
( |
minimize |
( |
properties |
(character) Default is |
fun |
( |
extra.args |
(list) |
aggr |
(Aggregation) |
best |
( |
worst |
( |
name |
(character) |
note |
(character) |
Measure.
Other performance:
ConfusionMatrix
,
calculateConfusionMatrix()
,
calculateROCMeasures()
,
estimateRelativeOverfitting()
,
makeCostMeasure()
,
makeCustomResampledMeasure()
,
measures
,
performance()
,
setAggregation()
,
setMeasurePars()
f = function(task, model, pred, extra.args) {
sum((pred$data$response - pred$data$truth)^2)
}
makeMeasure(id = "my.sse", minimize = TRUE,
properties = c("regr", "response"), fun = f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.