Train Test Split

easy· Machine Learningruns: 0

Implement a function that shuffles a dataset and splits it into training and test sets. Return four arrays: X_train, X_test, y_train, y_test. The function accepts a test_size fraction and a random seed for reproducibility.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.