Skip to content

Commit

Permalink
DOCS: Improve text of API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Feb 23, 2025
1 parent 0027349 commit 56268d2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
25 changes: 16 additions & 9 deletions sksurv/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,17 +446,24 @@ def load_flchain():


def load_bmt():
"""Load and return response to Hematopoietic stem cell transplantation (HSCT) for acute leukemia patients.
"""Load and return response to hematopoietic stem cell transplantation (HSCT) for acute leukemia patients.
The dataset has 35 samples and 1 features:
The dataset has 35 samples and 1 feature "dis" indicating the type of leukemia::
1. dis: Type of leukemia. 0=ALL(Acute Lymphoblastic Leukemia), 1=AML(Acute Myeloid Leukemia)
0=ALL (Acute Lymphoblastic Leukemia)
1=AML (Acute Myeloid Leukemia)
The endpoint (status) are:
The endpoint (status) is defined as
0. Survival (Right-censored data). 11 patients (31.4%)
1. Transplant related mortality (TRM). 9 events (25.7%)
2. Relapse. 15 events (42.8%)
+-------+------------------------------------+---------------------+
| Value | Description | Count (%) |
+=======+====================================+=====================+
| 0 | Survival (Right-censored data) | 11 patients (31.4%) |
+-------+------------------------------------+---------------------+
| 1 | Transplant related mortality (TRM) | 9 events (25.7%) |
+-------+------------------------------------+---------------------+
| 2 | Relapse | 15 events (42.8%) |
+-------+------------------------------------+---------------------+
See [1]_ for further description and [2]_ for the dataset.
Expand Down Expand Up @@ -489,7 +496,7 @@ def load_cgvhd():
initiated for patients with a myeloid malignancy who were to
undergo an allogeneic bone marrow transplant.
The available dataset [1]_ is a 100 size subsample of the full data set. See [2]_ for further details.
The dataset is a 100 patient subsample of the full data set. See [2]_ for further details.
+-------+------------+----------------------------------------------+-------------------------------------------+
| Index | Name | Description | Encoding |
Expand Down Expand Up @@ -551,7 +558,7 @@ def load_cgvhd():
| 3 | Death | 5 events (5%) |
+-------+-------------------------------------------+-----------------+
See [1]_ for further description and [2]_ for the dataset.
The dataset has been obtained from [1]_.
Returns
-------
Expand Down
6 changes: 3 additions & 3 deletions sksurv/nonparametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def cumulative_incidence_competing_risks(
var_type : None or one of {'Dinse', 'Dinse_Approx', 'Aalen'}, optional, default: 'Dinse'
The method for estimating the variance of the estimator.
See [2]_, [3]_ and [4]_ for each of the methods.
Only valid if conf_type is valid.
Only used if `conf_type` is not None.
Returns
-------
Expand All @@ -673,12 +673,12 @@ def cumulative_incidence_competing_risks(
cum_incidence : array, shape = (n_risks + 1, n_times)
Cumulative incidence at each unique time point.
The first dimension indicates total risk (``cum_incidence[0]``),
the dimension `i=1,..,n_risks` the incidence for each competing risk.
the dimension `i=1,...,n_risks` the incidence for each competing risk.
conf_int : array, shape = (n_risks + 1, 2, n_times)
Pointwise confidence interval (second axis) of the Kaplan-Meier estimator
at each unique time point (last axis)
for all possible risks (first axis) including overall risk (``conf_int[0]``).
for all possible risks (first axis), including overall risk (``conf_int[0]``).
Only provided if `conf_type` is not None.
Examples
Expand Down

0 comments on commit 56268d2

Please sign in to comment.