Skip to contents

Writes a self-contained R script that loads the exported data and models and regenerates the boundary plots. Handles both 2D and high-dimensional (projection-based) datasets.

Usage

export_reproduce_script(
  model_names,
  has_projection = FALSE,
  slice_x = NULL,
  slice_y = NULL,
  resolution = 100,
  show_probs = FALSE,
  zoom_x = NULL,
  zoom_y = NULL,
  predict_args = NULL,
  file
)

Arguments

model_names

Character vector of model names included in the export.

has_projection

Logical, whether a projection.rds file was exported.

slice_x, slice_y

Optional feature names for the axes in 2D Slice mode.

resolution

Grid resolution (points per axis).

show_probs

Logical, whether to draw the probability surface.

zoom_x, zoom_y

Optional zoom window applied to the plots.

predict_args

Optional named list (one element per model) of the prediction arguments used in the app, such as the PPtree Rule.

file

The file path to write the script.

Value

The file path (invisibly).