[go: up one dir, main page]

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

API change the shape of the incidence curves #61

Conversation

glemaitre
Copy link
Member

Change some API such that the shape of returned arrays are:

  • predict_proba is an array of shape (n_samples, n_events)
  • predict_cumulative_incidence is an array of shape (n_samples, n_events, n_times)
  • predict_survival_function is an array of shape (n_samples, n_times)

@glemaitre glemaitre marked this pull request as draft July 3, 2024 10:25
MAINT activate doctest check with pytest by default
@ogrisel
Copy link
Contributor
ogrisel commented Jul 3, 2024

The goal is to be consistent with the conventions of scikit-learn where all predict_ methods return datastructures with a first dimension that is aligned with the observations onto which the predictions are made.

@glemaitre glemaitre marked this pull request as ready for review July 3, 2024 14:13
The first column holds the survival probability to any event and others the
incicence probabilities for each event.
predicted_curves : ndarray of shape (n_samples, n_events + 1, n_times)
The estimated probabilities at different time horizons. The column
Copy link
Contributor

Choose a reason for hiding this comment

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

"column" is not meaningful any more for a 3D array.

The values for event with index 0 are the estimated probabilities of staying event-free at the requested time horizons for each observation described by the matching row of X. ...

hazardous/_survival_boost.py Outdated Show resolved Hide resolved
Copy link
Contributor
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Other than that LGTM.

@ogrisel ogrisel merged commit 259aeda into soda-inria:multi-incidence Jul 4, 2024
7 of 8 checks passed
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.

5 participants