Question 4 Using train_test_split, split x and y into training and test sets (x_train, x_test, y_train, and y_test). Set the random number generator state to 0 using random_state=0 to make sure your results match the autograder! This function should return a tuple of length 4: (x_train, x_test, y_train, y_test), where •x_train has shape (426, 30) x_test has shape (143, 30) y_train has shape (426,) • y_test has shape (143,) from sklearn.model_selection import train_test_split def answer four (): #YOUR CODE HERE raise NotImplementedError()

icon
Related questions
Question
Question 4
Using train_test_split, split X and y into training and test sets (X_train, x_test, y_train, and y_test).
Set the random number generator state to 0 using random_state=0 to make sure your results match the autograder!
This function should return a tuple of length 4: (x_train, x_test, y_train, y_test), where
x_train has shape (426, 30)
x_test has shape (143, 30)
y_train has shape (426,)
y_test has shape (143,)
.
.
from sklearn.model_selection import train_test_split
def answer_four ():
# YOUR CODE HERE
raise Not ImplementedError()
Transcribed Image Text:Question 4 Using train_test_split, split X and y into training and test sets (X_train, x_test, y_train, and y_test). Set the random number generator state to 0 using random_state=0 to make sure your results match the autograder! This function should return a tuple of length 4: (x_train, x_test, y_train, y_test), where x_train has shape (426, 30) x_test has shape (143, 30) y_train has shape (426,) y_test has shape (143,) . . from sklearn.model_selection import train_test_split def answer_four (): # YOUR CODE HERE raise Not ImplementedError()
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer