Skip to content

Commit

Permalink
Fix issues in preparing the MJFF-LR dataset (#25)
Browse files Browse the repository at this point in the history
* Save time index column as time

* Add ldopa config file
  • Loading branch information
aidanacquah authored Oct 24, 2024
1 parent aa0784e commit 150550e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions conf/data/ldopa_10s.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions data_parsing/ldopa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 150550e

Please sign in to comment.