predscore | R Documentation |
Calculate performance metrics for predictions from classification or regression.
predscore(x, ref)
x |
The predicted values. |
ref |
The reference (observed) values. |
For classification, a numeric matrix with a row for each class and columns called "Recall" and "Precision".
For regression, a numeric vector with elements named "RMSE", "MAE", and "MAPE".
Kylie A. Bemis
set.seed(1)
n <- 250
s <- c("a", "b", "c")
x <- sample(s, n, replace=TRUE)
pred <- ifelse(runif(n) > 0.1, x, sample(s, n, replace=TRUE))
predscore(pred, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.