Skip to content

axe_data does not remove pre$mold$extras #205

Open
@era127

Description

@era127

The axe_data.workflow() function does not remove the mold$extras like it does for outcomes and predictors. If a column of data is set to be another role, the model will retain all of that data. Would it be OK to also remove pre$mold$extras or was it intentionally retained for predictions?

The 'outcomes' and 'predictors' are removed here.

axe_data.workflow <- function(x, verbose = FALSE, ...) {
  fit <- extract_fit_parsnip(x)
  fit <- butcher::axe_data(fit, verbose = verbose, ...)
  x <- replace_workflow_fit(x, fit)

  x <- replace_workflow_outcomes(x, NULL)
  x <- replace_workflow_predictors(x, NULL)

  add_butcher_class(x)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions