braindecode package¶
Subpackages¶
- braindecode.datasets package
- braindecode.datautil package
- braindecode.experiments package
- braindecode.mne_ext package
- braindecode.models package
- braindecode.torch_ext package
- Submodules
- braindecode.torch_ext.constraints module
- braindecode.torch_ext.functions module
- braindecode.torch_ext.init module
- braindecode.torch_ext.losses module
- braindecode.torch_ext.modules module
- braindecode.torch_ext.optimizers module
- braindecode.torch_ext.schedulers module
- braindecode.torch_ext.util module
- braindecode.visualization package
Submodules¶
braindecode.util module¶
-
braindecode.util.
corr
(a, b)[source]¶ Computes correlation only between terms of a and terms of b, not within a and b.
Parameters: a, b (2darray, features x samples) Returns: Return type: Correlation between features in x and features in y
-
braindecode.util.
cov
(a, b)[source]¶ Computes covariance only between terms of a and terms of b, not within a and b.
Parameters: a, b (2darray, features x samples) Returns: Return type: Covariance between features in x and features in y
-
braindecode.util.
wrap_reshape_apply_fn
(stat_fn, a, b, axis_a, axis_b)[source]¶ Reshape two nd-arrays into 2d-arrays, apply function and reshape result back.
Parameters: - stat_fn (function) – Function to apply to 2d-arrays
- a (nd-array: nd-array)
- b (nd-array)
- axis_a (int or list of int) – sample axis
- axis_b (int or list of int) – sample axis
Returns: result – The result reshaped to remaining_dims_a + remaining_dims_b
Return type: nd-array
-
class
braindecode.util.
FuncAndArgs
(func, *args, **kwargs)[source]¶ Bases:
object
Container for a function and its arguments. Useful in case you want to pass a function and its arguments to another function without creating a new class. You can call the new instance either with the apply method or the ()-call operator:
>>> FuncAndArgs(max, 2,3).apply(4) 4 >>> FuncAndArgs(max, 2,3)(4) 4 >>> FuncAndArgs(sum, [3,4])(8) 15
-
braindecode.util.
merge_dicts
(*dict_args)[source]¶ Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts. http://stackoverflow.com/a/26853961