DMwR (version 0.4.1)

CRchart: Plot a Cumulative Recall chart

Description

A cumulative recall chart plots the cumulative recall score against the rate of positive class predictions of a classification model.

Usage

CRchart(preds, trues, ...)

Arguments

preds
A vector containing the predictions of the model.
trues
A vector containing the true values of the class label. Must have the same dimension as preds.
...
Further parameters that are passed to the plot() function.

Details

The cumulative recall chart plots the recall against the rate of positive predictions. The latter measure the proportion of cases predicted as positivem while the former measure the proportion of positive cases signaled as such by the model.

The function uses the infra-structure provided by the ROCR package (Sing et al., 2009). This package allows us to obtain several measures of the predictive performance of models. We use it to obtain the recall and the rate of positive predictions of the predictions of a model.

References

Sing, T., Sander, O., Beerenwinkel, N., and Lengauer, T. (2009). ROCR: Visualizing the performance of scoring classifiers. R package version 1.0-4.

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

prediction, performance, CRchart

Examples

Run this code
## A simple example with data in package ROCR
library(ROCR)
data(ROCR.simple)

## Obtaining the Cumulative Recall chart for this problem
## Not run: 
# CRchart(ROCR.simple$predictions,ROCR.simple$labels)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace