Ejemplo n.º 1
0
    MIN_NUMBER_OF_BEATS_IN_CHUNK = 10 # beats

  elif CHUNK_TYPE == 'Fixed beats number':
    NUMBER_OF_BEATS_IN_CHUNK = 1000

  TEST_PARTITION = 'random' # method for train / test separation
  TEST_PORTION = 0.3
  
  ###############################################################
  # Initial configuration
  np.random.seed(SEED)
  logg.configure_logging() # For more details use logg.configure_logging(console_level=logging.DEBUG)

  stat_info = { 'mortality':   dl.read_dta('mortality_SAHR_ver101214', data_folder=conf.path_to_dta),
                'selected_pp': dl.read_dta('selected_pp', data_folder=conf.path_to_dta),
                'sleep':       dl.get_sleep_time(conf.path_to_dta),
                'selected':    pd.read_csv(conf.path_to_dta+'selected.csv')
              }
  #print stat_info['selected'] #!!!
  #zxc

  #################################################################
  
  # Specify patients GIDNS for study 
  if FIXED_GIDNS_LIST is not None:
    logging.warning('Only %s patients are used in this study: %s'%(len(FIXED_GIDNS_LIST), FIXED_GIDNS_LIST))
    asked_GIDNS = FIXED_GIDNS_LIST
  else:
    asked_GIDNS = dl.get_GIDNS(path_to_dta=conf.path_to_dta)
    if MAX_PATIENTS_NUMBER is not None:
      logging.warning('Only first %s patients are used in this study'%MAX_PATIENTS_NUMBER)