View source: R/classification_metrics.R
classification_metrics | R Documentation |
Compute classification quality metrics
classification_metrics(pred, true)
pred |
vector of predicted classes. |
true |
vector of true classes. |
A tibble with global accuracy, and averages (across classes) of precision, recall and F1-score.
res <- mutate(mtcars, cyl=factor(cyl)) %>%
resample_split(p=0.5) %>%
xgb_fit(resp="cyl", expl=c("mpg", "hp", "qsec"), nrounds=20) %>%
xgb_predict(fns=NULL)
classification_metrics(res$pred, res$cyl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.