Learn R Programming

emil (version 1.1-6)

error.fun: Performance estimation functions

Description

These functions determine the performance of fitted model based on its predictions. They are used both for evaluating whole modeling procedures and to tune model parameters, i.e. find the parameter values with the best performance. The parameter tuning routine is designed to minimize its error function (or optimization criteria), which is why functions that are to be maximized must have their sign changed, like neg.auc.

Usage

error.rate(true, pred)

neg.auc(true, pred)

rmse(true, pred)

mse(true, pred)

neg.harrell.C(true, pred)

Arguments

true
The true response values, be it class labels, numeric values or survival outcomes.
pred
A prediction object.

Details

Custom performance estimation functions should be implemented as follows:

function(true, pred) [object Object],[object Object]

In most cases the true response and the predictions are of the same type, e.g. true and fitted values in a regression or class labels in a classification problem, but it is not a requirement. An example of different types could be if the prediction function produce class probabilities for all classes rather than one label, or the risks that the observations will experience the event of interest, to be compared to the actual outcome that it did occur or has not yet occurred at a specific time point. See neg.harrell.C for an example of the latter.

See Also

emil, neg.gmpa, modeling.procedure, emil.extensions