swh:1:snp:3a44eb759780145deea094ac2a25c5049546a085
Tip revision: c3715412cc972271c2e6d9ee895aed21b6f67c41 authored by Han Lin Shang on 31 March 2011, 15:18:38 UTC
version 2.6
version 2.6
Tip revision: c371541
plsr.R
plsr = function (Xtrain, Ytrain, Xtest, ncomp = NULL, type = c("simpls", "nipals"),
unit.weights = TRUE, weight = FALSE, beta = 0.1)
{
if(type == "simpls"){
if (unit.weights == TRUE) {
return(unitsimpls(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
}
else {
return(simpls(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
}
}
else {
return(nipals(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
}
}