prediction object. This function is used to
  transform the input data (which can be in vector, matrix, data frame, or
  list form) into a standardized format.prediction(predictions, labels, label.ordering = NULL)prediction.< relation (e.g. 0 < 1, -1 < 1, 'a' < 'b',
  FALSE < TRUE). Use label.ordering to override this default
  ordering. Please note that the ordering can be locale-dependent
  e.g. for character labels '-1' and '1'.
  
  Currently, ROCR supports only binary classification (extensions toward
  multiclass classification are scheduled for the next release,
  however). If there are more than two distinct label symbols, execution
  stops with an error message. If all predictions use the same two
  symbols that are used for the labels, categorical predictions are
  assumed. If there are more than two predicted values, but all numeric,
  continuous predictions are assumed (i.e. a scoring
  classifier). Otherwise, if more than two symbols occur in the
  predictions, and not all of them are numeric, execution stops with an
  error message.prediction-class, performance,
  performance-class, plot.performance# create a simple prediction object
library(ROCR)
data(ROCR.simple)
pred <- prediction(ROCR.simple$predictions,ROCR.simple$labels)Run the code above in your browser using DataLab