.get_prediction_column_names {parsnip} | R Documentation |
Obtain names of prediction columns for a fitted model or workflow
Description
.get_prediction_column_names()
returns a list that has the names of the
columns for the primary prediction types for a model.
Usage
.get_prediction_column_names(x, syms = FALSE)
Arguments
x |
A fitted parsnip model (class |
syms |
Should the column names be converted to symbols? Defaults to |
Value
A list with elements "estimate"
and "probabilities"
.
Examples
library(dplyr)
library(modeldata)
data("two_class_dat")
levels(two_class_dat$Class)
lr_fit <- logistic_reg() |> fit(Class ~ ., data = two_class_dat)
.get_prediction_column_names(lr_fit)
.get_prediction_column_names(lr_fit, syms = TRUE)
[Package parsnip version 1.3.2 Index]