Learn R Programming

rRAP (version 1.1)

predict.RAP: Predict method for RAP objects

Description

Obtain prediction based on current estimate of sparse linear regression model

Usage

"predict"(object, Xnew, ...)

Arguments

object
Current RAP object
Xnew
New observation from which to predict
...
Additional arguments

Value

Produces a matrix of predicted values

References

Monti et al, "A framework for adaptive regularization in streaming Lasso models", 2016

See Also

RAP, update.RAP

Examples

Run this code
  # 
  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,])

Run the code above in your browser using DataLab