def fit(self, X, y):
        """Fit the model according to the given training data.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_features, n_timestamps)
            Multivariate time series.

        y : array-like, shape = (n_samples,)
            Class labels.

        Returns
        -------
        self : object

        """
        X = check_3d_array(X)
        _, n_features, n_timestamps = X.shape

        X_diff = np.abs(np.diff(X))

        estimator = WEASEL(
            word_size=self.word_size, n_bins=self.n_bins,
            window_sizes=self.window_sizes, window_steps=self.window_steps,
            anova=self.anova, drop_sum=self.drop_sum, norm_mean=self.norm_mean,
            norm_std=self.norm_std, strategy=self.strategy,
            chi2_threshold=self.chi2_threshold, sparse=self.sparse,
            alphabet=self.alphabet
        )
        self._estimators = [clone(estimator) for _ in range(n_features)]
        self._estimators_diff = [clone(estimator) for _ in range(n_features)]

        self.vocabulary_ = {}

        for i, transformer in enumerate(self._estimators):
            transformer.fit(X[:, i, :], y)
            self._update_vocabulary(str(i + 1), transformer, original=True)

        for i, transformer in enumerate(self._estimators_diff):
            transformer.fit(X_diff[:, i, :], y)
            self._update_vocabulary(str(i + 1), transformer, original=False)

        return self
Fit the model according to the given training data.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_features, n_timestamps)
            Multivariate time series.

        y : array-like, shape = (n_samples,)
            Class labels.

        Returns
        -------
        self : object

        
pyts/multivariate/transformation/weasel_muse.py