Skip to main content

Discrete time survival analysis with competing risks

Project description

pypi version Tests documentation

Discrete Time Survival Analysis

A Python package for discrete time survival data analysis with competing risks.

PyDTS

Tomer Meir, Rom Gutman, Malka Gorfine 2022

Documentation

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

  1. Simple Example
  2. Hospital Length of Stay Simulation Example

Project details


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)

Uploaded Source

Built Distribution

pydts-0.2.0-py3-none-any.whl (338.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page