Zurück zu den Modellen
Transformer

ElbowClassSum

Elbow Class Sum (ECS) transformer to select a subset of channels/variables.

Overview: From the input of multivariate time series data, create a distance matrix [1] by calculating the distance between each class centroid. The ECS selects the subset of channels using the elbow method, which maximizes the distance between the class centroids by aggregating the distance for every class pair across each channel.

Note: Channels, variables, dimensions, features are used interchangeably in literature. E.g., channel selection = variable selection.

Schnellstart

python
from sktime.transformations.channel_selection import ElbowClassSum

estimator = ElbowClassSum(distance=None)

Tags

Fähigkeiten

  • Multivariat
  • Inverse Transformation: Nicht unterstützt
  • Fehlende Werte: Nicht unterstützt
  • Entfernt fehlende Werte: Nicht unterstützt
  • Reihen ungleicher Länge: Nicht unterstützt
  • Gleicht Reihenlängen an: Nicht unterstützt

Eigenschaften

Eingabetypscitype:transform-input
Series
Ausgabetypscitype:transform-output
Series
Label-Typscitype:transform-labels
None
Fit ist leerfit_is_empty
Nein
Behält den Zeitindextransform-returns-same-time-index
Nein
Benötigt Xrequires_X
Ja
Benötigt yrequires_y
Ja
X und y brauchen denselben IndexX-y-must-have-same-index
Nein

Parameter(1)

distance: sktime pairwise panel transform, str, or callable, optional, default=None
if panel transform, will be used directly as the distance in the algorithm default None = euclidean distance on flattened series, FlatDist(ScipyDist()) if str, will behave as FlatDist(ScipyDist(distance)) = scipy dist on flat series if callable, must be univariate nested_univ x nested_univ -> 2D float np.array

Beispiele

>>> from sktime.transformations.channel_selection import ElbowClassSum
>>> from sktime.utils._testing.panel import make_classification_problem
>>> X, y = make_classification_problem (n_columns = 3, n_classes = 3, random_state = 42)
>>> cs = ElbowClassSum ()
>>> cs. fit (X, y) ElbowClassSum(
... )
>>> Xt = cs. transform (X) Any sktime compatible distance can be used, e.g., DTW distance:
>>> from sktime.dists_kernels import DtwDist
>>> 
>>> cs = ElbowClassSum (distance = DtwDist ())
>>> cs. fit (X, y) ElbowClassSum(
... )
>>> Xt = cs. transform (X)

Referenzen

  1. ..[1]: Bhaskar Dhariyal et al. “Fast Channel Selection for Scalable Multivariate Time Series Classification.” AALTD, ECML-PKDD, Springer, 2021