compute_error: Helper function for computing error rates

Description Usage Arguments Value Author(s)

Description

This function can be used to compute mean error rates. It is consist with the use cases of the Err genetic function. The loss function should be of the form function(x, y) and must return a single numeric number, with x a list of true responses and y a list of responses (one list element for each sample).

Usage

1
2
compute_error(x, response_name, true_response, loss,
  transposed_response = FALSE)

Arguments

x

sgl object containing responses

response_name

the name of the response.

true_response

the true response

loss

the loss function.

transposed_response

have the response list been transposed with transpose_response_elements

Value

a vector or matrrix with the computed error rates

Author(s)

Martin Vincent


sglOptim documentation built on May 8, 2019, 1:02 a.m.