Skip to contents

Called by parsnip::fit(); use that. Returns an AI function (see ai()): parsnip::extract_fit_engine() gives it back, callable on columns.

Usage

ai_model_fit(
  formula,
  data,
  description = NULL,
  examples = 0L,
  name = NULL,
  method = "labeled",
  samples = 1L,
  seed = 0L,
  budget = 300L,
  teacher = NULL,
  ...
)

ai_model_predict(object, new_data, type)

Arguments

formula, data

The outcome and predictors, and the training data.

description, examples, name

See ai_model().

method

"labeled", "bootstrap" or "gepa".

samples

Answers per row at prediction time.

seed

The random seed for choosing examples.

budget

Calls "gepa" may make.

teacher

The model that writes instructions ("gepa") or examples ("bootstrap").

...

Settings, as in ai_config() (lm, temperature, ...).

object

A fitted AI function.

new_data

A data frame.

type

"class", "prob" or "numeric".

Value

An AI function.