def __init__(self,
              with_mean=True,
              with_std=True,
              standardize: bool = False,
              **kwargs):
     """
     Parameters
     ----------
     with_mean, with_std: see StandardScaler
     standardize: bool
         If True, standardizes instead of normalizing, i.e. values are
         mapped from 0 to 1 based on min and max values.
     """
     self.with_mean = with_mean
     self.with_std = with_std
     self.standardize_ = standardize
     if standardize:
         self.fit = self._fit
         self.transform = self._transform
         self.fit_transform = self._fit_transform
     else:
         StandardScaler.__init__(self,
                                 with_mean=with_mean,
                                 with_std=with_std,
                                 **kwargs)