tidymodels / tidymodels/workflows

axe_data does not remove pre$mold$extras

Open
#205 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
211
Forks
26
Avg merge
1h 58m
Merged PRs (30d)
1

Description

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)
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the axe_data.workflow() entry point shown in the issue and compare its handling of outcomes and predictors with pre$mold$extras. Determine whether retaining extras is required for predictions; done means the intended retention behavior is established and the workflow consistently removes or preserves the data accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.