predict.RAP: Predict method for RAP objects

Description Usage Arguments Value Author(s) References See Also Examples

Description

Obtain prediction based on current estimate of sparse linear regression model

Usage

1
2
## 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

RAP, update.RAP

Examples

1
2
3
4
5
6
7
8
9
  # 
  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,])

rRAP documentation built on May 1, 2019, 9:30 p.m.