From ac71967431bf7e2b402b9037a2e202474da988f9 Mon Sep 17 00:00:00 2001 From: Aidan Acquah Date: Thu, 24 Oct 2024 14:19:32 +0100 Subject: [PATCH 1/2] Save time index column as time --- data_parsing/ldopa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_parsing/ldopa.py b/data_parsing/ldopa.py index c67ac7c..ceb4920 100644 --- a/data_parsing/ldopa.py +++ b/data_parsing/ldopa.py @@ -213,7 +213,7 @@ def build_participant_acc_data(subject, datadir, outdir): ] subjectFile = pd.concat(dataFiles).dropna().drop_duplicates() subjectFile = subjectFile / constants.g - subjectFile.index.name = "timestamp" + subjectFile.index.name = "time" subjectFile.rename( columns={ "GENEActiv_X": "x", @@ -400,7 +400,7 @@ def download_ldopa( def load_data( - datafile, sample_rate=100, index_col="timestamp", annot_type="int" + datafile, sample_rate=100, index_col="time", annot_type="int" ): if ".parquet" in datafile: data = pd.read_parquet(datafile) From 15f7b29d9f23df4e415a7ba80c3ea9f28ea1a971 Mon Sep 17 00:00:00 2001 From: Aidan Acquah Date: Thu, 24 Oct 2024 14:19:53 +0100 Subject: [PATCH 2/2] Add ldopa config file --- conf/data/ldopa_10s.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 conf/data/ldopa_10s.yaml diff --git a/conf/data/ldopa_10s.yaml b/conf/data/ldopa_10s.yaml new file mode 100644 index 0000000..27e4d4d --- /dev/null +++ b/conf/data/ldopa_10s.yaml @@ -0,0 +1,13 @@ +data_root: /data/ldopa/prepared +X_path: "${data.data_root}/X.npy" +Y_path: "${data.data_root}/Y.npy" +PID_path: "${data.data_root}/pid.npy" +sample_rate: 30 +task_type: 'classify' +output_size: 12 +batch_size: 1000 +held_one_subject_out: false +weighted_loss_fn: true +dataset_name: 'ldopa' +subject_count: -1 +ratio2keep: 1