Skip to content

Commit

Permalink
modified: __init__.py
Browse files Browse the repository at this point in the history
	modified:   cmhe_torch.py
  • Loading branch information
chiragnagpal committed Feb 24, 2022
1 parent b3bf4eb commit ae399e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
38 changes: 23 additions & 15 deletions auton_survival/models/cmhe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,49 @@
[![GitHub Repo stars](https://img.shields.io/github/stars/autonlab/auton-survival?style=social)](https://github.com/autonlab/auton-survival)
**Cox Mixture with Heterogenous Effects (CMHE)** is a fully parametric approach
to counterfactual phenotypes of individuals that demonstrate heterogneous
effects to an intervention in terms of Time-to-Event outcomes in the presence
of Censoring.
<img src="https://ndownloader.figshare.com/files/34056269">
<img align="right" width=35% src="https://figshare.com/ndownloader/files/34056284">
In the context of Healthcare ML and Biostatistics, this is known as 'Survival
Analysis'. The key idea behind Deep Survival Machines is to model the
underlying event outcome distribution as a mixure of some fixed \( k \)
parametric distributions. The parameters of these mixture distributions as
well as the mixing weights are modelled using Neural Networks.
**Cox Mixture with Heterogenous Effects (CMHE)** is a flexible approach to
recover counterfactual phenotypes of individuals that demonstrate heterogneous
effects to an intervention in terms of censored Time-to-Event outcomes.
CMHE is **not** restricted by the strong Cox Proportional Hazards assumption
or any parametric assumption on the time to event distributions. CMHE achieves
this by describing each individual as belonging to two different latent groups,
\( \mathcal{Z} \) that mediate the base survival rate and \( \phi \) the effect
of the treatment. CMHE can also be employed to model individual level
counterfactuals or for standard factual survival regression.
For full details on Cox Mixtures with Heterogenous Effects, please refer to
our preprint:
[Counterfactual Phenotyping with Censored Time-to-Events, arXiv preprint,
C. Nagpal, M. Goswami, K. Dufendach, A. Dubrawski](https://arxiv.org/abs/2202.11089)
<br><br><br><br>
<br>
Example Usage
-------------
>>> from auton_survival import CoxMixtureHeterogenousEffects
>>> from auton_survival import DeepCoxMixturesHeterogenousEffects
>>> from auton_survival import datasets
>>> # load the SYNTHETIC dataset.
>>> x, t, e, a = datasets.load_dataset('SYNTHETIC')
>>> # instantiate a DeepSurvivalMachines model.
>>> model = CoxMixtureHeterogenousEffects()
>>> # instantiate a Cox Mixtures with Heterogenous Effects model.
>>> model = DeepCoxMixturesHeterogenousEffects()
>>> # fit the model to the dataset.
>>> model.fit(x, t, e, a)
>>> # estimate the predicted risks at the time
>>> model.predict_risk(x, 10)
>>> # estimate the treatment effect phenogroups
>>> model.predict_latent_phi(x)
"""

import numpy as np
import torch

from .cmhe_torch import DeepCMHETorch
from .cmhe_utilities import train_cmhe, predict_survival
from .cmhe_utilities import predict_latent_phi, predict_latent_z
Expand Down
2 changes: 1 addition & 1 deletion auton_survival/models/cmhe/cmhe_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# SOFTWARE.

import torch
from dsm.dsm_torch import create_representation
from auton_survival.models.dsm.dsm_torch import create_representation

class DeepCMHETorch(torch.nn.Module):
"""PyTorch model definition of the Cox Mixture with Hereogenous Effects Model.
Expand Down

0 comments on commit ae399e3

Please sign in to comment.