Examplesยค
In this section, we present the main functionalities of PyDTS through usage examples.
We demonstrate how to:
- Use
EventTimesSampler
to simulate discrete-time survival data with competing events, including random and hazard-based censoring. - Perform estimation and prediction with
TwoStagesFitter
andDataExpansionFitter
. - Apply evaluation metrics.
- Add regularization.
- Handle small sample sizes using
TwoStagesFitterExact
. - Conduct screening with
SISTwoStagesFitter
. - Carry out model selection procedures.
- Propose data-preprocessing strategies to mitigate estimation errors that arise when the number of observed events is too small at specific times.
- Work with a simulated hospitalization length-of-stay use case.
Note - The figures included in the module pydts.example_utils
are provided solely for visualization in the documentation and are not generalizable to arbitrary datasets.