predict.sparsestep: Make predictions from a SparseStep model

Description Usage Arguments Value Author(s) References Examples

View source: R/predict.sparsestep.R

Description

Predicts the outcome variable for the SparseStep model for each value of lambda supplied to the model.

Usage

1
2
## S3 method for class 'sparsestep'
predict(object, newx, ...)

Arguments

object

Fitted sparsestep object

newx

Matrix of new values for x at which predictions are to be made.

...

further argument are ignored

Value

a matrix of numerical predictions of size nobs x nlambda

Author(s)

Gerrit J.J. van den Burg, Patrick J.F. Groenen, Andreas Alfons
Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>

References

Van den Burg, G.J.J., Groenen, P.J.F. and Alfons, A. (2017). SparseStep: Approximating the Counting Norm for Sparse Regularization, arXiv preprint arXiv:1701.06967 [stat.ME]. URL https://arxiv.org/abs/1701.06967.

Examples

1
2
3
4
x <- matrix(rnorm(100*20), 100, 20)
y <- rnorm(100)
fit <- sparsestep(x, y)
yhat <- predict(fit, x)

GjjvdBurg/SparseStep documentation built on Jan. 23, 2021, 8:32 a.m.