Back to models
Transformer

LogTransformer

Natural logarithm transformation.

The Natural logarithm transformation can be used to make the data more normally distributed and stabilize its variance.

Transforms each data point x to log(scale *(x+offset))

Quickstart

python
from sktime.transformations.boxcox import LogTransformer

estimator = LogTransformer(offset=0, scale=1)

Tags

Capabilities

  • Multivariate
  • Inverse transform: Supported
  • Unequal-length series
  • Missing values: Not supported
  • Removes missing values: Not supported
  • Equalizes series length: Not supported

Properties

Input typescitype:transform-input
Series
Output typescitype:transform-output
Series
Label typescitype:transform-labels
None
Fit is emptyfit_is_empty
Yes
Keeps the time indextransform-returns-same-time-index
Yes
Requires Xrequires_X
Yes
Requires yrequires_y
No
X and y need the same indexX-y-must-have-same-index
No

Parameters(2)

offsetfloat, default = 0
Additive constant applied to all the data.
scalefloat, default = 1
Multiplicative scaling constant applied to all the data.

Examples

>>> from sktime.transformations.boxcox import LogTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = LogTransformer ()
>>> y_hat = transformer. fit_transform (y)