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

        It generates the indices of the windows from which the features will be
        extracted.

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

        y
            Ignored

        Returns
        -------
        self : object

        """
        # Check
        X = check_array(X, dtype='float64')
        n_timestamps = X.shape[1]
        n_windows, min_window_size, rng = self._check_params(X)

        # Generate the start and end indices
        start = rng.randint(0, n_timestamps - min_window_size, size=n_windows)
        end = rng.randint(start + min_window_size, n_timestamps + 1,
                          size=n_windows)
        self.indices_ = np.c_[start, end]
        return self
Fit the model according to the given training data.

        It generates the indices of the windows from which the features will be
        extracted.

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

        y
            Ignored

        Returns
        -------
        self : object

        
pyts/classification/time_series_forest.py