Projects spectra onto a PLS space and then reconstructs it back.
reconstruction_error(x,
projection_mat,
xloadings,
scale,
Xcenter,
Xscale,
scale_back = FALSE)
a matrix of 1 row and 1 column.
a matrix to project.
the projection matrix generated by the opls_get_basics
function.
the loadings matrix generated by the opls_get_basics
function.
logical indicating if scaling is required
a matrix of one row with the centering values
a matrix of one row with the scaling values
compute the reconstruction error after de-centering the data and de-scaling it.
Leonardo Ramirez-Lopez