Least squares on D_j(x) = exp(-|x - xi_j|^2 / lambda_j^2) with an intercept,
or on the renormalised h_j = D_j / sum D_k without one (ESL eqs 6.28-6.30).
Usage
morie_esl_rbf_network(X, y, centers, scales, normalized = FALSE, query = NULL)
Arguments
- X
Predictors, n by p.
- y
Response.
- centers
Prototypes, J by p.
- scales
J positive scales.
- normalized
Use the renormalised bases.
- query
Points to predict (default X).
Value
Named list: coefficients, fitted, rss.
References
Hastie, Tibshirani & Friedman (2009), sec. 6.7.
Examples
i <- 1:40
X <- cbind(sin(i), cos(3 * i))
morie_esl_rbf_network(X, sin(2 * i), rbind(c(0, 0), c(1, 1)), c(0.8, 1))$coefficients
#> [1] 0.2499632 -0.1908858 -0.8790612