acc | R Documentation |
Measure to compare true observed labels with predicted labels in multiclass classification tasks.
acc(truth, response, sample_weights = NULL, ...)
truth |
( |
response |
( |
sample_weights |
( |
... |
( |
The Classification Accuracy is defined as
weighted.mean(t == r, w).
Performance value as numeric(1)
.
Type: "classif"
Range: [0, 1]
Minimize: FALSE
Required prediction: response
Other Classification Measures:
bacc()
,
ce()
,
logloss()
,
mauc_aunu()
,
mbrier()
,
zero_one()
set.seed(1) lvls = c("a", "b", "c") truth = factor(sample(lvls, 10, replace = TRUE), levels = lvls) response = factor(sample(lvls, 10, replace = TRUE), levels = lvls) acc(truth, response)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.