class_docstr: PeakTime feature extraction for use in e.g. tree based models.
  
  PeakTimeFeature uses a datetime index column and generates peak/working features
  for e.g. peak hours, peak weak, peak month, working hours, etc. It works based on
  input intervals, start time, end time e.g., peak_hour_start=[6], peak_hour_end=[9]
  
  Parameters
  ----------
  ts_freq : str, default= None
      Restricts selection of items to those with a frequency lower than
      the frequency of the time series given by ts_freq.
      E.g., if daily data is provided and ts_freq = ("D"), it does not make
      sense to derive PeakTimeFeature with higher frequency like hourly features. So,
      the outpul must exclude is_peak_hour and will be is_peak_day, is_peak_week,
      is_peak_month, is_peak_quarter, is_peak_year.
      Only supports the following frequencies:
      {"Y": year, "Q": quarter, "M": month, "W": week, "D": day, "H": hour}
  peak_hour_start : list, default= None
      start interval of peak hour(s) in a list where the first argument determines the
      first start hour, the second one determines the second start hour and so on.
      [peak_hour_start1, peak_hour_start2, peak_hour_start3, ...]
  peak_hour_end : list, default= None
      end interval of peak hour(s) in a list where the first argument determines the
      first end hour, the second one determines the second end hour and so on.
      [peak_hour_end1, peak_hour_end2, peak_hour_end3, ...]
  peak_day_start : list, default= None
      start interval of peak day(s) in a list where the first argument determines the
      first start day, the second one determines the second start day and so on.
      [peak_day_start1, peak_day_start2, peak_day_start3, ...]
  peak_day_end : list, default= None
      end interval of peak day(s) in a list where the first argument determines the
      first end day, the second one determines the second end day and so on.
      [peak_day_end1, peak_day_end2, peak_day_end3, ...]
  peak_week_start : list, default= None
      start interval of peak week(s) in a list where the first argument determines
      the first start week, the second one determines the second start week and so on.
      [peak_week_start1, peak_week_start2, peak_week_start3, ...]
  peak_week_end : list, default= None
      end interval of peak week(s) in a list where the first argument determines the
      first end week, the second one determines the second end week and so on.
      [peak_week_end1, peak_week_end2, peak_week_end3, ...]
  peak_month_start : list, default= None
      start interval of peak month(s) in a list where the first argument determines
      the first start month, the second one determines the second start month
      and so on. [peak_month_start1, peak_month_start2, peak_month_start3, ...]
  peak_month_end : list, default= None
      end interval of peak month(s) in a list where the first argument determines the
      first end month, the second one determines the second end month and so on.
      [peak_month_end1, peak_month_end2, peak_month_end3, ...]
  peak_quarter_start : list, default= None
      start interval of peak quarter(s) in a list where the first argument determines
      first start quarter, the second one determines the second start quarter
      and so on. [peak_quarter_start1, peak_quarter_start2, peak_quarter_start3, ...]
  peak_quarter_end : list, default= None
      end interval of peak quarter(s) in a list where the first argument determines
      first end quarter, the second one determines the second end quarter and so on.
      [peak_quarter_end1, peak_quarter_end2, peak_quarter_end3, ...]
  peak_year_start : list, default= None
      start interval of peak year(s) in a list where the first argument determines
      first start year, the second one determines the second start year and so on.
      [peak_year_start1, peak_year_start2, peak_year_start3, ...]
  peak_year_end : list, default= None
      end interval of peak year(s) in a list where the first argument determines
      first end year, the second one determines the second end year and so on.
      [peak_year_end1, peak_year_end2, peak_year_end3, ...]
  working_hour_start : list, default= None
      start interval of working hour(s) in a list where the first argument determines
      first start working hour, the second one determines the second start working
      hour and so on.
      e.g., [working_hour_start1, working_hour_start2, working_hour_start3, ...]
  working_hour_end : list, default= None
      end interval of working hour(s) in a list where the first argument determines
      first end working hour, the second one determines the second end working hour
      and so on. [working_hour_end1, working_hour_end2, working_hour_end3, ...]
  keep_original_columns :  boolean, optional, default=False
      If True, keep original columns in main dataframe (X) passed to `.transform()`.
  keep_original_peaktime_data_columns: boolean, optional, default=False
      If True, keep original peaktime_data dataframe columns including all separate
      peak/working columns, e.g., peak_hour_1, peak_hour_2, peak_week_1,
      peak_week_2, ...
  
  Notes
  -----
  * Descriptions and offsets for calendar features are as follows:
  hour:
      The hour of the day with 00:00:00 = 0, 23:00:00 = 23.
  day_of_week:
      The day of the week with Monday=0, Sunday=6.
  week_of_year:
      The week of the year (ISO calendar), start = 1, end = 52 or 53
  month_of_year:
      The month as January=1, December=12.
  quarter:
      The quarter of the year as:
      January, February, March = 1
      April, May, June, = 2
      July, August, September = 3
      October, November, December = 4
  year:
      The year of the datetime.
  
  * Descriptions for different intervals:
  
  1- Example for one peak interval: peak_hour_start=[6], peak_hour_end=[9] means we
  have just one peak hour interval where peak starts at 6am and peak ends at 9am.
  
  2- Example for two peak intervals: peak_hour_start=[6, 16], peak_hour_end=[9, 20]
  means we have two peak hour intervals where the first peak starts at 6 am
  and ends at 9 am. The second peak starts at 16 am and ends at 20. we can
  have more than two intervals.
  
  3- Example for one working interval: working_hour_start=[8], working_hour_end=[16]
  means we have just one working hour interval where work starts at 8 am and
  work ends at 16.
  
  4- Example for two working intervals: working_hour_start=[8, 15],
  working_hour_end=[12, 19] means we have two working hour intervals where the
  first starts at 8 am and ends at 15. The second  starts at 15 am and ends at 19.
  we can have more than two intervals.
  
  Examples
  --------
  >>> from sktime.transformations.series.peak import PeakTimeFeature  # doctest: +SKIP
  >>> from sktime.datasets import   # doctest: +SKIP
  >>> y = load_solar()  # doctest: +SKIP
  >>> y = y.tz_localize(None)  # doctest: +SKIP
  >>> y = y.asfreq("H")  # doctest: +SKIP
  
  Example 1: one interval for peak hour and working hour.
  (based on one start/end interval)
  
  Returns columns is_peak_hour, is_working_hour
  
  >>> transformer = PeakTimeFeature(ts_freq="H",
  ... peak_hour_start=[6], peak_hour_end=[9],
  ... working_hour_start=[8], working_hour_end=[16]
  ... )  # doctest: +SKIP
  >>> y_hat_peak = transformer.fit_transform(y)  # doctest: +SKIP
  
  Example 2: two intervals for peak hour and  working hour.
  (based on two start/end intervals)
  
  Returns columns is_peak_hour, is_working_hour
  
  >>> transformer = PeakTimeFeature(ts_freq="H",
  ... peak_hour_start=[6, 16], peak_hour_end=[9, 20],
  ... working_hour_start=[8, 15], working_hour_end=[12, 19]
  ... )  # doctest: +SKIP
  >>> y_hat_peak = transformer.fit_transform(y)  # doctest: +SKIP
  
  Example 3: We may have peak for different seasonality
  Here is an example for peak hour, peak day, peak week, peak month for
  two intervals (based on two start/end intervals)
  
  Returns columns is_peak_hour, is_peak_day, is_peak_week, is_peak_month
  
  >>> transformer = PeakTimeFeature(ts_freq="H",
  ... peak_hour_start=[6, 16], peak_hour_end=[9, 20],
  ... peak_day_start=[1, 2], peak_day_end=[2, 3],
  ... peak_week_start=[35, 45], peak_week_end=[40, 52],
  ... peak_month_start=[1, 7], peak_month_end=[6, 12]
  ... )  # doctest: +SKIP
  >>> y_hat_peak = transformer.fit_transform(y)  # doctest: +SKIP
code: def __init__(
      self,
      ts_freq=None,
      peak_hour_start=None,
      peak_hour_end=None,
      peak_day_start=None,
      peak_day_end=None,
      peak_week_start=None,
      peak_week_end=None,
      peak_month_start=None,
      peak_month_end=None,
      peak_quarter_start=None,
      peak_quarter_end=None,
      peak_year_start=None,
      peak_year_end=None,
      working_hour_start=None,
      working_hour_end=None,
      keep_original_columns=False,
      keep_original_peaktime_data_columns=False,
  ):
      self.ts_freq = ts_freq
      self.peak_hour_start = peak_hour_start
      self.peak_hour_end = peak_hour_end
      self.peak_day_start = peak_day_start
      self.peak_day_end = peak_day_end
      self.peak_week_start = peak_week_start
      self.peak_week_end = peak_week_end
      self.peak_month_start = peak_month_start
      self.peak_month_end = peak_month_end
      self.peak_quarter_start = peak_quarter_start
      self.peak_quarter_end = peak_quarter_end
      self.peak_year_start = peak_year_start
      self.peak_year_end = peak_year_end
      self.working_hour_start = working_hour_start
      self.working_hour_end = working_hour_end
      self.keep_original_columns = keep_original_columns
      self.keep_original_peaktime_data_columns = (
          keep_original_peaktime_data_columns
      )
  
      super().__init__()
  
file_path: sktime/sktime/transformations/series/peak.py
imports: import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 1 to create a new PeakTimeFeature object from inherited base classes: BaseTransformer with example: obj = PeakTimeFeature(ts_freq, peak_hour_start, peak_hour_end, peak_day_start, peak_day_end, peak_week_start, peak_week_end, peak_month_start, peak_month_end, peak_quarter_start, peak_quarter_end, peak_year_start, peak_year_end, working_hour_start, working_hour_end, keep_original_columns, keep_original_peaktime_data_columns)