Nolinear Transformation via B-splines
This function transforms each column of a matrix using a set of B-spline functions.
optional matrix of test data
degree of the splines. Default value is 3
vector of length
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
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
For a large amount of knots, it is possible that some columns of the
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.
matrix of transformed data
matrix of test data, if provided. Otherwise, the transformed training data is returned.
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.
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
1 2 3