Estimate the SSD decomposition on raw or epoched data. 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 epoc
(self, X, y=None)
| 241 | return X |
| 242 | |
| 243 | def fit(self, X, y=None): |
| 244 | """Estimate the SSD decomposition on raw or epoched data. |
| 245 | |
| 246 | Parameters |
| 247 | ---------- |
| 248 | X : array, shape ([n_epochs, ]n_channels, n_times) |
| 249 | The input data from which to estimate the SSD. Either 2D array |
| 250 | obtained from continuous data or 3D array obtained from epoched |
| 251 | data. |
| 252 | y : None |
| 253 | Ignored; exists for compatibility with scikit-learn pipelines. |
| 254 | |
| 255 | Returns |
| 256 | ------- |
| 257 | self : instance of SSD |
| 258 | Returns the modified instance. |
| 259 | """ |
| 260 | X = self._check_X(X, y=y, fit=True) |
| 261 | self._validate_params(X) |
| 262 | if isinstance(self.info, Info): |
| 263 | info = self.info |
| 264 | else: |
| 265 | info = create_info(X.shape[-2], self.sfreq_, ch_types="eeg") |
| 266 | self.picks_ = _picks_to_idx(info, self.picks, none="data", exclude="bads") |
| 267 | |
| 268 | super().fit(X, y) |
| 269 | |
| 270 | logger.info("Done.") |
| 271 | return self |
| 272 | |
| 273 | def transform(self, X): |
| 274 | """Estimate epochs sources given the SSD filters. |