LossQuadratic | R Documentation |
This loss can be used for regression with y \in \mathrm{R}
.
offset |
( |
S4 object.
Loss Function:
L(y, f(x)) = \frac{1}{2}( y - f(x))^2
Gradient:
\frac{\delta}{\delta 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}\sum\limits_{i=1}^n
L\left(y^{(i)}, c\right) = \bar{y}
LossQuadratic$new() LossQuadratic$new(offset)
$loss()
: matrix(), matrix() -> matrix()
$gradient()
: matrix(), matrix() -> matrix()
$constInit()
: matrix() -> matrix()
$calculatePseudoResiduals()
: matrix(), matrix() -> matrix()
$getLossType()
: () -> character(1)
# Create new loss object:
quadratic_loss = LossQuadratic$new()
quadratic_loss
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.