class_docstr: Singular Spectrum Analysis object
class_docstr_tok: ["Singular","Spectrum","Analysis","object"]
docstr: Embed the time series with embedding_dimension window size.
  Optional: suspected_frequency changes embedding_dimension such that it is divisible by suspected frequency
docstr_tok: ["Embed","the","time","series","with","embedding_dimension","window","size",".","Optional",":","suspected_frequency","changes","embedding_dimension","such","that","it","is","divisible","by","suspected","frequency"]
code: def embed(
      self,
      embedding_dimension=None,
      suspected_frequency=None,
      verbose=False,
      return_df=False,
  ):
      """Embed the time series with embedding_dimension window size.
      Optional: suspected_frequency changes embedding_dimension such that it is divisible by suspected frequency
      """
      if not embedding_dimension:
          self.embedding_dimension = self.ts_N // 2
      else:
          self.embedding_dimension = embedding_dimension
      if suspected_frequency:
          self.suspected_frequency = suspected_frequency
          self.embedding_dimension = (
              self.embedding_dimension // self.suspected_frequency
          ) * self.suspected_frequency
  
      self.K = self.ts_N - self.embedding_dimension + 1
      self.X = m(
          linalg.hankel(self.ts, np.zeros(self.embedding_dimension))
      ).T[:, : self.K]
      self.X_df = pd.DataFrame(self.X)
      self.X_complete = self.X_df.dropna(axis=1)
      self.X_com = m(self.X_complete.values)
      self.X_missing = self.X_df.drop(self.X_complete.columns, axis=1)
      self.X_miss = m(self.X_missing.values)
      self.trajectory_dimentions = self.X_df.shape
      self.complete_dimensions = self.X_complete.shape
      self.missing_dimensions = self.X_missing.shape
      self.no_missing = self.missing_dimensions[1] == 0
  
      # if verbose:
      #     msg1 = 'Embedding dimension\t:  {}\nTrajectory dimensions\t: {}'
      #     msg2 = 'Complete dimension\t: {}\nMissing dimension     \t: {}'
      #     msg1 = msg1.format(self.embedding_dimension, self.trajectory_dimentions)
      #     msg2 = msg2.format(self.complete_dimensions, self.missing_dimensions)
      #     self._printer('EMBEDDING SUMMARY', msg1, msg2)
  
      if return_df:
          return self.X_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 6 for calling the mySSA obj's underlying member method code with example usage: obj.embed(embedding_dimension, suspected_frequency, verbose, return_df) and returns: self