Description Usage Arguments Author(s) References See Also Examples
View source: R/hier_basis_additive.R
This function prints a list of size p
where p
is the number of
covariates. Each element in the list is a vector of strings showing the polynomial
representation of each individual component function.
1 | view.model.addHierBasis(object, lam.index = 1, digits = 3)
|
object |
An object of class |
lam.index |
The index of the |
digits |
The significant figures printed. |
Asad Haris (aharis@uw.edu), Ali Shojaie and Noah Simon
Haris, A., Shojaie, A. and Simon, N. (2018). Nonparametric Regression with Adaptive Smoothness via a Convex Hierarchical Penalty. Available on request by authors.
AdditiveHierBasis
, print.addHierBasis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require(Matrix)
set.seed(1)
# Generate the points x.
n <- 100
p <- 30
x <- matrix(rnorm(n*p), ncol = p)
# A simple model with 3 non-zero functions.
y <- rnorm(n, sd = 0.1) + sin(x[, 1]) + x[, 2] + (x[, 3])^3
mod <- AdditiveHierBasis(x, y, nbasis = 50, max.lambda = 30)
view.model.addHierBasis(mod, 30)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.