Skip to content
Advertisement

Tag: train-test-split

Return random numbers from lists of varying size with weights

I would like to split existing data for a train-test-split in python. Functions like sklearn.train_test_split() typically choose evenly distributed values as testdata. But since I want to check, whether my model can deal with skewed data (more training data on “the left side of the function”) I need to weigh the split more towards the left side of my data.

Advertisement