Skip to content

Commit

Permalink
DOC updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmainak committed Jun 10, 2018
1 parent d157ac0 commit 5c3b7eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
23 changes: 3 additions & 20 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ICA solutions can be affected by high amplitude artifacts, therefore
we recommend first using autoreject to detect the bad segments, then applying
ICA, and finally interpolating the bad data::

>>> ar = LocalAutorejectCV()
>>> ar = Autoreject()
>>> ar.fit(epochs)
>>> ica.fit(epochs[~ar.reject_log.bad_epochs_idx])
>>> ica.exclude = [5, 7] # exclude EOG components
Expand All @@ -18,34 +18,17 @@ ICA, and finally interpolating the bad data::
Autoreject is not meant for eyeblink artifacts since it affects neighboring
sensors. Indeed, a spatial filtering method like ICA is better suited for this.

How do I manually set the `n_interpolate` and `consensus_percs` parameter?
How do I manually set the `n_interpolate` and `consensus` parameter?
--------------------------------------------------------------------------

If you do not want autoreject to select a parameter for you, simply pass it
as a list of a single element::

>>> ar = LocalAutorejectCV(n_interpolate=[1], consensus_percs=[0.6])
>>> ar = Autoreject(n_interpolate=[1], consensus_percs=[0.6])

Note this will still run a cross-validation loop to generate the
validation score.

What if I do not know the channel locations?
--------------------------------------------

While autoreject will still work, the solution may not be optimal. The channel
locations are needed for generating augmented trials which is a necessary
ingredient of the algorithm. If you are working with EEG data, you can use MNE
to set a standard montage::

# code for setting montage

Does autoreject also interpolate user-marked bad channels?
----------------------------------------------------------

No, autoreject ignores the bad channels in `epochs.info['bads']` by default.
However, it is possible to explicitly ask autoreject to work on all the channels
(including those marked as bad by the user) by using the `picks` argument.

Is it possible to get only bad sensor annotations and not interpolate?
----------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ in your script:

.. code:: python
>>> from autoreject import LocalAutoRejectCV
>>> ar = LocalAutoRejectCV()
>>> from autoreject import AutoReject
>>> ar = AutoReject()
>>> epochs_clean = ar.fit_transform(epochs) # doctest: +SKIP
This will automatically clean an `epochs` object read in using MNE-Python. To get the
Expand Down

0 comments on commit 5c3b7eb

Please sign in to comment.