Question: Hi, I need help for the below question. First, construct your training and test sets from your cfat dataset. Call the resulting data frame to

Hi, I need help for the below question.

First, construct your training and test sets from your cfat dataset. Call the resulting data frame to train_fat and test_fat. train_fat includes randomly selected 125 observations and the test_fat has the rest.

I have write the below code, but still wrong.

from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler observation_count = 125 train_fat = np.linspace(start = 1, stop = 125, num = observation_count) np.random.seed(22) test_fat = train_fat + np.random.normal(size = observation_count, loc = 10, scale = 20) train_fat_2d = train_fat.reshape(-1,1) train_fat, test_fat = train_test_split(cfat, test_size=0.2, random_state=42)

Please guide me. Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!