Estimate epochs sources given the SSD filters. Parameters ---------- X : array, shape ([n_epochs, ]n_channels, n_times) The input data from which to estimate the SSD. Either 2D array obtained from continuous data or 3D array obtained from epoched
(self, X)
| 271 | return self |
| 272 | |
| 273 | def transform(self, X): |
| 274 | """Estimate epochs sources given the SSD filters. |
| 275 | |
| 276 | Parameters |
| 277 | ---------- |
| 278 | X : array, shape ([n_epochs, ]n_channels, n_times) |
| 279 | The input data from which to estimate the SSD. Either 2D array |
| 280 | obtained from continuous data or 3D array obtained from epoched |
| 281 | data. |
| 282 | |
| 283 | Returns |
| 284 | ------- |
| 285 | X_ssd : array, shape ([n_epochs, ]n_components, n_times) |
| 286 | The processed data. |
| 287 | """ |
| 288 | X = self._check_X(X) |
| 289 | # For the case where n_epochs dimension is absent. |
| 290 | if X.ndim == 2: |
| 291 | X = np.expand_dims(X, axis=0) |
| 292 | X_aux = X[..., self.picks_, :] |
| 293 | if self.return_filtered: |
| 294 | X_aux = filter_data(X_aux, self.sfreq_, **self.filt_params_signal) |
| 295 | X_ssd = super().transform(X_aux).squeeze() |
| 296 | |
| 297 | return X_ssd |
| 298 | |
| 299 | def fit_transform(self, X, y=None, **fit_params): |
| 300 | """Fit SSD to data, then transform it. |