| cost.curves | R Documentation | 
This function plots Cost Curves of several classification predictions.
cost.curves(predictions, gt, methods.names = NULL)
| predictions | The predictions of a classification model ( | 
| gt | Actual labels of the dataset ( | 
| methods.names | The name of the compared methods ( | 
The evaluation of the predictions (numeric value).
roc.curves, performance
require (datasets)
data (iris)
d = iris
levels (d [, 5]) = c ("+", "+", "-") # Building a two classes dataset
model.nb = NB (d [, -5], d [, 5])
model.lda = LDA (d [, -5], d [, 5])
pred.nb = predict (model.nb, d [, -5])
pred.lda = predict (model.lda, d [, -5])
cost.curves (cbind (pred.nb, pred.lda), d [, 5], c ("NB", "LDA"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.