Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalekzadeh committed Aug 31, 2018
1 parent 6733584 commit ad8129b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions codes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def creat_time_series(dt_list, act_labels, trial_codes, mode="mag", labeled=True
num_data_cols = len(dt_list) if mode == "mag" else len(dt_list*3)

if labeled:
dataset = np.zeros((0,num_data_cols+6)) # "6" --> [act, code, weight, height, age, gender]
dataset = np.zeros((0,num_data_cols+7)) # "7" --> [act, code, weight, height, age, gender, trial]
else:
dataset = np.zeros((0,num_data_cols))

Expand All @@ -91,7 +91,8 @@ def creat_time_series(dt_list, act_labels, trial_codes, mode="mag", labeled=True
ds_list["weight"][sub_id-1],
ds_list["height"][sub_id-1],
ds_list["age"][sub_id-1],
ds_list["gender"][sub_id-1]
ds_list["gender"][sub_id-1],
trial
]]*len(raw_data))
vals = np.concatenate((vals, lbls), axis=1)
dataset = np.append(dataset,vals, axis=0)
Expand All @@ -103,7 +104,7 @@ def creat_time_series(dt_list, act_labels, trial_codes, mode="mag", labeled=True
cols += [str(axes[0][:-2])]

if labeled:
cols += ["act", "id", "weight", "height", "age", "gender"]
cols += ["act", "id", "weight", "height", "age", "gender", "trial"]

dataset = pd.DataFrame(data=dataset, columns=cols)
return dataset
Expand Down

0 comments on commit ad8129b

Please sign in to comment.