tidymodels / tidymodels/rsample

Stratification based on censored data

Open
#445 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
343
Forks
67
Avg merge
1h 9m
Merged PRs (30d)
2

Description

We currently don't allow stratification based on Surv objects and instead suggest to use the time or event variable directly:

https://github.com/tidymodels/rsample/blob/46de181d5900a6be182509b192bf51c89985075a/R/misc.R#L105-L107

Given that we've settled on the advice to make the Surv object outside of a recipe, people may not have the individual variables available. Soo we should rethink this.

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 by reading the stratification logic referenced in R/misc.R at lines 105-107 and review how Surv objects are currently rejected. Define the desired behavior for stratification from a Surv object, then add coverage for the agreed behavior before updating the implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.