import pandas as pd
from sklearn.preprocessing import StandardScaler as SkScaler
from woodwork.logical_types import Categorical, Integer
from evalml.pipelines.components.transformers import Transformer
from evalml.utils import (
_convert_woodwork_types_wrapper,
_retain_custom_types_and_initalize_woodwork,
infer_feature_types
)
[docs]class StandardScaler(Transformer):
"""Standardize features: removes mean and scales to unit variance."""
name = "Standard Scaler"
hyperparameter_ranges = {}
[docs] def __init__(self, random_seed=0, **kwargs):
parameters = {}
parameters.update(kwargs)
scaler = SkScaler(**parameters)
super().__init__(parameters=parameters,
component_obj=scaler,
random_seed=random_seed)