exprso (version 0.1.8)

calcStats: Calculate Classifier Performance

Description

calcStats calculates classifier performance based on the class predictions and actual class labels stored in an ExprsPredict object.

Usage

calcStats(object, aucSkip = FALSE, plotSkip = FALSE)

# S4 method for ExprsPredict calcStats(object, aucSkip = FALSE, plotSkip = FALSE)

Arguments

object

An ExprsPredict object.

aucSkip

A logical scalar. Toggles whether to calculate area under the receiver operating characteristic curve. See details.

plotSkip

A logical scalar. Toggles whether to plot the receiver operating characteristic curve.

Value

Returns a data.frame of performance metrics.

Methods (by class)

  • ExprsPredict: Method to calculate the performance of a deployed classifier.

Details

This function calculates classifier performance based on the predicted class labels and the actual class labels in one of two ways. If the argument aucSkip = FALSE AND the ExprsArray object was an ExprsBinary object with at least one case and one control AND ExprsPredict contains a coherent @probability slot, calcStats will calculate classifier performance using the area under the receiver operating characteristic (ROC) curve via the ROCR package. Otherwise, calcStats will calculate classifier performance traditionally using a confusion matrix. Note that accuracies calculated using ROCR may differ from accuracies calculated using a confusion matrix because the former may adjust the discrimination threshold to optimize sensitivity and specificity. The discrimination threshold is automatically chosen as the point along the ROC which minimizes the Euclidean distance from (0, 1).

See Also

exprso-predict