Balancing transformers¶
This set of Transformer s are used
to make the dataset balanced, same number of samples per class.
It is based on imbalanced-learn .
sekupy.preprocessing.balancing.base module¶
- class sekupy.preprocessing.balancing.base.Balancer(balancer=RandomUnderSampler(), attr='chunks', **kwargs)[source]¶
This class is used to transform an unblanced dataset in a balanced dataset.
- Parameters:
balancer (
BaseSampler, optional) – [description] (the default isRandomUnderSamplerwhich [default_description])attr (str, optional) – [description] (the default is ‘chunks’, which [default_description])
force_balance (boolean) – [description]
- class sekupy.preprocessing.balancing.base.OverSamplingBalancer(balancer, attr='chunks', **kwargs)[source]¶