-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathload_benchmark_data.py
More file actions
64 lines (59 loc) · 3.02 KB
/
load_benchmark_data.py
File metadata and controls
64 lines (59 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# for running locally (may remove this if your path is right)
import os
cwd = os.getcwd()
import sys
path = cwd
sys.path.append(path)
# imports
from splearn.data import Benchmark
# config
load_subject_id = 1
path_to_dataset = "../data/hsssvep"
# load data
subject_dataset = Benchmark(root=path_to_dataset, subject_id=load_subject_id)
# display
print("About the data:")
print("sample rate:", subject_dataset.sample_rate)
print("data shape:", subject_dataset.data.shape)
print("targets shape:", subject_dataset.targets.shape)
print("stimulus frequencies:", subject_dataset.stimulus_frequencies)
print("targets frequencies:", subject_dataset.targets_frequencies)
print("targets:", subject_dataset.targets)
# expected output:
# ```
# About the data:
# sample rate: 1000
# data shape: (240, 64, 1500)
# targets shape: (240,)
# stimulus frequencies: [ 8. 9. 10. 11. 12. 13. 14. 15. 8.2 9.2 10.2 11.2 12.2 13.2
# 14.2 15.2 8.4 9.4 10.4 11.4 12.4 13.4 14.4 15.4 8.6 9.6 10.6 11.6
# 12.6 13.6 14.6 15.6 8.8 9.8 10.8 11.8 12.8 13.8 14.8 15.8]
# targets frequencies: [ 8. 8. 8. 8. 8. 8. 9. 9. 9. 9. 9. 9. 10. 10.
# 10. 10. 10. 10. 11. 11. 11. 11. 11. 11. 12. 12. 12. 12.
# 12. 12. 13. 13. 13. 13. 13. 13. 14. 14. 14. 14. 14. 14.
# 15. 15. 15. 15. 15. 15. 8.2 8.2 8.2 8.2 8.2 8.2 9.2 9.2
# 9.2 9.2 9.2 9.2 10.2 10.2 10.2 10.2 10.2 10.2 11.2 11.2 11.2 11.2
# 11.2 11.2 12.2 12.2 12.2 12.2 12.2 12.2 13.2 13.2 13.2 13.2 13.2 13.2
# 14.2 14.2 14.2 14.2 14.2 14.2 15.2 15.2 15.2 15.2 15.2 15.2 8.4 8.4
# 8.4 8.4 8.4 8.4 9.4 9.4 9.4 9.4 9.4 9.4 10.4 10.4 10.4 10.4
# 10.4 10.4 11.4 11.4 11.4 11.4 11.4 11.4 12.4 12.4 12.4 12.4 12.4 12.4
# 13.4 13.4 13.4 13.4 13.4 13.4 14.4 14.4 14.4 14.4 14.4 14.4 15.4 15.4
# 15.4 15.4 15.4 15.4 8.6 8.6 8.6 8.6 8.6 8.6 9.6 9.6 9.6 9.6
# 9.6 9.6 10.6 10.6 10.6 10.6 10.6 10.6 11.6 11.6 11.6 11.6 11.6 11.6
# 12.6 12.6 12.6 12.6 12.6 12.6 13.6 13.6 13.6 13.6 13.6 13.6 14.6 14.6
# 14.6 14.6 14.6 14.6 15.6 15.6 15.6 15.6 15.6 15.6 8.8 8.8 8.8 8.8
# 8.8 8.8 9.8 9.8 9.8 9.8 9.8 9.8 10.8 10.8 10.8 10.8 10.8 10.8
# 11.8 11.8 11.8 11.8 11.8 11.8 12.8 12.8 12.8 12.8 12.8 12.8 13.8 13.8
# 13.8 13.8 13.8 13.8 14.8 14.8 14.8 14.8 14.8 14.8 15.8 15.8 15.8 15.8
# 15.8 15.8]
# targets: [ 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3
# 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7
# 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 11 11 11 11 11 11
# 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15
# 16 16 16 16 16 16 17 17 17 17 17 17 18 18 18 18 18 18 19 19 19 19 19 19
# 20 20 20 20 20 20 21 21 21 21 21 21 22 22 22 22 22 22 23 23 23 23 23 23
# 24 24 24 24 24 24 25 25 25 25 25 25 26 26 26 26 26 26 27 27 27 27 27 27
# 28 28 28 28 28 28 29 29 29 29 29 29 30 30 30 30 30 30 31 31 31 31 31 31
# 32 32 32 32 32 32 33 33 33 33 33 33 34 34 34 34 34 34 35 35 35 35 35 35
# 36 36 36 36 36 36 37 37 37 37 37 37 38 38 38 38 38 38 39 39 39 39 39 39]
# ```