energylossall {engression} | R Documentation |
Energy Loss Calculation (Extended Output)
Description
This function calculates the energy loss for given tensors, similar to energyloss()
. The loss is calculated
as the mean of the L2 norms between yt
and mxt
and between yt
and mxpt
,
subtracted by half the mean of the L2 norm between mxt
and mxpt
. Unlike energyloss()
, this function
also returns the prediction loss s1 = E(|yt-mxt|) and variance loss s2 = E(|mxt-mxpt'|) as part of the output.
Usage
energylossall(yt, mxt, mxpt)
Arguments
yt |
A tensor representing the target values. |
mxt |
A tensor representing the model's stochastic predictions. |
mxpt |
A tensor representing another draw of the model's stochastic predictions. |
Value
A vector containing the calculated energy loss, s1
, and s2
.
[Package engression version 0.1.4 Index]