Learn R Programming

TLBC (version 1.0)

calcPerformance: Function to calculate performance of a classification model

Description

Calculates several performance metrics.

Usage

calcPerformance(annotations, predictions, winSize, names=NULL, combineStanding=FALSE)

Arguments

annotations
Path to file containing bout-level annotations, a directory of files containing bout-level annotations, or a directory of instance-level annotations (i.e., the output of funciton annotationsToLabels).
predictions
Path to directory containing predictions (i.e., the saveDir argument to the function classify).
winSize
Window size in seconds.
names
(Optional) List of identifiers to use.
combineStanding
logical: combine standing still and standing moving into a single category?

Value

Object containing confusion matrix and several performance metrics.

See Also

confusionMatrix

Examples

Run this code
## Not run: 
# 
# # compute the performance of a model on a dataset
# myAnnotations="~/myStudy/annotations.csv"
# myPredictions="~/myStudy/myModelPredictions"
# WS=60
# calcPerformance(annotations=myAnnotations, predictions=myPredictions, winSize=WS)
# ## End(Not run)

Run the code above in your browser using DataLab