Learn R Programming

rRAP (version 1.1)

rRAP-package: Real-Time Adaptive Penalization for Streaming Lasso Models

Description

This package provides an implementation of the Real-time adaptive penalization (RAP) algorithm through which to iteratively update a regularization parameter in a streaming context.

Arguments

Details

Package:
rRAP
Type:
Package
Version:
1.0
Date:
2016-09-29
License:
GPL-2

References

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

See Also

RAP, update.RAP, predict.RAP

Examples

Run this code
  # Recreate Figure 1 from Monti et al 2016
  library(lars)
  data(diabetes)
  Data = cbind(diabetes$y, diabetes$x)
  # initialize RAP object
  R = RAP(X = matrix(diabetes$x[1,], nrow=1), y = diabetes$y[1], r = .995, eps = 0.0005, l0 = .1)
  # iteratively update:
  ## Not run: 
#   for (i in 2:nrow(Data)){
#     R = update.RAP(RAPobj=R, Ynew = diabetes$y[i], Xnew=matrix(diabetes$x[i,], nrow=1))
#   }
#   ## End(Not run)

Run the code above in your browser using DataLab