Learn R Programming

gencve (version 0.3)

misclassificationrate: Misclassification Rate for Class Prediction

Description

The misclassification rate is appropriate for 0-1 loss function for class prediction.

Usage

misclassificationrate(y, yp)

Arguments

y
vector of test cases
yp
corresonding vector of predictions

Value

the misclassification rate

See Also

logloss

Examples

Run this code
y <- c(3,1,1,3,3)
yh <- c(1,1,1,1,1)
misclassificationrate(y, yh)

Run the code above in your browser using DataLab