| sam | R Documentation |
Fit a sparse additive model by dispatching to the appropriate family-specific
function (samQL, samLL, samEL, or samHL).
sam(X, y, p = 3, family = c("gaussian", "binomial", "poisson", "hinge"), ...)
X |
Numeric training matrix with |
y |
Response vector of length |
p |
The number of basis spline functions. The default value is 3. |
family |
A string specifying the loss family. One of |
... |
Additional arguments passed to the family-specific function. |
An S3 object of class samQL, samLL, samEL, or
samHL, depending on the chosen family.
samQL, samLL, samEL,
samHL
n <- 100; d <- 50
X <- matrix(runif(n * d), n, d)
y <- rnorm(n)
fit <- sam(X, y, family = "gaussian")
fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.