What’s new?#
0.5 (unreleased)#
Changelog#
The package build backend was switched from
setuptoolstohatchling. For users, nothing should change, by Richard Höchenberger in #335autorejectnow requires a minimum Python version of 3.11, by Stefan Appelhoff in #339 and Eric Larson in #359The minimum supported versions of the dependencies were raised to roughly three years old:
numpy >= 1.25.2,scipy >= 1.11.2,mne >= 1.6.0,scikit-learn >= 1.3.0,joblib >= 1.3.2andmatplotlib >= 3.7.2, by Eric Larson in #359autoreject.AutoRejectis now about 5x faster, with unchanged results: the cross-validation splits, test-fold medians and train-fold peak-to-peaks are hoisted out of the threshold and parameter searches, the peak-to-peaks needed to pick the channels to interpolate are computed for all epochs at once, and epochs that need the same set of channels interpolated are now repaired together instead of one at a time, by Eric Larson in #359The channel-level thresholds computed with
thresh_method='bayesian_optimization'are now compared on a single cross-validation split rather than on a freshly drawn one per candidate threshold. This only affectsrandom_state=None, where the results were not reproducible to begin with, by Eric Larson in #359With MNE-Python 1.14+,
autoreject.AutoRejectprecomputes the EEG and MEG interpolation data once withmne.channels.compute_interpolation_data()and interpolates via the publicmne.Epochs.interpolate_bads(), with results unchanged up to floating point precision, by Eric Larson in #368autoreject.AutoRejectis faster (about 15% for MEG+EEG data), with results unchanged up to floating point precision: the matrices that interpolate the bad channels are obtained by interpolating an identity matrix over the picked channels only, and then applied to all epochs at once, by Eric Larson in #369autoreject.compute_thresholds()now computes the MEG and EEG interpolation data once instead of once per channel with MNE-Python < 1.14, which made it about 3x faster for 51 gradiometers and many times faster for more channels, with results unchanged up to floating point precision, by Eric Larson in #369With MNE-Python < 1.14,
autoreject.AutoRejectcomputes the MEG dot products once instead of twice and no longer recreates the MEG coils for every interpolation, which made it about 25% faster for MEG data, with results unchanged up to floating point precision, by Eric Larson in #369The
n_jobsparameter ofautoreject.AutoRejectandautoreject.compute_thresholds()is now also used to compute the MEG interpolation data, by Eric Larson in #369The Bayesian optimization of the thresholds now uses a small NumPy implementation of the Gaussian process regression instead of
sklearn.gaussian_process.GaussianProcessRegressor, whose input validation dominated the computation time. This makesautoreject.AutoRejectabout 20 to 30% faster, with unchanged results, by Eric Larson in #369autoreject.AutoRejectandautoreject.compute_thresholds()are faster (about 30% for MEG and 45% for EEG data), with results unchanged up to floating point precision: the cross-validated loss of all candidate thresholds of a channel is computed at once from cumulative sums, and MNE-Python no longer checks the measurement info again for every set of channels to interpolate, by Eric Larson in #369
Bug#
autoreject.AutoReject.transform()now emits a single warning when all epochs are marked as bad, regardless of the MNE-Python version, by Eric Larson in #366autoreject.read_auto_reject()now restoresverbose=FalseasFalserather than0, which made a loadedautoreject.AutoRejectwarn about channels marked as bad as if it were verbose, by Eric Larson in #368autoreject.AutoReject.fit()no longer raises anIndexErroror silently interpolates MEG channels with the wrong precomputed dot products when other channels come before the MEG channels in the epochs, as in CTF recordings (#365), by Eric Larson in #368autoreject.utils.clean_by_interpno longer modifies anmne.Evokedpassed to it, which also made it interpolate each channel from neighbors that had already been interpolated (#364), by Eric Larson in #369
0.4.3 (2023-11-14)#
Bug#
Updates for MNE-Python compatibility by Eric Larson in #324
Fixed bug that arose if picks was specified with an unsorted list, by Paul Bogdan in #312
0.4.2 (2023-05-28)#
Bug#
Updates for MNE-Python compatibility by Eric Larson and Stefan Appelhoff in #302
0.4.1 (2023-01-12)#
Changelog#
NumPy 1.24 and Sphinx compatibility updates by Eric Larson in #293 and Stefan Appelhoff in #292
0.4 (2022-10-09)#
Changelog#
compute_thresholdsnow works without channel location data with optionaugment=Falseby Nikolai Chapochnikov in #282get_rejection_thresholdnow also accepts ECoG and SEEG data by Nikolai Chapochnikov in #281RANSAC implementation was refactored, works now with n_jobs>1 and produces consistent results across different number of jobs. Testing on simulated data added. by Simon Kern in #280
autorejectnow requiresmne >= 1.0, by Mainak Jas, Alex Gramfort, and Stefan Appelhoff in #267 and #268Add
reject_logoption toautoreject.AutoReject.transform()to enable users to make corrections toreject_logestimated by autoreject, by Alex Rockhill in #270Add
autoreject.RejectLog.save()andautoreject.read_reject_log()to save and load reject logs, by Alex Rockhill in #270
0.3.1 (2022-03-16)#
0.3 (2022-01-04)#
Changelog#
Make plotting of reject log more flexible by allowing to change the orientation of plot, option to supress the immediate display of the plot and returning the plot figure for further modification or saving in
autoreject.RejectLog.plot(), by Marcin Koculak in #152Add show_names option to
autoreject.RejectLog.plot(), by Mainak Jas in #209Enable support for fNIRS data types, by Robert Luke in #177
Add additional type support for argument picks, by Mathieu Scheltienne in #225
Use MNE progressbar, by Patrick Stetz in #227
autoreject.RejectLog.plot()now accepts anaxparameter to pass an existing Axes object, by Stefan Appelhoff in #301
Bug#
Don’t reset epochs.info[‘bads’] within
autoreject.compute_thresholds(), by Mainak Jas in #203Adjust usage of a private MNE method used for interpolation that failed for newer MNE versions, by Adina Wagner in #212.
API#
0.2.2 (2020-12-23)#
0.2.1 (2019-11-07)#
0.2 (2019-06-24)#
Changelog#
Introduced a new method
autoreject.AutoReject.save()and functionautoreject.read_auto_reject()for IO of autoreject objects, by Mainak Jas in #120Make MEG interpolation faster by precomputing dot products for the interpolation, by Mainak Jas in #122
Add default option for param_range in
autoreject.validation_curve(), by Alex Gramfort in #129
Bug#
Fixed bug in picking bad channels during interpolation. This bug only affects users who got an assertion error when running
autoreject.AutoReject, by Mainak Jas in #115Added check for channel locations so that autoreject does not hang when the channel positions are nan, by Mainak Jas in #130
Fixed bug in random seed for the Ransac algorithm when n_jobs > 1, by Legrand Nico and Mainak Jas in #138
Fixed pickling of
autoreject.AutoReject, by Hubert Banville in #193
API#
Added ch_types argument to
autoreject.get_rejection_threshold()to find rejection thresholds for only subset of channel types in the data, by Mainak Jas in #140
0.1 (2018-06-11)#
Changelog#
Initial release