-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmimic-group-fit.py
35 lines (26 loc) · 931 Bytes
/
mimic-group-fit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import numpy as np
import pandas as pd
import scipy.stats as stats
import matplotlib.pyplot as plt
import InterruptionAnalysis as ia
# import base data for reference individuals
data = pd.read_csv('./data/timeseries.csv', index_col = 0)
numeric_cols = ['begin', 'end', 'dur', 'lat']
for col in numeric_cols:
data[col] = data[col]/100 # converts to 1/10th seconds
rootpath = "./data/simulations/mimic-groups"
sims = os.listdir(rootpath)
gIDs = pd.unique(data["gID"])
for sim in sims:
simpath = rootpath + "/" + sim
for gID in gIDs:
gidpath = simpath + "/" + gID
for root, dirs, files in os.walk(pidpath):
if not files:
continue
for f in files:
X = pd.read_csv(os.path.join(root, f))
#####
## Pausing here: I don't need to redo these files before May 20, I need to generate the sims and make a new CCS figure before May 20.
#####