obob_mne.decoding.TemporalArray¶
-
class
obob_mne.decoding.
TemporalArray
(raw_scores, weights, n_classes, info, tmin, scoring_name, c_factors_training, nave=1, nave_testing=None, c_factors_testing=None)[source]¶ Base class for temporal decoding.
Parameters: - raw_scores (
numpy.ndarray
shape (n_times) or (n_folds, n_times)) – The scores of the classification - weights (
numpy.ndarray
shape (n_channels, n_times)) – Classifier weights - n_classes (int) – The number of classes
- info (dict) – Info dict
- tmin (float) – Time of the first sample in seconds
- scoring_name (str) – Name of the scoring function (i.e. Accuracy…)
- c_factors_training (str) – Name of the factors over which was collapsed in the training set
- nave (int, optional) – Number of epochs in the training set.
- nave_testing (int or None) – Number of epochs in the testing set. If
None
, it is copied from nave. - c_factors_testing (None or str) – Name of the factors over which was collapsed in the testing set.
If
None
, it is copied from c_factors_training.
-
__init__
(raw_scores, weights, n_classes, info, tmin, scoring_name, c_factors_training, nave=1, nave_testing=None, c_factors_testing=None)[source]¶
Methods
__init__
(raw_scores, weights, n_classes, …)add_channels
(add_list[, force_update_info])Append new channels to the instance. add_proj
(projs[, remove_existing, verbose])Add SSP projection vectors. animate_topomap
([ch_type, times, …])Make animation of evoked data as topomap timeseries. anonymize
()Anonymize measurement information in place. apply_baseline
([baseline, verbose])Baseline correct evoked data. apply_hilbert
([picks, envelope, n_jobs, …])Compute analytic signal or envelope for a subset of channels. apply_proj
()Apply the signal space projection (SSP) operators to the data. as_type
([ch_type, mode])Compute virtual evoked using interpolated fields. copy
()Copy the instance of evoked. crop
([tmin, tmax])Crop data to a given time interval. decimate
(decim[, offset])Decimate the evoked data. del_proj
([idx])Remove SSP projection vector. detrend
([order, picks])Detrend data. drop_channels
(ch_names)Drop channel(s). filter
(l_freq, h_freq[, picks, …])Filter a subset of channels. get_peak
([ch_type, tmin, tmax, mode, …])Get location and latency of peak amplitude. interpolate_bads
([reset_bads, mode, origin, …])Interpolate bad MEG and EEG channels. pick
(picks[, exclude])Pick a subset of channels. pick_channels
(ch_names)Pick some channels. pick_types
([meg, eeg, stim, eog, ecg, emg, …])Pick some channels by type and names. plot
([picks, exclude, unit, show, ylim, …])Plot evoked data using butterfly plots. plot_field
(surf_maps[, time, time_label, n_jobs])Plot MEG/EEG fields on head surface and helmet in 3D. plot_image
([picks, exclude, unit, show, …])Plot evoked data as images. plot_joint
([times, title, picks, exclude, …])Plot evoked data as butterfly plot and add topomaps for time points. plot_projs_topomap
([ch_type, layout, axes])Plot SSP vector. plot_scores
([axes, show])Plot the scores as a line plot. plot_sensors
([kind, ch_type, title, …])Plot sensor positions. plot_topo
([layout, layout_scale, color, …])Plot 2D topography of evoked responses. plot_topomap
([times, ch_type, layout, vmin, …])Plot topographic maps of specific time points of evoked data. plot_white
(noise_cov[, show, rank, …])Plot whitened evoked response. rename_channels
(mapping)Rename channels. reorder_channels
(ch_names)Reorder channels. resample
(sfreq[, npad, window, n_jobs, pad, …])Resample data. save
(fname)Save dataset to file. savgol_filter
(h_freq[, verbose])Filter the data using Savitzky-Golay polynomial method. set_channel_types
(mapping)Define the sensor type of channels. set_eeg_reference
([ref_channels, …])Specify which reference to use for EEG data. set_montage
(montage[, set_dig, verbose])Set EEG sensor configuration and head digitization. shift_time
(tshift[, relative])Shift time scale in evoked data. time_as_index
(times[, use_rounding])Convert time to indices. to_data_frame
([picks, index, scaling_time, …])Export data in tabular structure as a pandas DataFrame. Attributes
ch_names
Channel names. chance_level
The chance level of the classifier. compensation_grade
The current gradient compensation grade. data
The data matrix. nclasses
proj
Whether or not projections are active. scores
The scores of the classification - raw_scores (