class_docstr: Apply element-wise exponentiation transformation to a time series.
  
  Transformation performs the following operations element-wise:
      * adds the constant `offset` (shift)
      * raises to the `power` provided (exponentiation)
  Offset="auto" computes offset as the smallest offset that ensure all elements
  are non-negative before exponentiation.
  
  Parameters
  ----------
  power : int or float, default=0.5
      The power to raise the input timeseries to.
  
  offset : "auto", int or float, default="auto"
      Offset to be added to the input timeseries prior to raising
      the timeseries to the given `power`. If "auto" the series is checked to
      determine if it contains negative values. If negative values are found
      then the offset will be equal to the absolute value of the most negative
      value. If not negative values are present the offset is set to zero.
      If an integer or float value is supplied it will be used as the offset.
  
  Attributes
  ----------
  power : int or float
      User supplied power.
  
  offset : int or float, or iterable.
      User supplied offset value.
      Scalar or 1D iterable with as many values as X columns in transform.
  
  See Also
  --------
  BoxCoxTransformer :
      Applies Box-Cox power transformation. Can help normalize data and
      compress variance of the series.
  LogTransformer :
      Transformer input data using natural log. Can help normalize data and
      compress variance of the series.
  sktime.transformations.series.exponent.SqrtTransformer :
      Transform input data by taking its square root. Can help compress
      variance of input series.
  
  Notes
  -----
  For an input series `Z` the exponent transformation is defined as
  :math:`(Z + offset)^{power}`.
  
  Examples
  --------
  >>> from sktime.transformations.series.exponent import ExponentTransformer
  >>> from sktime.datasets import load_airline
  >>> y = load_airline()
  >>> transformer = ExponentTransformer()
  >>> y_transform = transformer.fit_transform(y)
class_docstr_tok: ["Apply","element-wise","exponentiation","transformation","to","a","time","series",".","Transformation","performs","the","following","operations","element-wise",":","*","adds","the","constant","`","offset","`","(","shift",")","*","raises","to","the","`","power","`","provided","(","exponentiation",")","Offset=","''","auto","''","computes","offset","as","the","smallest","offset","that","ensure","all","elements","are","non-negative","before","exponentiation",".","Parameters","--","--","--","--","--","power",":","int","or","float",",","default=0.5","The","power","to","raise","the","input","timeseries","to",".","offset",":","``","auto","''",",","int","or","float",",","default=","''","auto","''","Offset","to","be","added","to","the","input","timeseries","prior","to","raising","the","timeseries","to","the","given","`","power","`",".","If","``","auto","''","the","series","is","checked","to","determine","if","it","contains","negative","values",".","If","negative","values","are","found","then","the","offset","will","be","equal","to","the","absolute","value","of","the","most","negative","value",".","If","not","negative","values","are","present","the","offset","is","set","to","zero",".","If","an","integer","or","float","value","is","supplied","it","will","be","used","as","the","offset",".","Attributes","--","--","--","--","--","power",":","int","or","float","User","supplied","power",".","offset",":","int","or","float",",","or","iterable",".","User","supplied","offset","value",".","Scalar","or","1D","iterable","with","as","many","values","as","X","columns","in","transform",".","See","Also","--","--","--","--","BoxCoxTransformer",":","Applies","Box-Cox","power","transformation",".","Can","help","normalize","data","and","compress","variance","of","the","series",".","LogTransformer",":","Transformer","input","data","using","natural","log",".","Can","help","normalize","data","and","compress","variance","of","the","series",".","sktime.transformations.series.exponent.SqrtTransformer",":","Transform","input","data","by","taking","its","square","root",".","Can","help","compress","variance","of","input","series",".","Notes","--","--","-","For","an","input","series","`","Z","`","the","exponent","transformation","is","defined","as",":","math",":","`","(","Z","+","offset",")","^","{","power","}","`",".","Examples","--","--","--","--",">",">",">","from","sktime.transformations.series.exponent","import","ExponentTransformer",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","y","=","load_airline","(",")",">",">",">","transformer","=","ExponentTransformer","(",")",">",">",">","y_transform","=","transformer.fit_transform","(","y",")"]
code: def _get_offset(self, X):
      if self.offset == "auto":
          Xmin = X.min()
          offset = -Xmin * (Xmin < 0)
      else:
          offset = self.offset
  
      if isinstance(X, pd.DataFrame):
          if isinstance(offset, (int, float)):
              offset = pd.Series(offset, index=X.columns)
          else:
              offset = pd.Series(offset)
              offset.index = X.columns
  
      return offset
  
file_path: sktime/sktime/transformations/series/exponent.py
imports: import numpy
  import pandas
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.warnings import warn
label_desc: Use image node_id 4 for calling the ExponentTransformer obj's underlying member method code with example usage: obj._get_offset(X) and returns: offset