export_grid_csv: Export grid predictions to CSV

View source: R/app_export.R

export_grid_csvR Documentation

Export grid predictions to CSV

Description

Saves the boundary grid data (X, Y, predicted class, probabilities) for a fitted classbound model so results can be reproduced outside the Shiny app.

Usage

export_grid_csv(
  cb_mod,
  data,
  resolution,
  proj_matrix = NULL,
  proj_info = NULL,
  predict_args = list(),
  slice_x = NULL,
  slice_y = NULL,
  file
)

Arguments

cb_mod

A classbound model object.

data

The training data (used to compute axis ranges).

resolution

Grid resolution (points per axis).

proj_matrix

Optional projection matrix for high-dimensional data.

proj_info

Optional list with center/scale for projection.

predict_args

Additional arguments passed to predict.

file

The file path to write the CSV.

Value

The file path (invisibly).


classbound documentation built on Sept. 30, 2026, 5:13 p.m.