For internal use only!.
opls_cv_cpp(X, Y, scale, method,
mindices, pindices,
min_component, ncomp,
new_x,
maxiter, tol,
wapls_grid,
algorithm,
statistics = TRUE)
if statistics = true
a list containing the following one-row matrices:
rmse_seg
: the RMSEs.
st_rmse_seg
: the standardized RMSEs.
rsq_seg
: the coefficients of determination.
if statistics = false
a list containing the following one-row matrices:
predictions
: the predictions of each of the validation
segments in pindices
. Each column in pindices
contains the
validation indices of a segment.
st_rmse_seg
: the standardized RMSEs.
rsq_seg
: the coefficients of determination.
If method = "wapls"
, data of the pls weights are output in this
list(compweights
).
If method = "completewapls1"
, data of all the combination of
components passed in wapls_grid
are
output in this list(complete_compweights
).
a matrix of predictor variables.
a matrix of a single response variable.
a logical indicating whether the matrix of predictors
(X
) must be scaled.
the method used for regression. One of the following options:
'pls'
or 'wapls'
or 'completewapls1p'
.
a matrix with n
rows and m
columns where
m
is equivalent to the number of resampling iterations. The elements
of each column indicate the indices of the observations to be used for
modeling at each iteration.
a matrix with k
rows and m
columns where
m
is equivalent to the number of
resampling iterations. The elements of each column indicate the indices of
the observations to be used for predicting at each iteration.
an integer indicating the number of minimum pls
components (if the method = 'pls'
).
an integer indicating the number of pls components.
a matrix of one row corresponding to the observation to be
predicted (if the method = 'wapls'
).
maximum number of iterations.
limit for convergence of the algorithm in the nipals algorithm.
the grid on which the search for the best combination of
minimum and maximum pls factors of 'wapls'
is based on in case
method = 'completewapls1p'
.
either pls ('pls'
) or modified pls ('mpls'
).
See get_weigths
function.
a logical value indicating whether the precision and accuracy statistics are to be returned, otherwise the predictions for each validation segment are retrieved.
Leonardo Ramirez-Lopez