Learn R Programming

bst (version 0.3-24)

evalerr: Compute prediction errors

Description

Compute prediction errors for classification and regression problems.

Usage

evalerr(family, y, yhat)

Value

For classification, returns misclassification error. For regression, returns mean squared error.

Arguments

family

a family used in bst. Classification or regression family.

y

response variable. For classification problems, y must be 1/-1.

yhat

predicted values.

Author

Zhu Wang

Details

For classification, returns misclassification error. For regression, returns mean squared error.