Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions meegkit/ress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions meegkit/utils/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

"""
Expand Down