This pull request enhances the train_val_test_split function by standardizing the handling of stratification parameters stratify_y and stratify_cols. Previously, passing stratify_y=False or stratify_cols=False did not disable stratification as users might expect. This fix ensures that both parameters interpret False as disabling stratification, thereby improving the function's usability and intuitiveness as follows:
if stratify_y is False:
stratify_y = None
if stratify_cols is False:
stratify_cols = None
This pull request enhances the
train_val_test_split
function by standardizing the handling of stratification parametersstratify_y
andstratify_cols
. Previously, passingstratify_y=False
orstratify_cols=False
did not disable stratification as users might expect. This fix ensures that both parameters interpret False as disabling stratification, thereby improving the function's usability and intuitiveness as follows: