Learn R Programming

mlpack (version 4.8.0)

predict.mlpack_lars: LARS Prediction

Description

An implementation of Least Angle Regression (stagewise/lasso), also known as LARS. This program can use a pre-trained LARS/LASSO/Elastic Net model to output regression predictions from a test set.

Usage

# S3 method for mlpack_lars
predict(object, newdata, ...)

lars_predict(input_model, test, verbose = getOption("mlpack.verbose", FALSE))

Value

A list with several components defining the class attributes:

predictions

Matrix containing predicted responses (numeric matrix).

Arguments

object

An instantiated model object for which prediction is desired

newdata

A test data set

...

Additional optional arguments affecting the prediction

input_model

Trained LARS model to use (LARS).

test

Matrix containing points to regress on (test points) (numeric matrix).

verbose

Display informational messages and the full list of parameters and timers at the end of execution. Default value "getOption("mlpack.verbose", FALSE)" (logical).

Author

mlpack developers

Examples

Run this code
# \dontrun{ pred <- predict(model, newdata=X_test) }

Run the code above in your browser using DataLab