This logger computes the risk for the given training data
\(\mathcal{D} = \{(x^{(i)},\ y^{(i)})\ |\ i \in \{1, \dots, 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}\sum\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.