Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cost.curves

Plot Cost Curves


Description

This function plots Cost Curves of several classification predictions.

Usage

cost.curves(predictions, gt, methods.names = NULL)

Arguments

predictions

The predictions of a classification model (factor or vector).

gt

Actual labels of the dataset (factor or vector).

methods.names

The name of the compared methods (vector).

Value

The evaluation of the predictions (numeric value).

See Also

Examples

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"))

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.