MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / main

Function main

python_package/examples/tests/csp.py:6–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def main():
7 # demo for calculating the CSP filters
8 n_ep, n_ch, n_times = (2, 2, 4)
9 labels = np.array([0, 1]).astype('float64')
10
11 data = np.array([[[6, 3, 1, 5], [3, 0, 5, 1]], [[1, 5, 6, 2], [5, 1, 2, 2]]]).astype('float64')
12
13 filters, eigvals = DataFilter.get_csp(data, labels)
14
15 true_filters = np.array([[-0.313406, 0.0792153], [-0.280803, -0.480046]])
16
17 print("filters = ")
18 print(filters)
19
20 print("true filters = ")
21 print(true_filters)
22
23
24if __name__ == "__main__":

Callers 1

csp.pyFile · 0.70

Calls 1

get_cspMethod · 0.65

Tested by

no test coverage detected