Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add censor set and KM time sampler. #81

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

juAlberge
Copy link
Collaborator

different things added:

  • add a censor set to separate the training of the CIFS from the censoring distribution
  • add an argument: time_sampler.
    • time_sampler='uniform' -> stay as it was. We sample a time uniformly between (0, t_max)
    • time_sampler='kaplan_meier' -> we train a Kaplan Meier estimator to learn the survival distribution and sample time to have more sampled time where the events of interest actually happen.

TODO before PR:

  • Adding documentation
  • Adding tests

from sklearn.utils.validation import check_is_fitted

from .utils import check_y_survival


class KaplanMeierEstimator:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I 100% agree to have this at some stage, but after a discussion with @GaelVaroquaux, we thought that we needed to wait slightly before creating this wrapper, as it could make the wrong message to the community. Does this idea still hold, @GaelVaroquaux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants