evaluate_by_loss {predbayescor}R Documentation

calculating the total loss of prediction results

Description

Calculates the average loss of predictions based on threshold with threshold. Note that this threshold has 1-1 mapping with the ratio of the loss of assigning 0 to 1 to the loss of assigning 1 to 0: threshold=1-1/(1+ratio).

Usage

evaluate_by_loss ( y.true, pred.prob, threshold=0.5)

Arguments

y.true a vector containing the true response.
pred.prob a vector containing the predictive probabilities.
threshold When predictive probability is greater than threshold, the response is predicted as 1.

Value

loss the average loss, with attrib "sd" storing the estimate of the standard error of this loss.

[Package predbayescor version 1.1-4 Index]