sindhura97 / STraTS

MIT License
67 stars 17 forks source link

Missing information in strats_notebook.ipynb (fore_max_len) #4

Open nick-j-braun opened 10 months ago

nick-j-braun commented 10 months ago

Under the comment "Find max_len." there is tn explanation or programatic path to follow to know what this value should be. The number 880 is hardcoded in. What should this value be if trying to apply this code to a different project?


means = demo.mean(axis=0, keepdims=True)
stds = demo.std(axis=0, keepdims=True)
stds = (stds==0)*1 + (stds!=0)*stds
demo = (demo-means)/stds
# Get variable indices.
varis = sorted(list(set(data.variable)))
V = len(varis)
var_to_ind = inv_list(varis, start=1)
data['vind'] = data.variable.map(var_to_ind)
data = data[['ts_ind', 'vind', 'hour', 'value']].sort_values(by=['ts_ind', 'vind', 'hour'])
# Find max_len.
fore_max_len = 880
sindhura97 commented 5 months ago

Hi, if you choose to apply it to a new dataset, you can set it based on the distribution of no. of triplets per time-series in the new dataset. You can set it to 99th percentile for example.

hrishi-ds commented 4 months ago

For mimic, the time series length is 880 but it's hard to determine the same for Physionet. I was wondering if you could share the value for physionet as well to keep my experiments consistent.