Discrete time survival analysis with competing risks
Project description
Discrete Time Survival Analysis
A Python package for discrete time survival data analysis with competing risks.
Tomer Meir, Rom Gutman, Malka Gorfine 2022
Installation
pip install pydts
Quick Start
from pydts.fitters import TwoStagesFitter
from pydts.examples_utils.generate_simulations_data import generate_quick_start_df
from sklearn.model_selection import train_test_split
patients_df = generate_quick_start_df(n_patients=10000, n_cov=5, d_times=30, j_events=2, pid_col='pid', seed=0)
train_df, test_df = train_test_split(patients_df, test_size=0.25)
fitter = TwoStagesFitter()
fitter.fit(df=train_df.drop(['C', 'T'], axis=1))
fitter.print_summary()
Other Examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydts-0.2.0.tar.gz
(322.6 kB
view hashes)
Built Distribution
pydts-0.2.0-py3-none-any.whl
(338.4 kB
view hashes)