-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-reduced-dimensions.py
More file actions
27 lines (21 loc) · 981 Bytes
/
test-reduced-dimensions.py
File metadata and controls
27 lines (21 loc) · 981 Bytes
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
# Import libraries
import numpy as np
from lib.model import run, split_data
# Load the input data
print("Loading Beat Saber data ...")
data = np.load('./data/boxrr.npy')
trainX, trainY, valX, valY, testX, testY = split_data(data)
# Test dimensionality reductions
with open("./results/reduced-dimensions.csv", "w") as f:
res = run("All features", trainX, trainY, testX, testY, valX, valY)
f.write(res)
res = run("Only hands", trainX[:,:,7:], trainY, testX[:,:,7:], testY, valX[:,:,7:], valY)
f.write(res)
ax = [10, 11, 12, 13, 17, 18, 19, 20]
res = run("Only hand rotations", trainX[:,:,ax], trainY, testX[:,:,ax], testY, valX[:,:,ax], valY)
f.write(res)
ax = [10, 11, 12, 13]
res = run("Only left hand rotations", trainX[:,:,ax], trainY, testX[:,:,ax], testY, valX[:,:,ax], valY)
f.write(res)
res = run("Only left hand rotational magnitude", trainX[:,:,[13]], trainY, testX[:,:,[13]], testY, valX[:,:,[13]], valY)
f.write(res)