powered by
Weighted accuracy, i.e. the weighted proportion of elements in predicted that are equal to those in observed.
predicted
observed
accuracy(actual, predicted, w = NULL, ...)
Observed values.
Predicted values.
Optional case weights.
Further arguments passed to weighted_mean.
weighted_mean
A numeric vector of length one.
classification_error.
classification_error
# NOT RUN { accuracy(c(0, 0, 1, 1), c(0, 0, 1, 1)) accuracy(c(1, 0, 0, 1), c(0, 0, 1, 1)) accuracy(c(1, 0, 0, 1), c(0, 0, 1, 1), w = 1:4) # }
Run the code above in your browser using DataLab