ddsPLS {ddsPLS} | R Documentation |
Data-Driven Sparse Partial Least Squares
Description
The main function of the package. It does both start the ddsPLS algorithm,
using bootstrap analysis. Also it estimates automatically the number of
components and the regularization coefficients.
One regularization parameter per component only is needed to select both in
x
and in y
. Build the optimal model, of the class
ddsPLS
.
Among the different parameters, the lambda
is the vector of parameters that are
tested by the algorithm along each component for each bootstrap sample. The total number
of bootstrap samples is fixed by the parameter n_B
, for this parameter, the more
the merrier, even if costs more in computation time.
This gives access to 3 S3 methods (summary.ddsPLS
, plot.ddsPLS
and predict.ddsPLS
).
Usage
ddsPLS(
X,
Y,
criterion = "diffR2Q2",
doBoot = TRUE,
LD = FALSE,
lambdas = NULL,
n_B = 50,
n_lambdas = 100,
lambda_roof = NULL,
lowQ2 = 0,
NCORES = 1,
errorMin = 1e-09,
verbose = FALSE
)
Arguments
X |
matrix, the covariate matrix (n,p). |
Y |
matrix, the response matrix (n,q). |
criterion |
character, whether |
doBoot |
logical, whether performing bootstrap operations, default to
|
LD |
Boolean, wether or not consider Low-Dimensional dataset. |
lambdas |
vector, the to be tested values for |
n_B |
integer, the number of to be simulated bootstrap samples.
Default to |
n_lambdas |
integer, the number of lambda values. Taken into account
only if |
lambda_roof |
limit value to be considered in the optimization. |
lowQ2 |
real, the minimum value of Q^2_B to accept the
current lambda value. Default to |
NCORES |
integer, the number of cores used. Default to |
errorMin |
real, not to be used. |
verbose |
boolean, whether to print current results. Defaut to
|
Value
A list with different interesting output describing the built model
See Also
summary.ddsPLS
, plot.ddsPLS
, predict.ddsPLS
Examples
# n <- 100 ; d <- 2 ; p <- 20 ; q <- 2
# phi <- matrix(rnorm(n*d),n,d)
# a <- rep(1,p/4) ; b <- rep(1,p/2)
# X <- phi%*%matrix(c(1*a,0*a,0*b,
# 1*a,3*b,0*a),nrow = d,byrow = TRUE) + matrix(rnorm(n*p),n,p)
# Y <- phi%*%matrix(c(1,0,
# 0,0),nrow = d,byrow = TRUE) + matrix(rnorm(n*q),n,q)
# model_ddsPLS <- ddsPLS(X,Y,verbose=TRUE)