class_docstr: Symbolic Fourier Approximation (SFA) Transformer.
  
  Overview: for each series:
      run a sliding window across the series
      for each window
          shorten the series with DFT
          discretise the shortened series into bins set by MFC
          form a word from these discrete values
  by default SFA produces a single word per series (window_size=0)
  if a window is used, it forms a histogram of counts of words.
  
  Parameters
  ----------
  word_length:         int, default = 8
      length of word to shorten window to (using PAA)
  
  alphabet_size:       int, default = 4
      number of values to discretise each value to
  
  window_size:         int, default = 12
      size of window for sliding. Input series
      length for whole series transform
  
  norm:                boolean, default = False
      mean normalise words by dropping first fourier coefficient
  
  binning_method:      {"equi-depth", "equi-width", "information-gain", "kmeans"},
                          default="equi-depth"
      the binning method used to derive the breakpoints.
  
  anova:               boolean, default = False
      If True, the Fourier coefficient selection is done via a one-way
      ANOVA test. If False, the first Fourier coefficients are selected.
      Only applicable if labels are given
  
  bigrams:             boolean, default = False
      whether to create bigrams of SFA words
  
  skip_grams:          boolean, default = False
      whether to create skip-grams of SFA words
  
  remove_repeat_words: boolean, default = False
      whether to use numerosity reduction (default False)
  
  levels:              int, default = 1
      Number of spatial pyramid levels
  
  save_words:          boolean, default = False
      whether to save the words generated for each series (default False)
  
  return_pandas_data_series:          boolean, default = False
      set to true to return Pandas Series as a result of transform.
      setting to true reduces speed significantly but is required for
      automatic test.
  
  n_jobs:              int, optional, default = 1
      The number of jobs to run in parallel for both `transform`.
      ``-1`` means using all processors.
  
  Attributes
  ----------
  words: []
  breakpoints: = []
  num_insts = 0
  num_atts = 0
  
  References
  ----------
  .. [1] Schäfer, Patrick, and Mikael Högqvist. "SFA: a symbolic fourier approximation
  and  index for similarity search in high dimensional datasets." Proceedings of the
  15th international conference on extending database technology. 2012.
code: def __init__(
      self,
      word_length=8,
      alphabet_size=4,
      window_size=12,
      norm=False,
      binning_method="equi-depth",
      anova=False,
      bigrams=False,
      skip_grams=False,
      remove_repeat_words=False,
      levels=1,
      lower_bounding=True,
      save_words=False,
      keep_binning_dft=False,
      return_pandas_data_series=False,
      use_fallback_dft=False,
      typed_dict=False,
      n_jobs=1,
  ):
      self.words = []
      self.breakpoints = []
  
      # we cannot select more than window_size many letters in a word
      offset = 2 if norm else 0
      self.dft_length = (
          window_size - offset if anova is True else word_length
      )
      # make dft_length an even number (same number of reals and imags)
      self.dft_length = self.dft_length + self.dft_length % 2
  
      self.support = np.array(list(range(word_length)))
  
      self.word_length = word_length
      self.alphabet_size = alphabet_size
      self.window_size = window_size
  
      self.norm = norm
      self.lower_bounding = lower_bounding
      self.inverse_sqrt_win_size = (
          1.0 / math.sqrt(window_size) if not lower_bounding else 1.0
      )
  
      self.remove_repeat_words = remove_repeat_words
  
      self.save_words = save_words
      self.keep_binning_dft = keep_binning_dft
      self.binning_dft = None
  
      self.levels = levels
      self.binning_method = binning_method
      self.anova = anova
  
      self.bigrams = bigrams
      self.skip_grams = skip_grams
  
      self.return_pandas_data_series = return_pandas_data_series
      self.use_fallback_dft = use_fallback_dft
      self._use_fallback_dft = (
          use_fallback_dft
          if word_length < window_size - offset
          else True
      )
      self.typed_dict = typed_dict
  
      self.n_jobs = n_jobs
  
      self.n_instances = 0
      self.series_length = 0
      self.letter_bits = 0
      self.letter_max = 0
      self.word_bits = 0
      self.max_bits = 0
      self.level_bits = 0
      self.level_max = 0
  
      super().__init__()
  
      if not return_pandas_data_series:
          self.set_config(**{"output_conversion": "off"})
  
imports: import math
  import sys
  import warnings
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn.feature_selection import f_classif
  from sklearn.preprocessing import KBinsDiscretizer
  from sklearn.tree import DecisionTreeClassifier
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation.panel import check_X
label_desc: Use image node_id 1 to create a new SFA object from inherited base classes: BaseTransformer with example: obj = SFA(word_length, alphabet_size, window_size, norm, binning_method, anova, bigrams, skip_grams, remove_repeat_words, levels, lower_bounding, save_words, keep_binning_dft, return_pandas_data_series, use_fallback_dft, typed_dict, n_jobs)