Description Usage Arguments Details Value Examples
Does k
-fold cross-validation for rgam
.
1 2 3 4 |
x |
Input matrix, of dimension |
y |
Response |
lambda |
A user-supplied |
family |
Response type. Either |
offset |
Offset vector as in |
init_nz |
A vector specifying which features we must include when computing the non-linear features. Default is to construct non-linear features for all given features. |
gamma |
Scale factor for non-linear features (vs. original features),
to be between 0 and 1. Default is 0.8 if |
nfolds |
Number of folds for CV (default is 10). Although |
foldid |
An optional vector of values between 1 and |
keep |
If |
parallel |
If TRUE, use parallel foreach to fit each fold. Must
register parallel before hand, such as doMC or others. Note that this also
passes |
verbose |
Print information as model is being fit? Default is
|
... |
Other arguments that can be passed to |
The function runs rgam
nfolds+1 times; the first to get the lambda
sequence, and then the remainder to compute the fit with each of the folds
omitted. The error is accumulated, and the average error and standard
deviation over the folds is computed.
Note that cv.rgam
only does cross-validation for lambda but not for
the degrees of freedom hyperparameter.
An object of class "cv.rgam"
.
glmfit |
A fitted |
lambda |
The values of |
nzero_feat |
The number of non-zero features for the model |
nzero_lin |
The number of non-zero linear components for the model
|
nzero_nonlin |
The number of non-zero non-linear components for the
model |
fit.preval |
If |
cvm |
The mean cross-validated error: a vector of length
|
cvse |
Estimate of standard error of |
cvlo |
Lower curve = |
cvup |
Upper curve = |
lambda.min |
The value of |
lambda.1se |
The largest value of |
foldid |
If |
name |
Name of error measurement used for CV. |
call |
The call that produced this object. |
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.