def fit(self, X, y=None):
        """Select Fourier coefficients and compute bin edges for each feature.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Data to transform.

        y : None or array-like, shape = (n_samples,) (default = None)
            Class labels for each sample. Only used if ``anova=True`` or
            ``strategy='entropy'.``

        """
        dft = DiscreteFourierTransform(
            n_coefs=self.n_coefs, drop_sum=self.drop_sum, anova=self.anova,
            norm_mean=self.norm_mean, norm_std=self.norm_std
        )
        mcb = MultipleCoefficientBinning(
            n_bins=self.n_bins, strategy=self.strategy, alphabet=self.alphabet
        )
        self._pipeline = Pipeline([('dft', dft), ('mcb', mcb)])
        self._pipeline.fit(X, y)
        self.support_ = self._pipeline.named_steps['dft'].support_
        self.bin_edges_ = self._pipeline.named_steps['mcb'].bin_edges_
        return self
Select Fourier coefficients and compute bin edges for each feature.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Data to transform.

        y : None or array-like, shape = (n_samples,) (default = None)
            Class labels for each sample. Only used if ``anova=True`` or
            ``strategy='entropy'.``

        
pyts/approximation/sfa.py