{"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-11-08T13:44:08.988593Z","iopub.execute_input":"2021-11-08T13:44:08.989545Z","iopub.status.idle":"2021-11-08T13:44:09.038023Z","shell.execute_reply.started":"2021-11-08T13:44:08.989450Z","shell.execute_reply":"2021-11-08T13:44:09.037143Z"},"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-11-08T13:44:09.039611Z","iopub.execute_input":"2021-11-08T13:44:09.039899Z","iopub.status.idle":"2021-11-08T13:45:08.660696Z","shell.execute_reply.started":"2021-11-08T13:44:09.039868Z","shell.execute_reply":"2021-11-08T13:45:08.660083Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.shape","metadata":{"execution":{"iopub.status.busy":"2021-11-08T13:45:08.661815Z","iopub.execute_input":"2021-11-08T13:45:08.662619Z","iopub.status.idle":"2021-11-08T13:45:08.669725Z","shell.execute_reply.started":"2021-11-08T13:45:08.662584Z","shell.execute_reply":"2021-11-08T13:45:08.668634Z"},"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-11-08T13:45:08.671534Z","iopub.execute_input":"2021-11-08T13:45:08.671921Z","iopub.status.idle":"2021-11-08T13:45:08.683063Z","shell.execute_reply.started":"2021-11-08T13:45:08.671891Z","shell.execute_reply":"2021-11-08T13:45:08.682206Z"},"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-11-08T13:45:08.684490Z","iopub.execute_input":"2021-11-08T13:45:08.684711Z","iopub.status.idle":"2021-11-08T13:45:08.694233Z","shell.execute_reply.started":"2021-11-08T13:45:08.684685Z","shell.execute_reply":"2021-11-08T13:45:08.693543Z"},"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    print(\"test_df shape:\",sample_prediction_df.shape)\n    \n    sample_prediction_df['Target'] = 0\n    env.predict(sample_prediction_df)\n    \n    index += 1","metadata":{"execution":{"iopub.status.busy":"2021-11-08T13:45:08.695460Z","iopub.execute_input":"2021-11-08T13:45:08.696152Z","iopub.status.idle":"2021-11-08T13:45:08.741510Z","shell.execute_reply.started":"2021-11-08T13:45:08.696119Z","shell.execute_reply":"2021-11-08T13:45:08.740778Z"},"trusted":true},"execution_count":null,"outputs":[]}]}