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

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Training vector.

        y : None or array-like, shape = (n_samples,)
            Class labels for each data sample. Ignored.

        Returns
        -------
        self : object

        """
        X = check_array(X, dtype='float64')
        n_samples, n_timestamps = X.shape

        kernel_sizes, seed = self._check_params(n_timestamps)

        # Generate the kernels
        weights, lengths, biases, dilations, paddings = generate_kernels(
            self.n_kernels, n_timestamps, kernel_sizes, seed)

        self.weights_ = weights
        self.length_ = lengths
        self.bias_ = biases
        self.dilation_ = dilations.astype('int64')
        self.padding_ = paddings.astype('int64')

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

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Training vector.

        y : None or array-like, shape = (n_samples,)
            Class labels for each data sample. Ignored.

        Returns
        -------
        self : object

        
pyts/transformation/rocket.py