Title: | Estimating Functions with Multivariate B-Splines |
---|---|
Description: | Generalized LassO applied to knot selection in multivariate B-splinE Regression (GLOBER) implements a novel approach for estimating functions in a multivariate nonparametric regression model based on an adaptive knot selection for B-splines using the Generalized Lasso. For further details we refer the reader to the paper Savino, M. E. and Lévy-Leduc, C. (2023), <arXiv:2306.00686>. |
Authors: | M. E. Savino |
Maintainer: | Mary E. Savino <[email protected]> |
License: | GPL-2 |
Version: | 1.0 |
Built: | 2024-11-21 06:47:36 UTC |
Source: | CRAN |
glober consists of two functions: "glober.1d.R" and "glober.2d.R". For further information on how to use these functions, we refer the reader to the vignette of the package.
Eight datasets are also provided within this package and used in examples of this manual and in the vignette.
Mary E. Savino
Maintainer: Mary E. Savino <[email protected]>
Savino, M. E. and Levy-Leduc, C. A novel approach for estimating functions in the multivariate setting based on an adaptive knot selection for B-splines with an application to a chemical system used in geoscience (2023), arXiv:2306.00686.
The evaluations were obtained by using the package with 201 input values contained in the xpred_1D.rda file.
data("f_1D")
data("f_1D")
Numeric vector of 201 values.
The evaluations were obtained by using the package with 10000 input values contained in the xpred_2D.rda file.
data("f_2D")
data("f_2D")
Numeric vector of 10000 values.
This function implements the method described in Savino, M and Levy-Leduc, C (2023) for estimating functions in the one-dimensional setting with observations which are assumed to satisfy a nonparametric regression model. The observation points belong to a compact set of .
glober.1d(x, y, xpred, ord, parallel = FALSE, nb.Cores = 1)
glober.1d(x, y, xpred, ord, parallel = FALSE, nb.Cores = 1)
x |
matrix of one column or vector containing the values of the input variables. |
y |
vector containing the corresponding response variable associated to the input values |
xpred |
matrix of one column or vector containing the input variables for which |
ord |
order of the B-spline basis used in the regression model. Default is 3 (quadratic B-splines). |
parallel |
logical, if TRUE then a parallelized version of the code is used. Default is FALSE. |
nb.Cores |
numerical, number of cores used for parallelization, if parallel is set to TRUE. |
festimated |
estimation of |
knotSelec |
selected knots used in the definition of the B-splines. |
rss |
residual sum-of-squares (RSS) of the model. |
rsq |
R-squared of the model, calculated as |
# --- Loading values of x --- # data('x_1D') # --- Loading values of the corresponding y --- # data('y_1D') # --- Loading values of xpred --- # data('xpred_1D') # --- Estimation of f at xpred --- # glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = FALSE) # --- Parallel computing --- # glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = TRUE, nb.Cores = 2)
# --- Loading values of x --- # data('x_1D') # --- Loading values of the corresponding y --- # data('y_1D') # --- Loading values of xpred --- # data('xpred_1D') # --- Estimation of f at xpred --- # glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = FALSE) # --- Parallel computing --- # glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = TRUE, nb.Cores = 2)
This function implements the method described in Savino, M and Levy-Leduc, C (2023) for estimating functions in the two-dimensional setting with observations which are assumed to satisfy a nonparametric regression model. The observation points belong to a compact set of .
glober.2d(x, y, xpred, ord, parallel = FALSE, nb.Cores = 1)
glober.2d(x, y, xpred, ord, parallel = FALSE, nb.Cores = 1)
x |
matrix of two columns containing the values of the input variables. |
y |
vector containing the corresponding response variable associated to the input values |
xpred |
matrix of one column or vector containing the input variables for which |
ord |
order of the B-spline basis used in the regression model. Default is 3 (quadratic B-splines). |
parallel |
logical, if TRUE then a parallelized version of the code is used. Default is FALSE. |
nb.Cores |
numerical, number of cores used for parallelization, if parallel is set to TRUE. |
festimated |
estimation of |
knotSelec |
list of selected knots for each dimension used in the definition of the B-splines. |
rss |
residual sum-of-squares (RSS) of the model. |
rsq |
R-squared of the model, calculated as |
# --- Loading values of x --- # data('x_2D') # --- Loading values of the corresponding y --- # data('y_2D') # --- Loading values of xpred --- # data('xpred_2D') # --- Estimation of f at xpred --- # glober.2d(x = x_2D, y = y_2D, xpred = xpred_2D, ord = 3, parallel = FALSE) # --- Parallel computing --- # glober.2d(x = x_2D, y = y_2D, xpred = xpred_2D, ord = 3, parallel = TRUE, nb.Cores = 2)
# --- Loading values of x --- # data('x_2D') # --- Loading values of the corresponding y --- # data('y_2D') # --- Loading values of xpred --- # data('xpred_2D') # --- Estimation of f at xpred --- # glober.2d(x = x_2D, y = y_2D, xpred = xpred_2D, ord = 3, parallel = FALSE) # --- Parallel computing --- # glober.2d(x = x_2D, y = y_2D, xpred = xpred_2D, ord = 3, parallel = TRUE, nb.Cores = 2)
An example of observations for the estimation of a function with one input variable.
data("x_1D")
data("x_1D")
Numeric vector of 70 values.
An example of 100 observations for the estimation of a function with two input variables.
data("x_2D")
data("x_2D")
Numeric matrix of 100 rows and 2 columns.
An example of input values containing the observation set and values for which an estimation of a given function of one input variable is needed.
data("xpred_1D")
data("xpred_1D")
Numeric vector of 201 values.
An example of input values containing the observation set and values for which an estimation of a given function of two input variables is needed.
data("xpred_2D")
data("xpred_2D")
Numeric matrix of 10000 rows and 2 columns.
An example of noisy observations obtained by adding a Gaussian noise to contained in f_1D.rda and associated to the input values contained in x_1D.rda.
data("y_1D")
data("y_1D")
Numeric vector of 70 values.
An example of noisy observations obtained by adding a Gaussian noise to contained in f_2D.rda and associated to the input values contained in x_2D.rda.
data("y_2D")
data("y_2D")
Numeric vector of 100 values.