Skip to content

Commit

Permalink
DOC update predict_proba docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Jul 2, 2024
1 parent 3c722ae commit a68a9e9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions hazardous/_survival_boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,18 @@ def fit(self, X, y, times=None):
def predict_proba(self, X, time_horizon=None):
"""Estimate the probability of all incidences for a specific time horizon.
See the docstring for the `time_horizon` parameter for more details.
Returns a (n_events + 1)d array with shape (X.shape[0], n_events + 1).
The first column holds the survival probability to any event and others the
incicence probabilities for each event.
Parameters
----------
X : array-like of shape (n_samples, n_features)
The input samples.
time_horizon : float or list, default=None
time_horizon : float or array-like, default=None
The time horizon at which to estimate the probabilities. If `None`, the
`time_horizon` passed at the constructor is used.
Returns
-------
incidence_probabilities : ndarray of shape (n_events + 1, n_samples, n_times)
The incidence probabilities for each event at the given time horizon.
"""
if time_horizon is None:
if self.time_horizon is None:
Expand Down

0 comments on commit a68a9e9

Please sign in to comment.