Question: Exercise 2 : Let's create a training and a test set. Drop the target column from the ridge _ data DataFrame and store the remaining
Exercise : Let's create a training and a test set.
Drop the target column from the ridgedata DataFrame and store the remaining features in a DataFrame named X uppercase X
Save the target column as a Series named y lowercase y
Utilize Scikitlearn's traintestsplit function, using X and yto create a training set and a test set. Allocate of the instances for training and for testing. Set the randomstate to to ensure reproducibility of our results. Assign the DataFrames the following names: Xtrain, Xtest, ytrain, and ytest.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
