Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions