Some classes to make life bit easy

Contains some easy but required hacks

source

IndexMapper

 IndexMapper (categorical_columns:Union[str,list], verbose:bool=False)

A multi column categorical labeller :param categorical_columns: :param verbose: Verbosity

Type Default Details
categorical_columns Union Columns to create Label for
verbose bool False Verbosity

source

VariableTransformation

 VariableTransformation (variables:Union[str,list], strategy='zscore',
                         custom_func=None)

Variable Transformation for all features independently

Type Default Details
variables Union Variables for which we need to perform the transformation
strategy str zscore strategy on how to transform variables ‘zscore’,‘min-max’,‘median-iqr’, mean-iqr’,‘median-qd’, ‘median-std’,‘median-range’,‘mean-range’,‘min-qd’,‘min-iqr’, ‘min’,‘max’,‘mean’,‘median’,‘std’,‘iqr’,‘qd’,‘range’,‘custom’
custom_func NoneType None The function should take 4 arguments custom_func(value,group,groups_estimates,inverse)

source

GroupedVariableTransformation

 GroupedVariableTransformation (key, target, monotone_constraints=None,
                                strategy='zscore', custom_func=None)

Variable Transformation at group level

Type Default Details
key Grouping / ID column against which aggregation would happen
target Target column name which needs to be used for creating aggregation
monotone_constraints NoneType None Monotonic Constraints
strategy str zscore strategy on how to transform variables ‘zscore’,‘min-max’,‘median-iqr’, mean-iqr’,‘median-qd’, ‘median-std’,‘median-range’,‘mean-range’,‘min-qd’,‘min-iqr’, ‘min’,‘max’,‘mean’,‘median’,‘std’,‘iqr’,‘qd’,‘range’,‘custom’
custom_func NoneType None A custom function of form that take 4 arguments : custom_func(value,group,groups_estimates,inverse)