Segments the data by running all steps in the segmentation pipeline, including output table
segment(
data,
modeltype = c("tree", "k-clusters"),
FUN = NULL,
FUN_preprocess = NULL,
steps = c("preprocess", "model"),
prettify = FALSE,
print_plot = FALSE,
hyperparameters = NULL,
force = FALSE,
verbose = FALSE
)
data.frame, the data to segment
character, the type of model to use to segment choices are: 'tree', 'k-clusters'
function, A user specified function to segment, if the standard methods are not wanting to be used
function, A user specified function to preprocess, if the standard methods are not wanting to be used
list, names of the steps the user want to run the data on. Options are 'preprocess' and 'model'
logical, TRUE if want cleaned up outputs, FALSE for raw output
logical, TRUE if want to print the plot
list of hyperparameters to use in the model.
logical, TRUE to ignore errors in validation step and force model execution.
logical whether information about the segmentation pipeline should be given.
A list of three objects. A tibble providing high-level segment attributes, a lookup table (data frame) with the id and predicted segment number, and an rpart object defining the model.