Commit c7bd8897 authored by Sascha Herzinger's avatar Sascha Herzinger

added label to survival analysis output

parent 2ca68ea6
Pipeline #5377 failed with stages
in 2 minutes and 47 seconds
......@@ -93,6 +93,7 @@ class SurvivalTask(AnalyticTask):
}
return {
'label': df['feature'].tolist()[0],
'categories': categories,
'subsets': subsets,
'stats': stats
......
......@@ -21,6 +21,7 @@ class TestSurvivalTask:
estimator='KaplanMeier',
id_filter=[],
subsets=[])
assert results['label'] == 'duration'
assert results['stats'][''][0]['timeline']
assert results['stats'][''][0]['estimate']
assert results['stats'][''][0]['ci_lower']
......@@ -42,6 +43,7 @@ class TestSurvivalTask:
estimator='NelsonAalen',
id_filter=[],
subsets=[])
assert results == 'duration'
assert results['stats']['control'][0]['timeline']
assert results['stats']['control'][0]['estimate']
assert results['stats']['control'][0]['ci_lower']
......@@ -52,6 +54,7 @@ class TestSurvivalTask:
assert results['stats']['miR-137'][0]['ci_upper']
def test_can_handle_nans(self):
assert False # FIXME: NA should not be filtered out but be censored
df = load_waltons()
df.insert(0, 'id', df.index)
duration = df[['id', 'T']].copy()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment