Description Usage Arguments Details Value
Cross Validation for Generalized Projection to Latent Structures Regression
1 2 3 4 5 6 7 8 9 10 11 12 13 |
formula |
a model formula |
data |
a training data set |
family |
the glm family. One of "gaussian", "student", "poisson", "negbinom", "binomial", "multinom", "gamma", "invgauss" |
link |
the link function. See details for more information. |
cv.method |
preferably one of "boot632" (the default), "cv", or "repeatedcv". |
nfolds |
the number of bootstrap or cross-validation folds to use. defaults to 5. |
nrep |
the number of repetitions for cv.method = "repeatedcv". defaults to 4. |
crit |
the criterion by which to evaluate the model performance. See details for more information. |
select |
the selection rule to use. Should be one of "best" or "oneSE" (the default). |
folds |
a vector of pre-set cross-validation or bootstrap folds from caret::createResample or caret::createFolds. |
The available summary statistics for the argument "crit" depend on which likelihood function is chosen for the glm family.
If the outcome is multinomial, it should be one of "Kappa" (the default), "Accuracy", "Mean_F1",
"Mean_Sensitivity", "Mean_Specificity", "Mean_Pos_Pred_Value", "Mean_Neg_Pred_Value", "Mean_Precision", "Mean_Recall",
or "Mean_Detection_Rate".
If the outcome is binomial, it should be one of "Spec" (Specificity, the default) or "Sens".
Otherwise, it should be one of "MAE" (the default) or "MSE".
#' The following link functions are available for each distribution:
Gaussian & Student's T: "identity"
Binomial & Multinomial: "logit", "probit", "cauchit", "robit" (Student T with 3 df), and "cloglog"
Poisson & Negative Binomial: "log"
Gamma: "inverse" (1 / x)
Inverse Gaussian: "invsquare" (1/x^2)
a train object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.