tidy_predict.multialpha.repeated.cv.glmnet: tidy_predict.multialpha.repeated.cv.glmnet

View source: R/dCVnet_utilities.R

tidy_predict.multialpha.repeated.cv.glmnetR Documentation

tidy_predict.multialpha.repeated.cv.glmnet

Description

return a dataframe of glmnet predictions associated with outcomes (when these are provided). Standardises return over different model families.

Usage

tidy_predict.multialpha.repeated.cv.glmnet(
  mod,
  newx,
  s = NULL,
  alpha = NULL,
  newy = NULL,
  newoffset = NULL,
  label = "",
  binomial_thresh = 0.5,
  ...
)

Arguments

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 multialpha.repeated.cv.glmnet.

alpha

specify an alpha, or leave NULL to use the optimal alpha identified by multialpha.repeated.cv.glmnet.

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 predict.glmnet


AndrewLawrence/dCVnet documentation built on Sept. 24, 2024, 5:24 a.m.