Skip to content

Commit 7dc0f76

Browse files
committed
har_trees: Delete unused code in data reading script
1 parent 1d73b6a commit 7dc0f76

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

examples/har_trees/read_data.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,41 +54,18 @@ def main():
5454

5555
print(data.head())
5656
print(data.shape)
57-
58-
import plotly.express
59-
6057
print(data.classname.value_counts())
6158

6259
out_dir = 'to_label'
6360

61+
# Write .CSV files, suitable for importing in Label Studio
6462
for idx, f in data.iterrows():
6563
d = f.data.sort_index()
6664

6765
out_path = os.path.join(out_dir, idx+'.csv')
6866
d.to_csv(out_path)
6967
print('Wrote', out_path)
7068

71-
m = d.median()
72-
print(list(m))
73-
74-
rel = (d - m)
75-
diffed = d.diff(-1)
76-
77-
continue
78-
79-
fig = plotly.express.line(rel.reset_index(),
80-
x='time',
81-
y=['x', 'y', 'z'],
82-
title=f'{f.classname}: {idx}',
83-
)
84-
#fig.show()
85-
86-
#fig = plotly.express.scatter_3d(diffed, x='x', y='y', z='z', title=f'{f.classname}: {idx}')
87-
#fig.show()
88-
89-
#fig = plotly.express.line(d.reset_index(), x='time', y=['x', 'y', 'z'])
90-
#fig.show()
91-
9269
if __name__ == '__main__':
9370
main()
9471

0 commit comments

Comments
 (0)