class_docstr: Singular Spectrum Analysis object
class_docstr_tok: ["Singular","Spectrum","Analysis","object"]
docstr: Forecast from last point of original time series up to steps_ahead using recurrent methodology
  This method also fills any missing data from the original time series.
docstr_tok: ["Forecast","from","last","point","of","original","time","series","up","to","steps_ahead","using","recurrent","methodology","This","method","also","fills","any","missing","data","from","the","original","time","series","."]
code: def forecast_recurrent(
      self,
      steps_ahead=12,
      singular_values=None,
      plot=False,
      return_df=False,
      **plotargs,
  ):
      """Forecast from last point of original time series up to steps_ahead using recurrent methodology
      This method also fills any missing data from the original time series.
      """
      try:
          self.X_com_hat
      except AttributeError:
          self._forecast_prep(singular_values)
      self.ts_forecast = np.array(self.ts_v[0])
      for i in range(1, self.ts_N + steps_ahead):
          try:
              if np.isnan(self.ts_v[i]):
                  x = (
                      self.R.T
                      * m(
                          self.ts_forecast[
                              max(0, i - self.R.shape[0]) : i
                          ]
                      ).T
                  )
                  self.ts_forecast = np.append(self.ts_forecast, x[0])
              else:
                  self.ts_forecast = np.append(
                      self.ts_forecast, self.ts_v[i]
                  )
          except IndexError:
              x = (
                  self.R.T
                  * m(self.ts_forecast[i - self.R.shape[0] : i]).T
              )
              self.ts_forecast = np.append(self.ts_forecast, x[0])
      self.forecast_N = i + 1
      new_index = pd.date_range(
          start=self.ts.index.min(),
          periods=self.forecast_N,
          freq=self.freq,
      )
      forecast_df = pd.DataFrame(
          self.ts_forecast, columns=["Forecast"], index=new_index
      )
      forecast_df["Original"] = np.append(
          self.ts_v, [np.nan] * steps_ahead
      )
      if plot:
          forecast_df.plot(
              title="Forecasted vs. original time series", **plotargs
          )
      if return_df:
          return forecast_df
  
imports: import numpy
  import pandas
  from numpy import matrix
  from scipy import linalg
  from matplotlib.pylab import rcParams
label_desc: Use image node_id 11 for calling the mySSA obj's underlying member method code with example usage: obj.forecast_recurrent(steps_ahead, singular_values, plot, return_df) and returns: forecast_df