{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# **Exploring train and test**\n\nHello,\n\nthis is a small exercise to compare test and train dataset.\n\n","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nimport dask.dataframe as dd\ntest=dd.read_csv('../input/g-research-crypto-forecasting/example_test.csv')","metadata":{"execution":{"iopub.status.busy":"2021-11-05T20:57:41.931404Z","iopub.execute_input":"2021-11-05T20:57:41.931721Z","iopub.status.idle":"2021-11-05T20:57:42.759300Z","shell.execute_reply.started":"2021-11-05T20:57:41.931685Z","shell.execute_reply":"2021-11-05T20:57:42.758346Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train=dd.read_csv('../input/g-research-crypto-forecasting/train.csv')","metadata":{"execution":{"iopub.status.busy":"2021-11-05T20:57:42.760661Z","iopub.execute_input":"2021-11-05T20:57:42.760875Z","iopub.status.idle":"2021-11-05T20:57:42.810599Z","shell.execute_reply.started":"2021-11-05T20:57:42.760850Z","shell.execute_reply":"2021-11-05T20:57:42.809881Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test['timestamp']=dd.to_datetime(test['timestamp'],unit='s')\ntest.groupby('Asset_ID').min().compute()","metadata":{"execution":{"iopub.status.busy":"2021-11-05T20:57:42.812306Z","iopub.execute_input":"2021-11-05T20:57:42.812937Z","iopub.status.idle":"2021-11-05T20:57:42.874933Z","shell.execute_reply.started":"2021-11-05T20:57:42.812892Z","shell.execute_reply":"2021-11-05T20:57:42.874051Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train['timestamp']=dd.to_datetime(train['timestamp'],unit='s')\ntrain.groupby('Asset_ID').max().compute()","metadata":{"execution":{"iopub.status.busy":"2021-11-05T20:57:42.877137Z","iopub.execute_input":"2021-11-05T20:57:42.877731Z","iopub.status.idle":"2021-11-05T20:58:18.710571Z","shell.execute_reply.started":"2021-11-05T20:57:42.877686Z","shell.execute_reply":"2021-11-05T20:58:18.709689Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Question**\n\nIn this example, the train-timestamp ends on 2021-09-21.\n\nThe test-timestamp starts on 2021-06-13.\n\nIs the test-set starting before the end of the train?\n\nThis question maybe drive the selection of the features.\nFor example, if there is overlapping I can calculate lagged variables.\n\nIs this going to happen in the final validation?","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}