Learn R Programming

EMP (version 2.0.0)

empRocInfo: empRocInfo

Description

Provides information related to the ROC given a prediction object. This function is not to be called directly in a normal use case. Instead, the other functions in this package call this function when necessary.

Usage

empRocInfo(prediction)

Arguments

prediction
A prediction object, output of the prediction function in the ROCR package.

Value

  • A RocInfo object with six components.
  • n0Number of positive observations.
  • n1Number of negative observations.
  • pi0Prior probability of positive observation.
  • pi1Prior probability of negative observation.
  • F0Convex hull of ROC y values.
  • F1Convex hull of ROC x values.

References

Verbraken, T., Wouter, V. and Baesens, B. (2013). A Novel Profit Maximizing Metric for Measuring Classification Performance of Customer Churn Prediction Models. Knowledge and Data Engineering, IEEE Transactions on. 25 (5): 961-973. Available Online: http://ieeexplore.ieee.org/iel5/69/6486492/06165289.pdf?arnumber=6165289 Verbraken, T., Bravo, C., Weber, R. and Baesens, B. (2014). Development and application of consumer credit scoring models using profit-based classification measures. European Journal of Operational Research. 238 (2): 505 - 513. Available Online: http://www.sciencedirect.com/science/article/pii/S0377221714003105

See Also

See Also empChurn, empCreditScoring, prediction.

Examples

Run this code
# Construct artificial probability scores and true class labels
score.ex <- runif(1000, 0, 1)
class.ex <- unlist(lapply(score.ex, function(x){rbinom(1,1,x)}))

# Make prediction object (ROCR package)
pred.ex <- prediction(score.ex, class.ex)

# Get convex ROC info
empRocInfo(pred.ex)

Run the code above in your browser using DataLab