This loss can be used for regression with \(y \in \mathrm{R}\).

Format

S4 object.

Details

Loss Function: $$ L(y, f(x)) = h| y - f(x)| $$ Gradient: $$ \frac{\delta}{\delta f(x)}\ L(y, f(x)) = -h\mathrm{sign}( y - f(x)) $$ Initialization: $$ \hat{f}^{[0]}(x) = \mathrm{arg~min}_{c\in R}\ \frac{1}{n}\sum\limits_{i=1}^n L(y^{(i)}, c) = \mathrm{quantile}(y, q) $$

Usage

LossAbsolute$new()
LossAbsolute$new(quantile)
LossAbsolute$new(offset, quantile)

Arguments

offset [numeric(1)]

Numerical value which can be used to set a custom offset. If so, this value is returned instead of the loss optimal initialization.

quantile [numeric(1)]

Numerical value between 0 and 1 indicating the quantile used for boosting.

Examples

# Create new loss object: quadratic_loss = LossQuadratic$new() quadratic_loss
#> #> LossQuadratic Loss: #> #> Loss function: L(y,x) = 0.5 * (y - f(x))^2 #> #> #>