class_docstr: Class for preprocessing Time Series Forecasting Experiments.
class_docstr_tok: ["Class","for","preprocessing","Time","Series","Forecasting","Experiments","."]
docstr: Scale the data.
  
  Parameters
  ----------
  scale : str
      The method to be used for scaling. Allowed values and corresponding scalers are:
          "zscore": StandardScaler(),
          "minmax": MinMaxScaler(),
          "maxabs": MaxAbsScaler(),
          "robust": RobustScaler(),
  target : bool, optional
      If True, scaling is added to the target variable steps
      If False, scaling is added to the exogenous variable steps,
      by default True
  
  Raises
  ------
  ValueError
      (1) `scale` is not of one of the allowed values.
      (2) `scale` is not of one of the allowed types.
docstr_tok: ["Scale","the","data",".","Parameters","--","--","--","--","--","scale",":","str","The","method","to","be","used","for","scaling",".","Allowed","values","and","corresponding","scalers","are",":","``","zscore","''",":","StandardScaler","(",")",",","``","minmax","''",":","MinMaxScaler","(",")",",","``","maxabs","''",":","MaxAbsScaler","(",")",",","``","robust","''",":","RobustScaler","(",")",",","target",":","bool",",","optional","If","True",",","scaling","is","added","to","the","target","variable","steps","If","False",",","scaling","is","added","to","the","exogenous","variable","steps",",","by","default","True","Raises","--","--","--","ValueError","(","1",")","`","scale","`","is","not","of","one","of","the","allowed","values",".","(","2",")","`","scale","`","is","not","of","one","of","the","allowed","types","."]
code: def _add_scaling_steps(self, scale: str, target: bool = True):
      """Scale the data.
  
      Parameters
      ----------
      scale : str
          The method to be used for scaling. Allowed values and corresponding scalers are:
              "zscore": StandardScaler(),
              "minmax": MinMaxScaler(),
              "maxabs": MaxAbsScaler(),
              "robust": RobustScaler(),
      target : bool, optional
          If True, scaling is added to the target variable steps
          If False, scaling is added to the exogenous variable steps,
          by default True
  
      Raises
      ------
      ValueError
          (1) `scale` is not of one of the allowed values.
          (2) `scale` is not of one of the allowed types.
      """
      type_ = "Target" if target else "Exogenous"
      self.logger.info(f"Set up scaling for {type_} variable(s).")
  
      if isinstance(scale, str):
          scale_dict = {
              "zscore": StandardScaler(),
              "minmax": MinMaxScaler(),
              "maxabs": MaxAbsScaler(),
              "robust": RobustScaler(),
          }
  
          if scale not in scale_dict:
              raise ValueError(
                  f"{type_} scale method '{scale}' not allowed."
              )
  
          scaler = TabularToSeriesAdaptor(scale_dict[scale])
  
      else:
          raise ValueError(
              f"{type_} transformation method '{type(scale)}' is not of allowed type."
          )
  
      if target:
          self.transformer_steps_target.extend([("scaler", scaler)])
      else:
          self.transformer_steps_exogenous.extend([("scaler", scaler)])
  
file_path: pycaret/pycaret/internal/preprocess/time_series/forecasting/preprocessor.py
imports: from typing import Optional, Union
  from sklearn.preprocessing import MaxAbsScaler, MinMaxScaler, RobustScaler, StandardScaler
  from sktime.transformations.compose import ColumnwiseTransformer
  from sktime.transformations.series.adapt import TabularToSeriesAdaptor
  from sktime.transformations.series.boxcox import BoxCoxTransformer, LogTransformer
  from sktime.transformations.series.cos import CosineTransformer
  from sktime.transformations.series.exponent import ExponentTransformer, SqrtTransformer
  from sktime.transformations.series.impute import Imputer
  from pycaret.utils.time_series import TSExogenousPresent
label_desc: Use image node_id 6 for calling the TSForecastingPreprocessor obj's underlying member method code with example usage: obj._add_scaling_steps(scale, target) without return types