View source: R/fun_construct.R
construct | R Documentation |
Splinets
objectThe function constructs a Splinets
object correspond to a single spline (size=1)
from a vector of knots and a matrix of proposed derivatives.
The matrix is tested for its correctness like in is.splinets
and adjusted using one of the implemented methods.
construct(knots, smorder, matder, supp = vector(), mthd = "RRM")
knots |
|
smorder |
integer, the order of smoothness; |
matder |
|
supp |
vector, either empty or two integers representing the single interval support; |
mthd |
string, one of the three methods for correction of the matrix of derivative:
The default method is |
The function constructs a Splinet
-object only over a single interval support.
Combining with the function lincom
allows to introduce a multi-component support.
A Splinets
-object corresponding to a single spline.
Liu, X., Nassar, H., Podgorski, K. "Dyadic diagonalization of positive definite band matrices and efficient B-spline orthogonalization." Journal of Computational and Applied Mathematics (2022) <https://doi.org/10.1016/j.cam.2022.114444>.
Podgorski, K. (2021)
"Splinets
– splines through the Taylor expansion, their support sets and orthogonal bases." <arXiv:2102.00733>.
Nassar, H., Podgorski, K. (2023) "Splinets 1.5.0 – Periodic Splinets." <arXiv:2302.07552>
is.splinets
for diagnostic of Splinets
-objects;
gather
and subsample
for combining and subsampling Splinets
-objects, respectively,
plot,Splinets-method
for a plotting method for Splinets
-objects;
lincomb
for combining splines with more complex than a single interval support sets;
#-------------------------------------------------------------# #---Building 'Splinets' using different derviative matching---# #-------------------------------------------------------------# n=17; k=4 set.seed(5) xi=sort(runif(n+2)); xi[1]=0; xi[n+1]=1 #Random matrix of derivatives -- the noise (wild) case to be corrected S=matrix(rnorm((n+2)*(k+1)),ncol=(k+1)) spl=construct(xi,k,S) #construction of an object, the order of knots is corrected is.splinets(spl)[[1]] #validation spl=construct(xi,k,S,mthd='CRFC') #another method of the derivative matching is.splinets(spl)[[1]] spl=construct(xi,k,S,mthd='CRLC') #one more method is.splinets(spl)[[1]] #-----------------------------------------------------# #---------Building not over the full support----------# #-----------------------------------------------------# set.seed(5) n=20; xi=sort(runif(n+2));xi[1]=0;xi[n+2]=1 spl=construct(xi,k,S) #construction of a spline as the 'Splinets' object over the entire range is.splinets(spl)[[1]] #verification of the conditions supp=c(3,17) #definition of the single interval support SS=matrix(rnorm((supp[2]-supp[1]+1)*(k+1)),ncol=(k+1)) #The matrix of derivatives #over the support range sspl=construct(xi,k,SS,supp=supp) #construction of a spline as the 'Splinets' object #with the given support range is.splinets(sspl)[[1]] #Verification sspl@knots sspl@supp sspl@der
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.