bound: Truncates predictions to ensure loss function is bounded.

Description Usage Arguments Value

View source: R/utils.R

Description

Truncates predictions to ensure loss function is bounded.

Usage

1
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.


jeremyrcoyle/sl3 documentation built on Feb. 3, 2022, 9:12 a.m.