set_fit {modelenv}R Documentation

Register Fit method for Model

Description

This function is used to register a fit method for a model, engine, and mode combination.

Usage

set_fit(model, mode, eng, value)

get_fit(model)

Arguments

model

A single character string for the model type (e.g. "k_means", etc).

mode

A single character string for the model mode (e.g. "partition").

eng

A single character string for the model engine.

value

A list of values, described in the Details.

Details

The list passed to value needs the following values:

Value

A tibble

Examples


set_new_model("shallow_learning_model")
set_model_mode("shallow_learning_model", "partition")
set_model_engine("shallow_learning_model", "partition", "stats")

set_fit(
  model = "shallow_learning_model",
  mode = "partition",
  eng = "stats",
  value = list(
    interface = "formula",
    protect = c("formula", "data"),
    func = c(pkg = "stats", fun = "lm"),
    defaults = list()
  )
)

get_fit("shallow_learning_model")
get_fit("shallow_learning_model")$value


[Package modelenv version 0.1.1 Index]