View source: R/dCVnet_utilities.R
tidy_predict.multialpha.repeated.cv.glmnet | R Documentation |
return a dataframe of glmnet predictions associated with outcomes (when these are provided). Standardises return over different model families.
tidy_predict.multialpha.repeated.cv.glmnet(
mod,
newx,
s = NULL,
alpha = NULL,
newy = NULL,
newoffset = NULL,
label = "",
binomial_thresh = 0.5,
...
)
mod |
a fitted glmnet object (alpha is determined by the object) |
newx |
new values of x for which predictions are desired. |
s |
specify a lambda, or leave NULL to use the optimal lambda
identified by |
alpha |
specify an alpha, or leave NULL to use the optimal alpha
identified by |
newy |
outcome associated with newx. If provided these will be included in the output (useful for subsequent performance assessment). |
newoffset |
if an offset is used in the fit, then one must be supplied for making predictions. |
label |
an optional label (value is added in column "label") |
binomial_thresh |
this allows non-default thresholds to be used for classification. This is only relevant for binary classification. E.g. for an imbalanced binary outcome with 70:30 allocation, setting the decision threshold to 0.7 gives a better balance of sensitivity and specificity without requiring threshold tuning (as in AUC optimal threshold). |
... |
passed to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.