R/performance_metrics.R
performanceMeasure.RdQuantify the performance of a classification algorithm. Predictions and truth both have to be binary.
performanceMeasure(pred, obs, perf.method = "f.measure", ...)
| pred | a logical or numeric, where 0 and FALSE represent control, and, 1 and TRUE represent cases |
|---|---|
| obs | a logical or numeric, where 0 and FALSE represent control, and, 1 and TRUE represent cases |
| perf.method | a character, specifying the method to use. Available
methods can be accessed using |
| ... | additional parameters to methods. see details |
a numeric, representing the performance
The F-measure requires the beta parameter which can be specified
using f.beta which defaults to 1 thereby computing the F1-measure.