predict.grid_lasso: Predictions for continuous response model

Description Usage Arguments Value

View source: R/predict.grid_lasso.R

Description

Returns predicted response from grid lasso model with new data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'grid_lasso'
predict(
  object,
  newx,
  l = NULL,
  ll = NULL,
  missing.data = FALSE,
  psd.method = "enet",
  ...
)

Arguments

object

Object as returned by grid_lasso or cv_grid_lasso, provided return.list == T

newx

Design matrix for new observations

l

Specify grid point

ll

Specify point on lambda grid (optional)

missing.data

If TRUE then will use (slower) procedure that corrects for missing data, and will only return a (constant shifted) mean square error rather than actual predictions

psd.method

The way that the gram matrix is made positive semidefinite. By default an elastic net term, alternatives are "coco" for CoCoLasso

...

Additional arguments to pass to other predict methods

Value

Vector of predictions (or constant-shifted error if missing.data = TRUE)


bgs25/SubsetGridRegression documentation built on Dec. 19, 2021, 8:50 a.m.