This is an R implementation for the data driven orthogonal basis selection for functional data analysis paper. For more details see the arxiv link for the paper, Machine Learning Assisted Orthonormal Basis Selection for Functional Data Analysis.
In this work, we propose machine learning style techniques for the placement of the knots. The chosen knots are used to build orthogonal splines basis functions fk(t), k = 1, ..., K that are used in basis function expansion to convert the data from discrete recorded data into a functional one. The method address the problem of the choice of the initial functional basis selection for functional data analysis.
For a more detailed description see the paper.
Input : knot search interval, θ - validation hyperparameter, 𝒳train - training data, 𝒳valid
-
validation data - Find the first global knot ξ using equation on 𝒳train.
-
Add split to I at the location of ξ and add ξ to 𝒦(0), the initial set of knots.
-
Set s = 1.
While stopping condition (see the stopping condition in the paper) on 𝒳valid is satisfied
- Find the new optimal placement using equation ;
- Add split to I at the location of the new selected knot ξs.
- s = s + 1
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("ranibasna/ddk")
For reproducing the results presented in the paper for the Wine data, see this link