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).
compute_error(x, response_name, true_response, loss,
transposed_response = FALSE)
sgl object containing responses
the name of the response.
the true response
the loss function.
have the response list been transposed with transpose_response_elements
a vector or matrrix with the computed error rates