# classificationerror

Measures the overall error rate of the classification model in terms of fraction of predictions made by the classifier that are not correct. Interpretation: Classification Error Rate is the fraction of number of in correct predictions out of all examples, where the best value is 1 and the worst is 0.

## Syntax

Score = classificationerror(targets,predictions)

## Inputs

targets
Actual label for each observation.
Type: double
Dimension: vector
predictions
Predicted value for each observation.
Type: double
Dimension: vector

## Outputs

Score
classificationerror of the classifier.
Type: double
Dimension: scalar

## Example

Usage of classificationerror

targets = [0 1 0 1];
predictions = [1 1 1 1];
score1 = classificationerror(targets, predictions);
> score1
score1 = 0.5