predict.RAP {rRAP} | R Documentation |
Predict method for RAP objects
Description
Obtain prediction based on current estimate of sparse linear regression model
Usage
## S3 method for class 'RAP'
predict(object, Xnew, ...)
Arguments
object |
Current RAP object |
Xnew |
New observation from which to predict |
... |
Additional arguments |
Value
Produces a matrix of predicted values
Author(s)
Ricardo Pio Monti
References
Monti et al, "A framework for adaptive regularization in streaming Lasso models", 2016
See Also
Examples
#
library(lars)
data(diabetes)
Data = cbind(diabetes$y, diabetes$x)
# initialize RAP object with a burn in of 50 observations
R = RAP(X = matrix(diabetes$x[1:50,], nrow=50),
y = diabetes$y[1:50], r = .995, eps = 0.0005, l0 = .1)
# make predictions:
#predict.RAP(object = R, Xnew = diabetes$x[50:70,])
[Package rRAP version 1.1 Index]