predict.orbital_class {orbital}R Documentation

Prediction using orbital objects

Description

Running prediction on data frame of remote database table, without needing to load original packages used to fit model.

Usage

## S3 method for class 'orbital_class'
predict(object, new_data, ...)

Arguments

object

An orbital object.

new_data

A data frame or remote database table.

...

Not currently used.

Details

Using this function should give identical results to running predict() or bake() on the orginal object.

The prediction done will only return prediction colunms, a opposed to returning all modified functions as done with orbital_inline().

Value

A modified data frame or remote database table.

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_obj <- orbital(wf_fit)

predict(orbital_obj, mtcars)


[Package orbital version 0.2.0 Index]