Skip to content

Commit

Permalink
modified: metrics.py
Browse files Browse the repository at this point in the history
	modified:   phenotyping.py
  • Loading branch information
chiragnagpal committed Mar 29, 2022
1 parent cefc51c commit 26793bc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
22 changes: 11 additions & 11 deletions auton_survival/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def survival_diff_metric(metric, outcomes, treatment_indicator,
metric : str
The metric to evalute for comparing survival outcomes.
Options include:
- 'median'
- 'time_to'
- 'hazard_ratio'
- 'restricted_mean'
- 'survival_at'
- `median`
- `time_to`
- `hazard_ratio`
- `restricted_mean`
- `survival_at`
outcomes : pd.DataFrame
A pandas dataframe with rows corresponding to individual samples and columns 'time' and 'event'.
treatment_indicator : np.array
Expand Down Expand Up @@ -145,10 +145,10 @@ def survival_regression_metric(metric, predictions, outcomes, times,
metric: string
Measure used to assess the survival regression model performance.
Options include:
- 'brs' : brier score
- 'ibs' : integrated brier score
- 'auc': cumulative dynamic area under the curve
- 'ctd' : concordance index inverse probability of censoring weights (ipcw)
- `brs` : brier score
- `ibs` : integrated brier score
- `auc`: cumulative dynamic area under the curve
- `ctd` : concordance index inverse probability of censoring weights (ipcw)
predictions: np.array
A numpy array of survival time predictions for the samples.
outcomes : pd.DataFrame
Expand Down Expand Up @@ -221,9 +221,9 @@ def phenotype_purity(phenotypes, outcomes,
A pandas dataframe with rows corresponding to individual samples and columns 'time' and 'event'.
strategy: string, default='instantaneous'
Options include:
- 'instantaneous': Predict the Kaplan Meier survival estimate at a certain point in time and compute
- `instantaneous` : Predict the Kaplan Meier survival estimate at a certain point in time and compute
the brier score.
- 'integrated' : Predict the Kaplan Meier survival estimate at all unique times points and compute
- `integrated` : Predict the Kaplan Meier survival estimate at all unique times points and compute
the integrated brier score.
folds: pd.DataFrame, default=None
A pandas dataframe of train and test folds.
Expand Down
15 changes: 7 additions & 8 deletions auton_survival/phenotyping.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
characteristics."""

from random import random
from re import I
import numpy as np
import pandas as pd

Expand Down Expand Up @@ -239,13 +238,13 @@ class ClusteringPhenotyper(Phenotyper):
Additional arguments for dimensionality reduction and clustering
Please include dictionary key and item pairs specified by the following scikit-learn modules:
- 'pca' : sklearn.decomposition.PCA
- 'nnmf' : sklearn.decomposition.NMF
- 'kpca' : sklearn.decomposition.KernelPCA
- 'kmeans' : sklearn.cluster.KMeans
- 'dbscan' : sklearn.cluster.DBSCAN
- 'gmm' : sklearn.mixture.GaussianMixture
- 'hierarchical' : sklearn.cluster.AgglomerativeClustering
- `pca` : sklearn.decomposition.PCA
- `nnmf` : sklearn.decomposition.NMF
- `kpca` : sklearn.decomposition.KernelPCA
- `kmeans` : sklearn.cluster.KMeans
- `dbscan` : sklearn.cluster.DBSCAN
- `gmm` : sklearn.mixture.GaussianMixture
- `hierarchical` : sklearn.cluster.AgglomerativeClustering
"""

Expand Down

0 comments on commit 26793bc

Please sign in to comment.