Knowee
Questions
Features
Study Tools

# Split the sample along the time dimension:# * Data from 2008 to 2017 will be used for training # * Data from 2018 to 2022 will be used for testingX_train=X.loc[pd.IndexSlice[:,'2008-01-01':'2017-12-31'],:]X_test=X.loc[pd.IndexSlice[:,'2018-01-01':'2022-12-31'],:]y_train=y.loc[pd.IndexSlice[:,'2008-01-01':'2017-12-31'],:]y_train=y.loc[pd.IndexSlice[:,'2018-01-01':'2017-12-31'],:]

Question

Split the sample along the time dimension:# * Data from 2008 to 2017 will be used for training # * Data from 2018 to 2022 will be used for testingX_train=X.loc[pd.IndexSlice[:,'2008-01-01':'2017-12-31'],:]X_test=X.loc[pd.IndexSlice[:,'2018-01-01':'2022-12-31'],:]y_train=y.loc[pd.IndexSlice[:,'2008-01-01':'2017-12-31'],:]y_train=y.loc[pd.IndexSlice[:,'2018-01-01':'2017-12-31'],:]

🧐 Not the exact question you are looking for?Go ask a question

Solution

I'm sorry, but you didn't provide any text for me to respond to. Could you please provide the text?

Similar Questions

0/0

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.