Skip to contents

This function is the prototype of a function to calculate the error of validated predictions. It fulfills the minimal requirements in its parameters and return value to work as the val_error_fun attribute of a Model object.

Usage

val_error_fun_prototype(y, y_hat)

Arguments

y

numeric vector. True outcomes.

y_hat

numeric vector. Predicted outcomes. Must have the same length as y. Samples in y and y_hat must coincide by order.

Value

A numeric scalar.