src.utils.preprocess
src.utils.preprocess.
downcast
Downcast a series to the lowest possible memory type.
pd.Series
Series to downcast.
If True it will try to read strings as numeric values.
If True (string) objects will be cast as a category.
Downcasted
map_labels
Map a Series values by the labels given.
Series to map on.
Indicator for kind of preprocess in series. With kind of {“categorical”, “ordinal”} the mapping is applied, otherwise not.
Defines with the mapping {key_0: value_0, etc.}.
Additional arguments.
Series with mapped values.
MinMaxScaler
MinMax Scaler like in sklearn, prevents total library import/dependency.
Initialize scaler with upper and lower boundary.
float
upper boundary to scale to
lower boundary to scale to
fit
Get fit parameters.
np.array
preprocess to fit on
None
solely for consistency
self
instance with self.min, self.max defined.
transform
Scales preprocess according to fitted parameters.
preprocess to scale
scaled preprocess
fit_transform
Execute consecutively self.fit and self.transform.
inverse_transform
Scale back to original domain.
src.utils.parser
src.utils.snowflake