-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
18 lines (17 loc) · 721 Bytes
/
test.py
File metadata and controls
18 lines (17 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from brain_matrix import BrainMatrix, load_brainmatrix
from utils import Timer
if __name__ == '__main__':
print('\n\nRUNNING TESTS\n----------------------------')
with Timer('RUN TIME'):
# euclidaen_emd
matrix = BrainMatrix('emd', downsample=10, name='test')
print('Compute distances')
matrix.compute_distances(['syntactic', 'speech', 'semantic', 'music'])
del matrix
matrix = load_brainmatrix('test')
assert isinstance(matrix['semantic']['speech'].distance, float)
# create some figure in figs/
matrix.plot_mds(clusters=2, dim=3, interactive=False)
matrix.plot_dendrogram()
matrix.write_csv()
print('TESTS PASSED')