thbndi commited on
Commit
708ec90
·
1 Parent(s): 062ef7b

Update cohort.py

Browse files
Files changed (1) hide show
  1. cohort.py +3 -3
cohort.py CHANGED
@@ -9,7 +9,7 @@ import yaml
9
  import os
10
 
11
  def task_cohort(task,mimic_path,path_benchmark, config_path):
12
- root_dir = os.getcwd()
13
  config_path='./config/'+config_path
14
  with open(config_path) as f:
15
  config = yaml.safe_load(f)
@@ -53,9 +53,9 @@ def task_cohort(task,mimic_path,path_benchmark, config_path):
53
 
54
  #-----------------------------------------------EXTRACT MIMIC-----------------------------------------------------
55
  if version == '2':
56
- cohort_output = day_intervals_cohort_v22.extract_data(icu_no_icu,label,tim,icd_code, version_path,disease_label)
57
  elif version == '1':
58
- cohort_output = day_intervals_cohort.extract_data(icu_no_icu,label,tim,icd_code, version_path,disease_label)
59
  end = time.time()
60
  print("Time elapsed : ", round((end - start)/60,2),"mins")
61
  #----------------------------------------------FEATURES-------------------------------------------------------
 
9
  import os
10
 
11
  def task_cohort(task,mimic_path,path_benchmark, config_path):
12
+ root_dir = os.path.dirname(os.path.abspath('UserInterface.ipynb'))
13
  config_path='./config/'+config_path
14
  with open(config_path) as f:
15
  config = yaml.safe_load(f)
 
53
 
54
  #-----------------------------------------------EXTRACT MIMIC-----------------------------------------------------
55
  if version == '2':
56
+ cohort_output = day_intervals_cohort_v22.extract_data(icu_no_icu,label,tim,icd_code, root_dir,disease_label)
57
  elif version == '1':
58
+ cohort_output = day_intervals_cohort.extract_data(icu_no_icu,label,tim,icd_code, root_dir,disease_label)
59
  end = time.time()
60
  print("Time elapsed : ", round((end - start)/60,2),"mins")
61
  #----------------------------------------------FEATURES-------------------------------------------------------