Skip to content

Commit

Permalink
modified: docs/experiments.html
Browse files Browse the repository at this point in the history
	modified:   docs/index.html
	modified:   docs/models/cmhe/cmhe_torch.html
	modified:   docs/models/cmhe/cmhe_utilities.html
	modified:   docs/models/cmhe/index.html
	modified:   docs/phenotyping.html
	new file:   html/auton_survival/datasets.html
	new file:   html/auton_survival/estimators.html
	new file:   html/auton_survival/experiments.html
	new file:   html/auton_survival/index.html
	new file:   html/auton_survival/metrics.html
	new file:   html/auton_survival/models/cmhe/cmhe_torch.html
	new file:   html/auton_survival/models/cmhe/cmhe_utilities.html
	new file:   html/auton_survival/models/cmhe/index.html
	new file:   html/auton_survival/models/cph/dcph_torch.html
	new file:   html/auton_survival/models/cph/dcph_utilities.html
	new file:   html/auton_survival/models/cph/index.html
	new file:   html/auton_survival/models/dcm/dcm_torch.html
	new file:   html/auton_survival/models/dcm/dcm_utilities.html
	new file:   html/auton_survival/models/dcm/index.html
	new file:   html/auton_survival/models/dsm/datasets.html
	new file:   html/auton_survival/models/dsm/dsm_torch.html
	new file:   html/auton_survival/models/dsm/index.html
	new file:   html/auton_survival/models/dsm/losses.html
	new file:   html/auton_survival/models/dsm/utilities.html
	new file:   html/auton_survival/models/index.html
	new file:   html/auton_survival/phenotyping.html
	new file:   html/auton_survival/preprocessing.html
	new file:   html/auton_survival/reporting.html
	new file:   html/auton_survival/utils.html
  • Loading branch information
chiragnagpal committed Jun 28, 2022
1 parent a2d314e commit 6945084
Show file tree
Hide file tree
Showing 30 changed files with 5,591 additions and 70 deletions.
53 changes: 27 additions & 26 deletions docs/experiments.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="auton_survival.experiments.SurvivalRegressionCV"><code class="flex name class">
<span>class <span class="ident">SurvivalRegressionCV</span></span>
<span>(</span><span>model='dcph', folds=None, num_folds=5, num_nested_folds=None, random_seed=0, hyperparam_grid={})</span>
<span>(</span><span>model='dcph', folds=None, num_folds=5, random_seed=0, hyperparam_grid={})</span>
</code></dt>
<dd>
<div class="desc"><p>Universal interface to train Survival Analysis models in a cross-
validation or nested cross-validation fashion.</p>
<p>Each of the model is trained in a CV fashion over the user specified
hyperparameter grid. The best model(s) in terms of user-specified metric
is selected.</p>
validation fashion.</p>
<p>The model is trained in a CV fashion over the user-specified
hyperparameter grid. Model hyperparameters are selected based on the
user-specified metric.</p>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>model</code></strong> :&ensp;<code>str</code></dt>
Expand All @@ -69,9 +69,6 @@ <h2 id="parameters">Parameters</h2>
<dt><strong><code>num_folds</code></strong> :&ensp;<code>int</code>, default=<code>5</code></dt>
<dd>The number of folds.
Ignored if folds is specified.</dd>
<dt><strong><code>num_nested_folds</code></strong> :&ensp;<code>int</code>, default=<code>None</code></dt>
<dd>The number of folds to use for nested cross-validation.
If None, then regular (unnested) CV is performed.</dd>
<dt><strong><code>random_seed</code></strong> :&ensp;<code>int</code>, default=<code>0</code></dt>
<dd>Controls reproducibility of results.</dd>
<dt><strong><code>hyperparam_grid</code></strong> :&ensp;<code>dict</code></dt>
Expand All @@ -94,7 +91,7 @@ <h2 id="references">References</h2>
<h3>Methods</h3>
<dl>
<dt id="auton_survival.experiments.SurvivalRegressionCV.fit"><code class="name flex">
<span>def <span class="ident">fit</span></span>(<span>self, features, outcomes, metric='ibs', horizon=None)</span>
<span>def <span class="ident">fit</span></span>(<span>self, features, outcomes, horizons, metric='ibs')</span>
</code></dt>
<dd>
<div class="desc"><p>Fits the survival regression model to the data in a cross-
Expand All @@ -107,16 +104,15 @@ <h2 id="parameters">Parameters</h2>
<dt><strong><code>outcomes</code></strong> :&ensp;<code>pd.DataFrame</code></dt>
<dd>A pandas dataframe with columns 'time' and 'event' that contain the
survival time and censoring status <span><span class="MathJax_Preview"> \delta_i = 1 </span><script type="math/tex"> \delta_i = 1 </script></span>, respectively.</dd>
<dt><strong><code>horizons</code></strong> :&ensp;<code>int</code> or <code>float</code> or <code>list</code></dt>
<dd>Event-horizons at which to evaluate model performance.</dd>
<dt><strong><code>metric</code></strong> :&ensp;<code>str</code>, default=<code>'ibs'</code></dt>
<dd>Metric used to evaluate model performance and tune hyperparameters.
Options include:
- 'auc': Dynamic area under the ROC curve
- 'brs' : Brier Score
- 'ibs' : Integrated Brier Score
- 'ctd' : Concordance Index</dd>
<dt><strong><code>horizon</code></strong> :&ensp;<code>int</code> or <code>float</code>, default=<code>None</code></dt>
<dd>Event-horizon at which to evaluate model performance.
If None, then the maximum permissible event-time from the data is used.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>Trained survival regression model(s).</p></div>
Expand All @@ -137,17 +133,13 @@ <h2 id="returns">Returns</h2>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>model</code></strong> :&ensp;<code>str</code></dt>
<dd>
<p>A string that determines the choice of the surival analysis model.
Survival model choices include:</p>
<ul>
<li>'dsm' : Deep Survival Machines [3] model</li>
<li>'dcph' : Deep Cox Proportional Hazards [2] model</li>
<li>'dcm' : Deep Cox Mixtures [4] model</li>
<li>'rsf' : Random Survival Forests [1] model</li>
<li>'cph' : Cox Proportional Hazards [2] model</li>
</ul>
</dd>
<dd>A string that determines the choice of the surival analysis model.
Survival model choices include:
- 'dsm' : Deep Survival Machines [3] model
- 'dcph' : Deep Cox Proportional Hazards [2] model
- 'dcm' : Deep Cox Mixtures [4] model
- 'rsf' : Random Survival Forests [1] model
- 'cph' : Cox Proportional Hazards [2] model</dd>
<dt><strong><code>cv_folds</code></strong> :&ensp;<code>int</code></dt>
<dd>Number of folds in the cross validation.</dd>
<dt><strong><code>random_seed</code></strong> :&ensp;<code>int</code></dt>
Expand All @@ -172,11 +164,11 @@ <h2 id="references">References</h2>
<h3>Methods</h3>
<dl>
<dt id="auton_survival.experiments.CounterfactualSurvivalRegressionCV.fit"><code class="name flex">
<span>def <span class="ident">fit</span></span>(<span>self, features, outcomes, interventions, metric)</span>
<span>def <span class="ident">fit</span></span>(<span>self, features, outcomes, interventions, horizons, metric)</span>
</code></dt>
<dd>
<div class="desc"><p>Fits the Survival Regression Model to the data in a Cross
Validation fashion.</p>
<div class="desc"><p>Fits the Survival Regression Model to the data in a cross-
validation fashion.</p>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>features</code></strong> :&ensp;<code>pandas.DataFrame</code></dt>
Expand All @@ -190,6 +182,15 @@ <h2 id="parameters">Parameters</h2>
<dt><strong><code>interventions</code></strong> :&ensp;<code>pandas.Series</code></dt>
<dd>A pandas series containing the treatment status of each subject.
<span><span class="MathJax_Preview"> a_i = 1 </span><script type="math/tex"> a_i = 1 </script></span> if the subject is <code>treated</code>, else is considered control.</dd>
<dt><strong><code>horizons</code></strong> :&ensp;<code>int</code> or <code>float</code> or <code>list</code></dt>
<dd>Event-horizons at which to evaluate model performance.</dd>
<dt><strong><code>metric</code></strong> :&ensp;<code>str</code>, default=<code>'ibs'</code></dt>
<dd>Metric used to evaluate model performance and tune hyperparameters.
Options include:
- 'auc': Dynamic area under the ROC curve
- 'brs' : Brier Score
- 'ibs' : Integrated Brier Score
- 'ctd' : Concordance Index</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
Expand Down
92 changes: 55 additions & 37 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ <h2 id="the-auton-survival-package">The <code>auton-survival</code> Package</h2>
counterfactual estimation, clustering and phenotyping and propensity adjusted evaluation.</p>
<p><strong>For complete details on</strong> <code>auton-survival</code> <strong>see</strong>: </p>
<h3><a href="https://www.cs.cmu.edu/~chiragn/papers/auton_survival.pdf">White Paper</a> &nbsp;&nbsp; • <a href="https://autonlab.github.io/auton-survival/">Documentation</a> &nbsp;&nbsp; • <a href="https://nbviewer.org/github/autonlab/auton-survival/tree/master/examples/">Demo Notebooks</a></h3>
<p><a id="what"></a></p>
<h2 id="what-is-survival-analysis">What is Survival Analysis?</h2>
<p><strong>Survival Analysis</strong> involves estimating when an event of interest, <span><span class="MathJax_Preview"> T </span><script type="math/tex"> T </script></span>
would take places given some features or covariates <span><span class="MathJax_Preview"> X </span><script type="math/tex"> X </script></span>. In statistics
Expand All @@ -52,10 +51,12 @@ <h2 id="what-is-survival-analysis">What is Survival Analysis?</h2>
regression problems, Survival Analysis differs in two major ways:</p>
<ul>
<li>The Event distribution, <span><span class="MathJax_Preview"> T </span><script type="math/tex"> T </script></span> has positive support,
<span><span class="MathJax_Preview"> T in [0, inf) </span><script type="math/tex"> T in [0, inf) </script></span>.</li>
<span><span class="MathJax_Preview"> T in [0, \infty) </span><script type="math/tex"> T in [0, \infty) </script></span>.</li>
<li>There is presence of censoring (ie. a large number of instances of data are
lost to follow up.)</li>
</ul>
<p align="center"><img src="https://ndownloader.figshare.com/files/36038024" width=60% /></p>
<p align="center"><b>Figure 1. Illustration of Censoring</b></p>
<p><a id="package"></a></p>
<h2 id="the-auton-survival-package_1">The Auton Survival Package</h2>
<p>The package <code>auton_survival</code> is repository of reusable utilities for projects
Expand Down Expand Up @@ -88,6 +89,8 @@ <h3 id="auton_survivalmodels"><code><a title="auton_survival.models" href="model
# Predict risk at specific time horizons.
predictions = model.predict_risk(features, t=[8, 12, 16])
</code></pre>
<p align="center"><img src="https://ndownloader.figshare.com/files/36038027" width=60% /></p>
<p align="center"><b>Figure 2. Violation of the Proportional Hazards Assumption</b></p>
<h3 id="auton_survivalestimators-demo-notebook"><code><a title="auton_survival.estimators" href="estimators.html">auton_survival.estimators</a></code> <a href="https://nbviewer.org/github/autonlab/auton-survival/blob/master/examples/Survival%20Regression%20with%20Auton-Survival.ipynb">[Demo Notebook]</a></a></h3>
<p>This module provides a wrapper <code><a title="auton_survival.estimators.SurvivalModel" href="estimators.html#auton_survival.estimators.SurvivalModel">SurvivalModel</a></code> to model
survival datasets with standard survival (time-to-event) analysis methods.
Expand Down Expand Up @@ -137,7 +140,8 @@ <h2 id="phenotyping-and-knowledge-discovery">Phenotyping And Knowledge Discovery
<h3 id="auton_survivalphenotyping-demo-notebook"><code><a title="auton_survival.phenotyping" href="phenotyping.html">auton_survival.phenotyping</a></code> <a href="https://nbviewer.org/github/autonlab/auton-survival/blob/master/examples/Phenotyping%20Censored%20Time-to-Events.ipynb">[Demo Notebook]</a></a></h3>
<p><code><a title="auton_survival.phenotyping" href="phenotyping.html">auton_survival.phenotyping</a></code> allows extraction of latent clusters or subgroups
of patients that demonstrate similar outcomes. In the context of this package,
we refer to this task as <strong>phenotyping</strong>. <code><a title="auton_survival.phenotyping" href="phenotyping.html">auton_survival.phenotyping</a></code> allows:</p>
we refer to this task as <strong>phenotyping</strong>. <code><a title="auton_survival.phenotyping" href="phenotyping.html">auton_survival.phenotyping</a></code> provides
the following phenotyping utilities:</p>
<ul>
<li><strong>Intersectional Phenotyping</strong>: Recovers groups, or phenotypes, of individuals
over exhaustive combinations of user-specified categorical and numerical features. </li>
Expand Down Expand Up @@ -177,7 +181,7 @@ <h3 id="auton_survivalphenotyping-demo-notebook"><code><a title="auton_survival.
the <code>Deep Survival Machines</code> and <code>Deep Cox Mixtures</code> latent variable survival
regression estimators using the <code>predict latent z</code> method. </li>
</ul>
<pre><code class="language-python">from auton_survival.models.dcm import DeepCoxMixtures [\[Demo Notebook\]]
<pre><code class="language-python">from auton_survival.models.dcm import DeepCoxMixtures

# Instantiate a DCM Model with 3 phenogroups and a single hidden layer with size 100.
model = DeepCoxMixtures(k = 3, layers = [100])
Expand All @@ -193,7 +197,9 @@ <h3 id="auton_survivalphenotyping-demo-notebook"><code><a title="auton_survival.
response to a specific intervention. Relies on the specially designed
<code><a title="auton_survival.models.cmhe.DeepCoxMixturesHeterogenousEffects" href="models/cmhe/index.html#auton_survival.models.cmhe.DeepCoxMixturesHeterogenousEffects">DeepCoxMixturesHeterogenousEffects</a></code> latent variable model.</li>
</ul>
<pre><code class="language-python"># Instantiate the CMHE model
<pre><code class="language-python">from auton_survival.models.cmhe DeepCoxMixturesHeterogenousEffects

# Instantiate the CMHE model
model = DeepCoxMixturesHeterogenousEffects(random_seed=random_seed, k=k, g=g, layers=layers)

model = model.fit(features, outcomes.time, outcomes.event, intervention)
Expand All @@ -213,6 +219,12 @@ <h3 id="auton_survivalphenotyping-demo-notebook"><code><a title="auton_survival.
# Infer the estimated counterfactual phenotype probability.
phenotypes = model.fit_predict(features, outcomes.time, outcomes.event, interventions)
</code></pre>
<p>DAG representations of the unsupervised, supervised, and counterfactual probabilitic
phenotypers in auton-survival are shown in the below figure. <em>X</em> represents the
covariates, <em>T</em> the time-to-event and <em>Z</em> is the phenotype to be inferred.</p>
<p align="center">A. Unsupervised Phenotyping &nbsp;&nbsp; B. Supervised Phenotyping &nbsp;&nbsp; C. Counterfactual Phenotyping</p>
<p align="center"><img src="https://ndownloader.figshare.com/files/36056648" width=60%></p>
<p align="center"><b>Figure 3. DAG Representations of the Phenotypers in <code>auton-survival</code></b></p>
<p><a id="evaluation"></a></p>
<h2 id="evaluation-and-reporting">Evaluation And Reporting</h2>
<h3 id="auton_survivalmetrics"><code><a title="auton_survival.metrics" href="metrics.html">auton_survival.metrics</a></code></h3>
Expand All @@ -239,12 +251,18 @@ <h3 id="auton_survivalmetrics"><code><a title="auton_survival.metrics" href="met
</code></pre>
<ul>
<li><strong>Treatment Effect</strong>: Used to compare treatment arms by computing the difference in the following metrics for treatment and control groups:<ul>
<li><strong>Time at Risk</strong> (TaR)</li>
<li><strong>Risk at Time</strong></li>
<li><strong>Restricted Mean Survival Time</strong> (RMST)</li>
<li><strong>Time at Risk (TaR)</strong> (left)</li>
<li><strong>Risk at Time</strong> (center)</li>
<li><strong>Restricted Mean Survival Time (RMST)</strong> (right)</li>
</ul>
</li>
</ul>
<p align="center">A. Time at Risk &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B. Risk at Time &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C. RMST</p>
<p align="center">
<img src="https://ndownloader.figshare.com/files/36056507" width=30%>
<img src="https://ndownloader.figshare.com/files/36056534" width=30%>
<img src="https://ndownloader.figshare.com/files/36056546" width=30%></p>
<p align="center"><b>Figure 4. Graphical representation of the Treatment Effect Metrics</b></p>
<pre><code class="language-python">from auton_survival.metrics import survival_diff_metric

# Compute the difference in RMST, Risk at Time, and TaR between treatment and control groups
Expand Down Expand Up @@ -313,22 +331,26 @@ <h2 id="citing-and-references">Citing And References</h2>
}
</code></pre>
<p><strong>Additionally, <code>auton-survival</code> implements the following methodologies:</strong></p>
<p>[2] <a href="https://arxiv.org/abs/2003.01176">Deep Survival Machines:
Fully Parametric Survival Regression and
Representation Learning for Censored Data with Competing Risks.
IEEE Journal of Biomedical and Health Informatics (2021)</a></a></p>
<pre><code> @article{nagpal2021dsm,
title={Deep survival machines: Fully parametric survival regression and representation learning for censored data with competing risks},
author={Nagpal, Chirag and Li, Xinyu and Dubrawski, Artur},
journal={IEEE Journal of Biomedical and Health Informatics},
volume={25},
number={8},
pages={3163--3175},
<p>[2] <a href="https://arxiv.org/abs/2202.11089">Counterfactual Phenotyping with Censored Time-to-Events (2022)</a></a></p>
<pre><code> @article{nagpal2022counterfactual,
title={Counterfactual Phenotyping with Censored Time-to-Events},
author={Nagpal, Chirag and Goswami, Mononito and Dufendach, Keith and Dubrawski, Artur},
journal={arXiv preprint arXiv:2202.11089},
year={2022}
}
</code></pre>
<p>[3] <a href="https://arxiv.org/abs/2101.06536">Deep Cox Mixtures for Survival Regression. Conference on Machine Learning for
Healthcare (2021)</a></a></p>
<pre><code> @inproceedings{nagpal2021dcm,
title={Deep Cox mixtures for survival regression},
author={Nagpal, Chirag and Yadlowsky, Steve and Rostamzadeh, Negar and Heller, Katherine},
booktitle={Machine Learning for Healthcare Conference},
pages={674--708},
year={2021},
publisher={IEEE}
organization={PMLR}
}
</code></pre>
<p>[3] <a href="http://proceedings.mlr.press/v146/nagpal21a.html">Deep Parametric Time-to-Event Regression with Time-Varying Covariates. AAAI
<p>[4] <a href="http://proceedings.mlr.press/v146/nagpal21a.html">Deep Parametric Time-to-Event Regression with Time-Varying Covariates. AAAI
Spring Symposium (2021)</a></a></p>
<pre><code> @InProceedings{pmlr-v146-nagpal21a,
title={Deep Parametric Time-to-Event Regression with Time-Varying Covariates},
Expand All @@ -338,23 +360,19 @@ <h2 id="citing-and-references">Citing And References</h2>
publisher={PMLR},
}
</code></pre>
<p>[4] <a href="https://arxiv.org/abs/2101.06536">Deep Cox Mixtures for Survival Regression. Conference on Machine Learning for
Healthcare (2021)</a></a></p>
<pre><code> @inproceedings{nagpal2021dcm,
title={Deep Cox mixtures for survival regression},
author={Nagpal, Chirag and Yadlowsky, Steve and Rostamzadeh, Negar and Heller, Katherine},
booktitle={Machine Learning for Healthcare Conference},
pages={674--708},
<p>[5] <a href="https://arxiv.org/abs/2003.01176">Deep Survival Machines:
Fully Parametric Survival Regression and
Representation Learning for Censored Data with Competing Risks.
IEEE Journal of Biomedical and Health Informatics (2021)</a></a></p>
<pre><code> @article{nagpal2021dsm,
title={Deep survival machines: Fully parametric survival regression and representation learning for censored data with competing risks},
author={Nagpal, Chirag and Li, Xinyu and Dubrawski, Artur},
journal={IEEE Journal of Biomedical and Health Informatics},
volume={25},
number={8},
pages={3163--3175},
year={2021},
organization={PMLR}
}
</code></pre>
<p>[5] <a href="https://arxiv.org/abs/2202.11089">Counterfactual Phenotyping with Censored Time-to-Events (2022)</a></a></p>
<pre><code> @article{nagpal2022counterfactual,
title={Counterfactual Phenotyping with Censored Time-to-Events},
author={Nagpal, Chirag and Goswami, Mononito and Dufendach, Keith and Dubrawski, Artur},
journal={arXiv preprint arXiv:2202.11089},
year={2022}
publisher={IEEE}
}
</code></pre>
<p><a id="install"></a></p>
Expand Down
Loading

0 comments on commit 6945084

Please sign in to comment.