Question: 1 Time Series Data Practice(30 pts) Recall what we mentioned in the class, we have two types of data splitting for training and testing data:

 1 Time Series Data Practice(30 pts) Recall what we mentioned in

1 Time Series Data Practice(30 pts) Recall what we mentioned in the class, we have two types of data splitting for training and testing data: out of sample and out of time. It is proper to use Out of Time splitting method for time series dataset. Writing a function to spilt "Energy" dataset into training and testing data. Parameter input: Start Year: int (default value = 2012), End Year: int (default value = None). Ontput: Train, Test (Data type: Array(Numpy) ) If End Year is None, we will only choose all data with "Data Date" == Start Year as Test data, all other data as Train data. By default, all company Data Date within 2012 will be selected as Testing data. If End Year is NOT None, we will choose all data with "Data Date" == Start Year to End Year as Test data, all other data as Train data, For example, Start Year = 2010, End Year = 2013, all data in 2010, 2011, 2012, 2013 will be selected as Testing data . All return should be array from column "Accumulated Other Comprehensive Income (Loss)" to column "Selling, General and Administrative Expenses&quot

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 Programming Questions!