glmnet_predict_binom: Consistent formatting for binomial cv.glmnet predictions

View source: R/glmnet_predict_binom.R

glmnet_predict_binomR Documentation

Consistent formatting for binomial cv.glmnet predictions

Description

Gets response predictions from a binomial cv.glmnet model in the same form as predictions from ranger models and as used by yardstick.

Usage

glmnet_predict_binom(fit, newx, type = "response", ...)

Arguments

fit

A model fitted with glmnet::cv.glmnet().

newx

Matrix of new values for x at which predictions are to be made. See glmnet::predict.glmnet().

type

Passed to predict() with default "response". See ?glmnet::predict.glmnet.

...

Other arguments passed to predict().

Value

A tibble of prediction probabilities with a column for each class.


jedwards24/jemodel documentation built on July 1, 2023, 3:59 p.m.