Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function transforms each column of a matrix using a set of B-spline functions.
1 |
X |
data matrix |
Xtest |
optional matrix of test data |
deg |
degree of the splines. Default value is 3 |
nknot |
vector of length |
reduce.knots |
Logical variable. If |
Each column of the matrix X
represents one variable. For
each variable, we consider the set of B-splines functions
φ_1,...,φ_K that are determined by the degree deg
of the splines and the number nknot
of knots. The knots are
equidistantly based on the range of the variable. The data and – if
available – the test data is the transformed nonlinearly using the
B-splines function.
For a large amount of knots, it is possible that some columns of the
transformed matrix Z
only contain zeroes. If this is the case for
one variable and if reduce.knots=TRUE
, the amount of knots is reduced until this phenomenon does
not occur anymore. Note that the
penalized PLS algorithm runs correctly for constant columns in
Z
, unless you scale the
columns of the data.
Z |
matrix of transformed data |
Ztest |
matrix of test data, if provided. Otherwise, the transformed training data is returned. |
sizeZ |
vector of length ncol(X). Each component contains the number of basis functions for each column of X. |
Depending on the degrees of the splines - there
must be minimum number of knots. If nknot
contains too few knots,
the function automatically increases the number.
Nicole Kraemer
C. de Boor (1978) A Practical Guide to Splines, Springer.
N. Kraemer, A.-L. Boulsteix, and G. Tutz (2008). Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data. Chemometrics and Intelligent Laboratory Systems, 94, 60 - 69. http://dx.doi.org/10.1016/j.chemolab.2008.06.009
ppls.splines.cv
,graphic.ppls.splines
1 2 3 |
Loading required package: splines
Loading required package: MASS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.