watex.utils.split_train_test#
- watex.utils.split_train_test(df, test_ratio)[source]#
A naive dataset split into train and test sets from a ratio and return a shuffled train set and test set.
- Parameters:
df – a dataframe containing features
test_ratio – a ratio for test set batch. test_ratio is ranged between 0 to 1. Default is 20%.
- Returns:
a tuple of train set and test set.