reconstruction_error: Projection to pls and then re-construction

View source: R/RcppExports.R

reconstruction_errorR Documentation

Projection to pls and then re-construction

Description

Projects spectra onto a PLS space and then reconstructs it back.

Usage

reconstruction_error(x, 
                            projection_mat, 
                            xloadings, 
                            scale, 
                            Xcenter, 
                            Xscale, 
                            scale_back = FALSE)

Arguments

x

a matrix to project.

projection_mat

the projection matrix generated by the opls_get_basics function.

xloadings

the loadings matrix generated by the opls_get_basics function.

scale

logical indicating if scaling is required

Xcenter

a matrix of one row with the centering values

Xscale

a matrix of one row with the scaling values

scale_back

compute the reconstruction error after de-centering the data and de-scaling it.

Value

a matrix of 1 row and 1 column.

Author(s)

Leonardo Ramirez-Lopez


l-ramirez-lopez/resemble documentation built on April 20, 2023, 10:44 p.m.