@@ -177,8 +177,7 @@ def _predict(self, X) -> np.ndarray:
177
177
178
178
179
179
class ChannelEnsembleClassifier (_BaseChannelEnsembleClassifier ):
180
- """
181
- Applies estimators to channels of an array.
180
+ """Applies estimators to channels of an array.
182
181
183
182
This estimator allows different channels or channel subsets of the input
184
183
to be transformed separately and the features generated by each
@@ -197,8 +196,8 @@ class ChannelEnsembleClassifier(_BaseChannelEnsembleClassifier):
197
196
Estimator must support `fit` and `predict_proba`. Special-cased
198
197
strings 'drop' and 'passthrough' are accepted as well, to
199
198
indicate to drop the channels.
200
- channels(s) : array-like of int, slice, boolean mask array. Integer channels
201
- are indexed from 0
199
+ channels(s) : array-like of int, slice, boolean mask array
200
+ Integer channels are indexed from 0.
202
201
remainder : {'drop', 'passthrough'} or estimator, default 'drop'
203
202
By default, only the specified channels in `transformations` are
204
203
transformed and combined in the output, and the non-specified
@@ -258,9 +257,9 @@ def get_test_params(cls, parameter_set="default"):
258
257
Name of the set of test parameters to return, for use in tests. If no
259
258
special parameters are defined for a value, will return `"default"` set.
260
259
ChannelEnsembleClassifier provides the following special sets:
261
- "results_comparison" - used in some classifiers to compare against
262
- previously generated results where the default set of parameters
263
- cannot produce suitable probability estimates
260
+ - "results_comparison" - used in some classifiers to compare against
261
+ previously generated results where the default set of parameters
262
+ cannot produce suitable probability estimates
264
263
265
264
Returns
266
265
-------
@@ -293,8 +292,7 @@ def get_test_params(cls, parameter_set="default"):
293
292
294
293
295
294
def _get_channel (X , key ):
296
- """
297
- Get time series channel(s) from input data X.
295
+ """Get time series channel(s) from input data X.
298
296
299
297
Supported input types (X): numpy arrays
300
298
@@ -311,7 +309,6 @@ def _get_channel(X, key):
311
309
- only supported for dataframes
312
310
- So no keys other than strings are allowed (while in principle you
313
311
can use any hashable object as key).
314
-
315
312
"""
316
313
# check whether we have string channel names or integers
317
314
if _check_key_type (key , int ):
@@ -340,8 +337,7 @@ def _get_channel(X, key):
340
337
341
338
342
339
def _check_key_type (key , superclass ):
343
- """
344
- Check that scalar, list or slice is of a certain type.
340
+ """Check that scalar, list or slice is of a certain type.
345
341
346
342
This is only used in _get_channel and _get_channel_indices to check
347
343
if the `key` (channel specification) is fully integer or fully string-like.
@@ -352,7 +348,6 @@ def _check_key_type(key, superclass):
352
348
The channel specification to check
353
349
superclass : int or str
354
350
The type for which to check the `key`
355
-
356
351
"""
357
352
if isinstance (key , superclass ):
358
353
return True
@@ -372,11 +367,9 @@ def _check_key_type(key, superclass):
372
367
373
368
374
369
def _get_channel_indices (X , key ):
375
- """
376
- Get feature channel indices for input data X and key.
370
+ """Get feature channel indices for input data X and key.
377
371
378
372
For accepted values of `key`, see the docstring of _get_channel
379
-
380
373
"""
381
374
n_channels = X .shape [1 ]
382
375
0 commit comments