tensortrade.pipeline.transformers.scaling module

class tensortrade.pipeline.transformers.scaling.ScalingTransformer(method: str = 'standard')[source]

Bases: AbstractTransformer

This class is used for scaling data. So that it can be used for machine learning.

Parameters:

method (str) – The used scaler: ‘standard’ for StandardScaler, ‘minmax’ for MinMaxScaler

transform(df: DataFrame) DataFrame[source]

Scales the data.

Parameters:

df (DataFrame) – The dataframe to be scaled.

Returns:

The scaled dataframe.

Return type:

DataFrame