metrics: Multi-class performance metrics

Description Usage Arguments Value Examples

View source: R/performance.R

Description

Get multi-class performance metrics in the form of Precision, Accuracy, and micro/macro F1 metrics. The base metrics are calculated from the caret packages confusionMatrix() function

Usage

1
metrics(predictions, reference)

Arguments

predictions

vector of predictions

reference

vector of actual classes

Value

2 element list of a dataframe containing micro and macro F1 scores with precision and accuracy

Examples

1
metrics(predictions=sample(1:4, 1000, replace=TRUE), reference=sample(1:4, 1000, replace=TRUE))

quevedor2/WadingPool documentation built on Dec. 22, 2021, 10:59 a.m.