{"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":"# import libraries","metadata":{}},{"cell_type":"code","source":"import gresearch_crypto\nimport pandas as pd","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-12-29T13:09:33.916636Z","iopub.execute_input":"2021-12-29T13:09:33.917289Z","iopub.status.idle":"2021-12-29T13:09:33.964470Z","shell.execute_reply.started":"2021-12-29T13:09:33.917164Z","shell.execute_reply":"2021-12-29T13:09:33.963761Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# train dataframe ","metadata":{}},{"cell_type":"code","source":"train_df = pd.read_csv('../input/g-research-crypto-forecasting/train.csv')\ntrain_df.head()","metadata":{"execution":{"iopub.status.busy":"2021-12-29T13:09:33.965754Z","iopub.execute_input":"2021-12-29T13:09:33.966100Z","iopub.status.idle":"2021-12-29T13:10:25.786060Z","shell.execute_reply.started":"2021-12-29T13:09:33.966070Z","shell.execute_reply":"2021-12-29T13:10:25.785070Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.shape","metadata":{"execution":{"iopub.status.busy":"2021-12-29T13:10:25.787334Z","iopub.execute_input":"2021-12-29T13:10:25.787655Z","iopub.status.idle":"2021-12-29T13:10:25.793112Z","shell.execute_reply.started":"2021-12-29T13:10:25.787597Z","shell.execute_reply":"2021-12-29T13:10:25.792445Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# make env object","metadata":{}},{"cell_type":"code","source":"env = gresearch_crypto.make_env()","metadata":{"execution":{"iopub.status.busy":"2021-12-29T13:10:25.794667Z","iopub.execute_input":"2021-12-29T13:10:25.795220Z","iopub.status.idle":"2021-12-29T13:10:25.810223Z","shell.execute_reply.started":"2021-12-29T13:10:25.795183Z","shell.execute_reply":"2021-12-29T13:10:25.809223Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# get iteration test object","metadata":{}},{"cell_type":"code","source":"iter_test = env.iter_test()","metadata":{"execution":{"iopub.status.busy":"2021-12-29T13:10:25.811786Z","iopub.execute_input":"2021-12-29T13:10:25.812060Z","iopub.status.idle":"2021-12-29T13:10:25.824272Z","shell.execute_reply.started":"2021-12-29T13:10:25.812028Z","shell.execute_reply":"2021-12-29T13:10:25.823327Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# continuous prediction","metadata":{}},{"cell_type":"markdown","source":"### predict 14 of each sub test dataframe \n### 4 times prediction\n\ntest row size : 14 X 4 = 56 ","metadata":{}},{"cell_type":"code","source":"index = 0\nfor (test_df, sample_prediction_df) in iter_test: \n    print(\"index =\",index)\n    print(\"test_df shape:\",test_df.shape)\n    display(test_df)\n    print(\"test_df shape:\",sample_prediction_df.shape)\n    display(sample_prediction_df)\n    \n    sample_prediction_df['Target'] = 0\n    env.predict(sample_prediction_df)\n    \n    index += 1","metadata":{"execution":{"iopub.status.busy":"2021-12-29T13:11:00.939748Z","iopub.execute_input":"2021-12-29T13:11:00.940019Z","iopub.status.idle":"2021-12-29T13:11:01.070296Z","shell.execute_reply.started":"2021-12-29T13:11:00.939990Z","shell.execute_reply":"2021-12-29T13:11:01.069390Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}