LossQuadratic: Quadratic loss for regression tasks.

Description Format Details Usage Arguments Details Examples

Description

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

Format

S4 object.

Details

Loss Function:

L(y, f(x)) = \frac{1}{2}( y - f(x))^2

Gradient:

\frac{δ}{δ f(x)}\ L(y, f(x)) = f(x) - y

Initialization:

\hat{f}^{[0]}(x) = \mathrm{arg~min}{c\in\mathrm{R}}{\mathrm{arg~min}}\ \frac{1}{n}∑\limits_{i=1}^n L≤ft(y^{(i)}, c\right) = \bar{y}

Usage

1
2

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_quadratic_loss.html.

Examples

1
2
3
# Create new loss object:
quadratic.loss = LossQuadratic$new()
quadratic.loss

compboost documentation built on May 2, 2019, 6:40 a.m.