powered by
Curves for the analysis of tradeoffs between metrics for assessing performance in classifying binary outcomes over the range of possible cutoff probabilities. Available curves include receiver operating characteristic (ROC) and precision recall.
Curves(...)performance_curve(x, ...)# S3 method for Resamples performance_curve(x, metrics = c(MachineShop::tpr, MachineShop::fpr), na.rm = TRUE, ...)# S3 method for default performance_curve(x, y, metrics = c(MachineShop::tpr, MachineShop::fpr), na.rm = TRUE, ...)
performance_curve(x, ...)
# S3 method for Resamples performance_curve(x, metrics = c(MachineShop::tpr, MachineShop::fpr), na.rm = TRUE, ...)
# S3 method for default performance_curve(x, y, metrics = c(MachineShop::tpr, MachineShop::fpr), na.rm = TRUE, ...)
named or unnamed performance_curve output to combine together with the Curves constructor.
performance_curve
Curves
observed responses or Resamples object of observed and predicted responses.
Resamples
list of two performance metrics for the analysis [default: ROC metrics]. Precision recall curves can be obtained with c(precision, recall).
c(precision, recall)
logical indicating whether to remove observed or predicted responses that are NA when calculating metrics.
NA
predicted responses.
Curves class object that inherits from data.frame.
data.frame
response, predict, resample, metrics, auc, plot, summary
response
predict
resample
metrics
auc
plot
summary
# NOT RUN { library(MASS) res <- resample(type ~ ., data = Pima.tr, model = GBMModel) ## ROC curve roc <- performance_curve(res) plot(roc) auc(roc) # }
Run the code above in your browser using DataLab