def fit(self, y: np.ndarray, X: Optional[np.ndarray] = None) -> "MFLES":
        r"""Fit the model

        Parameters
        ----------
        y : numpy.array
            Clean time series of shape (t, ).
        X : array-like, optional (default=None)
            Exogenous of shape (t, n_x).

        Returns
        -------
        self : MFLES
            Fitted MFLES object.
        """
        y = _ensure_float(y)
        self.model_ = self._fit(y=y, X=X)
        self._store_cs(y=y, X=X)
        residuals = y - self.model_["fitted"]
        self.model_["sigma"] = _calculate_sigma(residuals, y.size)
        return self
Fit the model

        Parameters
        ----------
        y : numpy.array
            Clean time series of shape (t, ).
        X : array-like, optional (default=None)
            Exogenous of shape (t, n_x).

        Returns
        -------
        self : MFLES
            Fitted MFLES object.
        
python/statsforecast/models.py