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

## Format

S4 object.

## Details

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

## Usage

LossAbsolute$new() LossAbsolute$new(offset)


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

## Details

This class is a wrapper around the pure C++ implementation. To see the functionality of the C++ class visit https://schalkdaniel.github.io/compboost/cpp_man/html/classloss_1_1_absolute_loss.html.

## Examples


# Create new loss object:
absolute_loss = LossAbsolute\$new()
absolute_loss#>
#> LossAbsolute Loss:
#>
#>   Loss function: L(y,x) = |y - f(x)|
#>
#>
#>