Description Usage Arguments Value
View source: R/grid_ridge_lambda.R
Computes prediction errors for a grid of ridge regression models for a specified value of lambda
1 2 3 4 5 6 7 8 9 10 11 | grid_ridge_lambda(
x,
z,
y,
yz,
var_order = NULL,
lambda,
x1x1inv = NULL,
grid.size = p,
errors_mean = TRUE
)
|
x |
design matrix for training |
z |
design matrix for testing |
y |
response for training |
yz |
response for testing |
var_order |
For user-specified ordering of variables. Indices start at 0, start with least important variable and end with most. By default order will be induced from scaling of columns in design matrix |
lambda |
Value of lambda to be used for the calculation |
x1x1inv |
If this is already computed then it can be passed here. Only for use within grid_ridge |
grid.size |
Number of subsets of variables for which a solution path will be computed for |
errors_mean |
Controls whether MSPE or SPE (without dividing by sample size) is returned. Used only for within cv_grid_ridge |
A vector of errors of length grid.size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.