orbital {orbital}R Documentation

Turn tidymodels objects into orbital objects

Description

Fitted workflows, parsnip objects, and recipes objects can be turned into an orbital object that contain all the information needed to perform predictions.

Usage

orbital(x, ...)

Arguments

x

A fitted workflow, parsnip, or recipes object.

...

Not currently used.

Details

An orbital object contains all the information that is needed to perform predictions. This makes the objects substantially smaller than the original objects. The main downside with this object is that all the input checking has been removed, and it is thus up to the user to make sure the data is correct.

The printing of orbital objects reduce the number of significant digits for easy viewing, the can be changes by using the digits argument of print() like so print(orbital_object, digits = 10). The printing likewise truncates each equation to fit on one line. This can be turned off using the truncate argument like so print(orbital_object, truncate = FALSE).

Full list of supported models and recipes steps can be found here: vignette("supported-models").

These objects will not be useful by themselves. They can be used to predict() with, or to generate code using functions such as orbital_sql() or orbital_dt().

Value

An orbital object.

Examples


library(workflows)
library(recipes)
library(parsnip)

rec_spec <- recipe(mpg ~ ., data = mtcars) %>%
  step_normalize(all_numeric_predictors())

lm_spec <- linear_reg()

wf_spec <- workflow(rec_spec, lm_spec)

wf_fit <- fit(wf_spec, mtcars)

orbital(wf_fit)

# Also works on parsnip object by itself
fit(lm_spec, mpg ~ disp, data = mtcars) %>%
  orbital()

# And prepped recipes
prep(rec_spec) %>%
  orbital()


[Package orbital version 0.2.0 Index]