diff --git a/meegkit/ress.py b/meegkit/ress.py index cdd8f022..7bc854c1 100644 --- a/meegkit/ress.py +++ b/meegkit/ress.py @@ -45,6 +45,7 @@ def RESS(X, sfreq: int, peak_freq: float, neig_freq: float = 1, -------- To project the RESS components back into sensor space, one can proceed as follows: + >>> # First apply RESS >>> from meegkit.utils import matmul3d # handles 3D matrix multiplication >>> out, fromRESS, _ = ress.RESS(data, sfreq, peak_freq, return_maps=True) @@ -53,6 +54,7 @@ def RESS(X, sfreq: int, peak_freq: float, neig_freq: float = 1, To transform a new observation into RESS component space (e.g. in the context of a cross-validation, with separate train/test sets): + >>> # Start by applying RESS to the train set: >>> out, _, toRESS = ress.RESS(data, sfreq, peak_freq, return_maps=True) >>> # Then multiply your test data by the toRESS: diff --git a/meegkit/utils/matrix.py b/meegkit/utils/matrix.py index 1501eb59..2264959b 100644 --- a/meegkit/utils/matrix.py +++ b/meegkit/utils/matrix.py @@ -91,8 +91,8 @@ def widen_mask(mask, widen=4, axis=0): Examples -------- - >> test = widen_mask(np.array([False, False, False, True, False], 1) - >> print(test) + >>> test = widen_mask(np.array([False, False, False, True, False], 1) + >>> print(test) [False False False True True]] """