class_docstr: Class to select appropriate window size to catch periodicity for time series analysis.
  There are two group of algorithms implemented:
  Whole-Series-Based (WSB):
      1. WindowSizeSelectorMethodsEnum.HAC - highest_autocorrelation
      2. WindowSizeSelectorMethodsEnum.DFF - dominant_fourier_frequency
  Subsequence-based (SB):
      1. WindowSizeSelectorMethodsEnum.MWF - multi_window_finder
      2. WindowSizeSelectorMethodsEnum.SSS - summary_statistics_subsequence
  Args:
      method: by ``default``, it is WindowSizeSelectorMethodsEnum.DFF.
      window_range: % of time series length, by ``default`` it is (5, 50).
  Attributes:
      length_ts(int): length of the time_series.
      window_max(int): maximum window size in real values.
      window_min(int): minimum window size in real values.
      dict_methods(dict): dictionary with all implemented methods.
  Example:
      To find window size for single time series::
          ts = np.random.rand(1000)
          ws_selector = WindowSizeSelector(method='hac')
          window_size = ws_selector.get_window_size(time_series=ts)
      To find window size for multiple time series::
          ts = np.random.rand(1000, 10)
          ws_selector = WindowSizeSelector(method='hac')
          window_size = ws_selector.apply(time_series=ts, average='median')
  Reference:
      (c) "Windows Size Selection in Unsupervised Time Series Analytics: A Review and Benchmark. Arik Ermshaus,
      Patrick Schafer, and Ulf Leser. 2022"
class_docstr_tok: ["Class","to","select","appropriate","window","size","to","catch","periodicity","for","time","series","analysis",".","There","are","two","group","of","algorithms","implemented",":","Whole-Series-Based","(","WSB",")",":","1",".","WindowSizeSelectorMethodsEnum.HAC","-","highest_autocorrelation","2",".","WindowSizeSelectorMethodsEnum.DFF","-","dominant_fourier_frequency","Subsequence-based","(","SB",")",":","1",".","WindowSizeSelectorMethodsEnum.MWF","-","multi_window_finder","2",".","WindowSizeSelectorMethodsEnum.SSS","-","summary_statistics_subsequence","Args",":","method",":","by","``","default","``",",","it","is","WindowSizeSelectorMethodsEnum.DFF",".","window_range",":","%","of","time","series","length",",","by","``","default","``","it","is","(","5",",","50",")",".","Attributes",":","length_ts","(","int",")",":","length","of","the","time_series",".","window_max","(","int",")",":","maximum","window","size","in","real","values",".","window_min","(","int",")",":","minimum","window","size","in","real","values",".","dict_methods","(","dict",")",":","dictionary","with","all","implemented","methods",".","Example",":","To","find","window","size","for","single","time","series",":",":","ts","=","np.random.rand","(","1000",")","ws_selector","=","WindowSizeSelector","(","method='hac","'",")","window_size","=","ws_selector.get_window_size","(","time_series=ts",")","To","find","window","size","for","multiple","time","series",":",":","ts","=","np.random.rand","(","1000",",","10",")","ws_selector","=","WindowSizeSelector","(","method='hac","'",")","window_size","=","ws_selector.apply","(","time_series=ts",",","average='median","'",")","Reference",":","(","c",")","``","Windows","Size","Selection","in","Unsupervised","Time","Series","Analytics",":","A","Review","and","Benchmark",".","Arik","Ermshaus",",","Patrick","Schafer",",","and","Ulf","Leser",".","2022","''"]
docstr: Main function to run WSS class over selected time series
  Note:
      One of the reason of ValueError is that time series size can be equal or smaller than 50.
      In case of it try to initially set window_size min and max.
  Returns:
      window_size_selected: value which has been chosen as appropriate window size
docstr_tok: ["Main","function","to","run","WSS","class","over","selected","time","series","Note",":","One","of","the","reason","of","ValueError","is","that","time","series","size","can","be","equal","or","smaller","than","50",".","In","case","of","it","try","to","initially","set","window_size","min","and","max",".","Returns",":","window_size_selected",":","value","which","has","been","chosen","as","appropriate","window","size"]
code: def get_window_size(self, time_series: np.ndarray) -> int:
      """Main function to run WSS class over selected time series
      Note:
          One of the reason of ValueError is that time series size can be equal or smaller than 50.
          In case of it try to initially set window_size min and max.
      Returns:
          window_size_selected: value which has been chosen as appropriate window size
      """
      self.length_ts = len(time_series)
  
      self.window_max = int(
          round(self.length_ts * self.window_range[1] / 100)
      )  # in real values
      self.window_min = int(
          round(self.length_ts * self.window_range[0] / 100)
      )  # in real values
  
      window_size_selected = self.dict_methods[self.wss_algorithm](
          time_series=time_series
      )
      window_size_selected = round(
          window_size_selected * 100 / self.length_ts
      )
      window_size_selected = max(
          self.window_range[0], window_size_selected
      )
      window_size_selected = min(
          self.window_range[1], window_size_selected
      )
      return window_size_selected
  
file_path: FEDOT/fedot/utilities/window_size_selector.py
imports: import math
  from enum import Enum, auto
  import numpy
  import pandas
  from scipy.signal import find_peaks
  from statsmodels.tsa.stattools import acf
label_desc: Use image node_id 3 for calling the WindowSizeSelector obj's underlying member method code with example usage: obj.get_window_size(time_series) and returns: window_size_selected