Truncates predictions to ensure loss function is bounded.

bound(preds, bounds = 0.001)

Arguments

preds

A numeric vector of predictions to to be bounded.

bounds

Either a numeric vector of length two, giving the closed interval (lower, upper), or just a lower bound. In the latter case, the upper bound is computed as (1 - lower). The default is 0.001.

Value

Truncated predictions.