Convert given array into two dimensions. Parameters ---------- X : array-like The data to fit. Can be, for example a list, or an array of at least 2d. The first dimension must be of length n_samples, where samples are the independent sampl
(self, X)
| 334 | return self |
| 335 | |
| 336 | def transform(self, X): |
| 337 | """Convert given array into two dimensions. |
| 338 | |
| 339 | Parameters |
| 340 | ---------- |
| 341 | X : array-like |
| 342 | The data to fit. Can be, for example a list, or an array of at |
| 343 | least 2d. The first dimension must be of length n_samples, where |
| 344 | samples are the independent samples used by the estimator |
| 345 | (e.g. n_epochs for epoched data). |
| 346 | |
| 347 | Returns |
| 348 | ------- |
| 349 | X : array, shape (n_samples, n_features) |
| 350 | The transformed data. |
| 351 | """ |
| 352 | X = self._check_data(X, atleast_3d=False) |
| 353 | if X.shape[1:] != self.features_shape_: |
| 354 | raise ValueError("Shape of X used in fit and transform must be same") |
| 355 | return X.reshape(len(X), -1) |
| 356 | |
| 357 | def fit_transform(self, X, y=None): |
| 358 | """Fit the data, then transform in one step. |
nothing calls this directly
no test coverage detected