LoggerInbagRisk: Logger class to log the inbag risk

Description Format Usage Arguments Details Fields Methods Examples

Description

This class logs the inbag risk for a specific loss function. It is also possible to use custom losses to log performance measures. For details see the use case or extending compboost vignette.

Format

S4 object.

Usage

1
LoggerInbagRisk$new(use_as_stopper, used_loss, eps_for_break)

Arguments

use_as_stopper [logical(1)]

Boolean to indicate if the logger should also be used as stopper.

used_loss [Loss object]

The loss used to calculate the empirical risk by taking the mean of the returned defined loss within the loss object.

eps_for_break [numeric(1)]

This argument is used if the loss is also used as stopper. If the relative improvement of the logged inbag risk falls above this boundary the stopper returns TRUE.

Details

This logger computes the risk for the given training data \mathcal{D} = \{(x^{(i)},\ y^{(i)})\ |\ i \in \{1, …, n\}\} and stores it into a vector. The empirical risk \mathcal{R} for iteration m is calculated by:

\mathcal{R}_\mathrm{emp}^{[m]} = \frac{1}{n}∑\limits_{i = 1}^n L(y^{(i)}, \hat{f}^{[m]}(x^{(i)}))

Note:

This procedure ensures, that it is possible to e.g. use the AUC or any arbitrary performance measure for risk logging. This gives just one value for risk_temp and therefore the average equals the loss function. If this is just a value (like for the AUC) then the value is returned.

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/classlogger_1_1_inbag_risk_logger.html.

Fields

This class doesn't contain public fields.

Methods

summarizeLogger()

Summarize the logger object.

Examples

1
2
3
4
5
6
7
8
# Used loss:
log.bin = LossBinomial$new()

# Define logger:
log.inbag.risk = LoggerInbagRisk$new(FALSE, log.bin, 0.05)

# Summarize logger:
log.inbag.risk$summarizeLogger()

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