A step of the momento_native implementation. Called by momento_reconstruction_curve.
See the file header for the source the module follows.
the source it follows.
Usage
momento_masked_loss(truth, reconstruction, mask)
Arguments
- truth
A vector; its length is taken and its elements indexed.
- reconstruction
A vector; its length is taken and its elements indexed.
- mask
A vector; its length is taken and its elements indexed.
Value
A list with mse, n_scored, scored.
Examples
momento_masked_loss(truth = c(1, 2, 3, 4), reconstruction = c(1.1, 2, 2.5, 4), mask = c(0, 1, 1, 0))$mse
#> [1] 0.125