GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zeydabadi/DeepHitPyTorch: A complete pipeline to train and test DeepHit time to event prediction model using synthetic data including right censored data with competing risk.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
data/SYNTHETIC
data/SYNTHETIC
 
 
outputs
outputs
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

1. Overview

This project tests DeepHit, a discrete‐time competing‐risks survival model, implemented using PyTorch and Pycox. The pipeline consists of the following steps:

  • Data loading & splitting
    Stratified train/validation/test splits that preserve event‐rate distributions.

  • Preprocessing
    Feature standardization and discrete‐time label transformation (NUM_DURATIONS = 16, equidistant intervals).

  • Model
    A simple 2‐layer MLP predicting per‐event, per‐time‐step risks.

  • Training
    Uses Adam optimizer with ranking + likelihood loss (from DeepHit), and early stopping on validation loss.

  • Evaluation

    • Time‐dependent concordance (Antolini)
    • IPCW C-index at quartile time points
    • Brier scores for each event at specified horizons

2. Usage Instructions

2.1. Install dependencies

pip install -r requirements.txt

2.2. Run training and evaluation

python src/main.py --data ./data/SYNTHETIC/synthetic_comprisk.csv --durations 16 --batch-size 128 --epochs 100 --lr 0.005

2.3. Inspect results and plots

  • Loss curves and CIF plots are saved to outputs/figures/
  • Evaluation metrics are logged in outputs/metrics.json

3. Edge Cases

  • Single Event (No Competing Risk)
    To test with only one critical event:

    python src/main.py --data ./data/SYNTHETIC/synthetic_one_label.csv --durations 16 --batch-size 128 --epochs 100 --lr 0.005
  • All Censored Observations
    If all observations are censored, there is no direct information on event-time distributions, only that events exceed the last follow-up.
    In this case, neither nonparametric nor semiparametric methods can estimate survival beyond confirming it remains at 1 until the last censoring time.

About

A complete pipeline to train and test DeepHit time to event prediction model using synthetic data including right censored data with competing risk.

Topics

censored-datacompeting-riskdeephitpytorch-implementationsurvival-analysis

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.