Description Usage Arguments Author(s) References See Also Examples
This function computes cross-validated (minus) log-likelihoods or
prediction errors for glmpath.
1 2 3 4 5 |
x |
matrix of features |
y |
response |
data |
a list consisting of |
family |
name of a family function that represents the distribution of y to
be used in the model. It must be |
weight |
an optional vector of weights for observations |
offset |
an optional vector of offset. If a column of |
nfold |
number of folds to be used in cross-validation. Default is
|
fraction |
the fraction of L1 norm or log(λ) with respect to their
maximum values at which the CV errors are computed. Default is
|
type |
If |
mode |
If |
plot.it |
If |
se |
If |
... |
other options for glmpath |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
glmpath, plot.glmpath, predict.glmpath
1 2 3 4 5 | data(heart.data)
attach(heart.data)
cv.a <- cv.glmpath(x, y, family=binomial)
cv.b <- cv.glmpath(x, y, family=binomial, type="response")
detach(heart.data)
|
Loading required package: survival
CV Fold 1
CV Fold 2
CV Fold 3
CV Fold 4
CV Fold 5
CV Fold 6
CV Fold 7
CV Fold 8
CV Fold 9
CV Fold 10
CV Fold 1
CV Fold 2
CV Fold 3
CV Fold 4
CV Fold 5
CV Fold 6
CV Fold 7
CV Fold 8
CV Fold 9
CV Fold 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.