def transform(self, X):
        """Transform the provided data.

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

        Returns
        -------
        X_new : sparse matrix, shape = (n_samples, n_features_new)
            Document-term matrix with relevant learned features only.

        """
        check_is_fitted(self, 'vocabulary_')
        X = check_3d_array(X)
        n_samples, _, _ = X.shape
        X_diff = np.abs(np.diff(X))

        X_new = []
        for i, transformer in enumerate(self._estimators):
            X_new.append(transformer.transform(X[:, i, :]))
        for i, transformer in enumerate(self._estimators_diff):
            X_new.append(transformer.transform(X_diff[:, i, :]))

        if self.sparse:
            return csr_matrix(hstack(X_new))
        return np.hstack(X_new)
Transform the provided data.

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

        Returns
        -------
        X_new : sparse matrix, shape = (n_samples, n_features_new)
            Document-term matrix with relevant learned features only.

        
pyts/multivariate/transformation/weasel_muse.py