Description Usage Arguments Value Examples
View source: R/logreg.ridge.cv.R
This function logreg.ridge.cv() works to perform cross-validation to select the best lambda
1 | logreg.ridge.cv(y, X, lambdas, nfolds = 5, plot = F)
|
y |
the input y as response |
X |
the input X to fit model |
lambdas |
a vector specifies the lambda candidates |
nfolds |
an int sepecific how many folds you want to split the data |
plot |
this boolean variable specifies if you want to plot the result |
the function will return a list of following elements: lambda.min, the best lambda in the candidates; err the error list corresponding to the lambda vector, and lambda.vec specifies the lambda vector as input
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.