Description Format Details Usage Arguments Details Examples

This loss can be used for binary classification. The coding we have chosen
here acts on
*y \in \{-1, 1\}*.

`S4`

object.

**Loss Function:**

*
L(y, f(x)) = \log(1 + \mathrm{exp}(-2yf(x)))
*

**Gradient:**

*
\frac{δ}{δ f(x)}\ L(y, f(x)) = - \frac{y}{1 + \mathrm{exp}(2yf)}
*

**Initialization:**

*
\hat{f}^{[0]}(x) = \frac{1}{2}\mathrm{log}(p / (1 - p))
*

with

*
p = \frac{1}{n}∑\limits_{i=1}^n\mathrm{1}_{\{y^{(i)} = 1\}}
*

1 2 |

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

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

1 2 3 | ```
# Create new loss object:
bin.loss = LossBinomial$new()
bin.loss
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.