#export class Data(): # points [1] def dataAllocation(self,path): #…
Question #export class Data(): # points [1] def dataAllocation(self,path): #… #exportclass Data(): # points [1] def dataAllocation(self,path): # TODO: Separate out the x_data and y_data and return each # args: string path for .csv file # return: pandas dataframe, pandas series # ——————————- # ADD CODE HERE # ——————————- return x_data,y_data # points [1] def trainSets(self,x_data,y_data): # TODO: Split 70% of the data into training and 30% into test sets. Call them x_train, x_test, y_train and y_test. # Use the train_test_split method in sklearn with the parameter ‘shuffle’ set to true and the ‘random_state’ set to 614. # args: pandas dataframe, pandas dataframe # return: pandas dataframe, pandas dataframe, pandas series, pandas series # ——————————- # ADD CODE HERE # ——————————- return x_train, x_test, y_train, y_test Computer Science Engineering & Technology Python Programming CSE 6242 Share QuestionEmailCopy link Comments (0)


