predict.lantern_logistic_reg: Predict from a 'lantern_logistic_reg'

Description Usage Arguments Value

View source: R/lantern_logistic_reg-predict.R

Description

Predict from a lantern_logistic_reg

Usage

1
2
## S3 method for class 'lantern_logistic_reg'
predict(object, new_data, type = NULL, epoch = NULL, ...)

Arguments

object

A lantern_logistic_reg object.

new_data

A data frame or matrix of new predictors.

type

A single character. The type of predictions to generate. Valid options are:

  • "class" for hard class predictions

  • "prob" for soft class predictions (i.e., class probabilities)

epoch

An integer for the epoch to make predictions from. If this value is larger than the maximum number that was fit, a warning is issued and the parameters from the last epoch are used.

...

Not used, but required for extensibility.

Value

A tibble of predictions. The number of rows in the tibble is guaranteed to be the same as the number of rows in new_data.


tidymodels/lantern documentation built on March 8, 2021, 8:53 a.m.