class_docstr: Singular Spectrum Analysis object
class_docstr_tok: ["Singular","Spectrum","Analysis","object"]
code: def _forecast_prep(self, singular_values=None):
      self.X_com_hat = np.zeros(self.complete_dimensions)
      self.verticality_coefficient = 0
      self.forecast_orthonormal_base = {}
      if singular_values:
          try:
              for i in singular_values:
                  self.forecast_orthonormal_base[
                      i
                  ] = self.orthonormal_base[i]
          except:
              if singular_values == 0:
                  self.forecast_orthonormal_base[
                      0
                  ] = self.orthonormal_base[0]
              else:
                  raise (
                      "Please pass in a list/array of singular value indices to use for forecast"
                  )
      else:
          self.forecast_orthonormal_base = self.orthonormal_base
      self.R = np.zeros(self.forecast_orthonormal_base[0].shape)[:-1]
      for Pi in self.forecast_orthonormal_base.values():
          self.X_com_hat += Pi * Pi.T * self.X_com
          pi = np.ravel(Pi)[-1]
          self.verticality_coefficient += pi**2
          self.R += pi * Pi[:-1]
      self.R = m(self.R / (1 - self.verticality_coefficient))
      self.X_com_tilde = self.diagonal_averaging(self.X_com_hat)
  
imports: import numpy
  import pandas
  from numpy import matrix
  from scipy import linalg
  from matplotlib.pylab import rcParams
label_desc: Use image node_id 10 for calling the mySSA obj's underlying member method code with example usage: obj._forecast_prep(singular_values) without return types