watex.utils.mlutils.discretizeCategoriesforStratification#
- watex.utils.mlutils.discretizeCategoriesforStratification(data, in_cat=None, new_cat=None, **kws)[source]#
Create a new category attribute to discretize instances.
A new category in data is better use to stratified the trainset and the dataset to be consistent and rounding using ceil values.
- Parameters:
in_cat – column name used for stratified dataset
new_cat – new category name created and inset into the dataframe.
- Returns:
new dataframe with new column of created category.