predict.kerasnip_output_view: Predict Method for 'kerasnip_output_view' Objects

View source: R/output_view.R

predict.kerasnip_output_viewR Documentation

Predict Method for kerasnip_output_view Objects

Description

Predicts from the wrapped multi-output workflow, then selects and renames object$output's columns down to the standard single-output shape (.pred, .pred_class, ⁠.pred_<level>⁠, or .pred/.pred_lower/ .pred_upper), so the result reads like a single-output predict() call.

Usage

## S3 method for class 'kerasnip_output_view'
predict(object, new_data, type = NULL, ...)

Arguments

object

A kerasnip_output_view.

new_data

A data frame of predictors.

type

One of "numeric", "class", "prob", "conf_int", or "pred_int". Defaults to "class" for a classification view, "numeric" otherwise.

...

Passed to predict() on the wrapped workflow.

Value

A tibble in the standard single-output prediction shape.


kerasnip documentation built on Sept. 4, 2026, 1:06 a.m.