class_docstr: Scaled logit transform or Log transform.
  
  If both lower_bound and upper_bound are not None, a scaled logit transform is
  applied to the data. Otherwise, the transform applied is a log transform variation
  that ensures the resulting values from the inverse transform are bounded
  accordingly. The transform is applied to all scalar elements of the input array
  individually.
  
  Combined with an sktime.forecasting.compose.TransformedTargetForecaster, it ensures
  that the forecast stays between the specified bounds (lower_bound, upper_bound).
  
  Default is lower_bound = upper_bound = None, i.e., the identity transform.
  
  The logarithm transform is obtained for lower_bound = 0, upper_bound = None.
  
  Parameters
  ----------
  lower_bound : float, optional, default=None
      lower bound of inverse transform function
  upper_bound : float, optional, default=None
      upper bound of inverse transform function
  
  See Also
  --------
  sktime.transformations.series.boxcox.LogTransformer :
      Transformer input data using natural log. Can help normalize data and
      compress variance of the series.
  sktime.transformations.series.boxcox.BoxCoxTransformer :
      Applies Box-Cox power transformation. Can help normalize data and
      compress variance of the series.
  sktime.transformations.series.exponent.ExponentTransformer :
      Transform input data by raising it to an exponent. Can help compress
      variance of series if a fractional exponent is supplied.
  sktime.transformations.series.exponent.SqrtTransformer :
      Transform input data by taking its square root. Can help compress
      variance of input series.
  
  Notes
  -----
  | The scaled logit transform is applied if both upper_bound and lower_bound are
  | not None:
  |   :math:`log(\frac{x - a}{b - x})`, where a is the lower and b is the upper bound.
  
  | If upper_bound is None and lower_bound is not None the transform applied is
  | a log transform of the form:
  |   :math:`log(x - a)`
  
  | If lower_bound is None and upper_bound is not None the transform applied is
  | a log transform of the form:
  |   :math:`- log(b - x)`
  
  References
  ----------
  .. [1] Hyndsight - Forecasting within limits:
      https://robjhyndman.com/hyndsight/forecasting-within-limits/
  .. [2] Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and
      practice, 3rd edition, OTexts: Melbourne, Australia. OTexts.com/fpp3.
      Accessed on January 24th 2022.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sktime.datasets import load_airline
  >>> from sktime.transformations.series.scaledlogit import ScaledLogitTransformer
  >>> from sktime.forecasting.trend import PolynomialTrendForecaster
  >>> from sktime.forecasting.compose import TransformedTargetForecaster
  >>> y = load_airline()
  >>> fcaster = TransformedTargetForecaster([
  ...     ("scaled_logit", ScaledLogitTransformer(0, 650)),
  ...     ("poly", PolynomialTrendForecaster(degree=2))
  ... ])
  >>> fcaster.fit(y)
  TransformedTargetForecaster(...)
  >>> y_pred = fcaster.predict(fh = np.arange(32))
docstr: Inverse transform, inverse operation to transform.
  
  private _inverse_transform containing core logic, called from inverse_transform
  
  Parameters
  ----------
  X : 2D np.ndarray
      Data to be inverse transformed
  y : Series or Panel of mtype y_inner_mtype, optional (default=None)
      Ignored argument for interface compatibility
  
  Returns
  -------
  inverse transformed version of X
code: def _inverse_transform(self, X, y=None):
      """Inverse transform, inverse operation to transform.
  
      private _inverse_transform containing core logic, called from inverse_transform
  
      Parameters
      ----------
      X : 2D np.ndarray
          Data to be inverse transformed
      y : Series or Panel of mtype y_inner_mtype, optional (default=None)
          Ignored argument for interface compatibility
  
      Returns
      -------
      inverse transformed version of X
      """
      if self.upper_bound and self.lower_bound:
          X_inv_transformed = (
              self.upper_bound * np.exp(X) + self.lower_bound
          ) / (np.exp(X) + 1)
      elif self.upper_bound is not None:
          X_inv_transformed = self.upper_bound - np.exp(-X)
      elif self.lower_bound is not None:
          X_inv_transformed = np.exp(X) + self.lower_bound
      else:
          X_inv_transformed = deepcopy(X)
  
      return X_inv_transformed
  
file_path: sktime/sktime/transformations/series/scaledlogit.py
imports: from copy import deepcopy
  import numpy
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.warnings import warn
label_desc: Use image node_id 3 for calling the ScaledLogitTransformer obj's underlying member method code with example usage: obj._inverse_transform(X, y) and returns: X_inv_transformed