measure_reconstruction_error | R Documentation |
Given two numeric matrices Xtrue
and Xrec
, compute:
MSE ("mse"
)
RMSE ("rmse"
)
R^2 ("r2"
)
MAE ("mae"
)
measure_reconstruction_error(
Xtrue,
Xrec,
metrics = c("mse", "rmse", "r2"),
by_column = FALSE
)
Xtrue |
Original data matrix, shape (n x p). |
Xrec |
Reconstructed data matrix, shape (n x p). |
metrics |
Character vector of metric names, e.g. |
by_column |
Logical, if TRUE calculate R2 metric per column and average (default: FALSE). |
A one-row tibble
with columns matching metrics
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.