def _get_target_residuals(
        self,
        series: TimeSeries,
        future_covariates: TimeSeries,
    ) -> np.ndarray:
        """Computes the OLS residuals for predicting the target series from `future_covariates`."""
        fitted_values = self._linreg.model.predict(
            X=future_covariates.slice_intersect_values(series, copy=False)[:, :, 0]
        )
        residuals = series.values(copy=False).flatten() - fitted_values
        return residuals
Computes the OLS residuals for predicting the target series from `future_covariates`.
darts/models/forecasting/sf_model.py