{"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":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-05-05T02:06:41.080070Z","iopub.execute_input":"2022-05-05T02:06:41.080394Z","iopub.status.idle":"2022-05-05T02:06:41.096800Z","shell.execute_reply.started":"2022-05-05T02:06:41.080359Z","shell.execute_reply":"2022-05-05T02:06:41.095856Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lgbm = pd.read_csv(\"/kaggle/input/top-x-football-prob-prediction-lgbm-v01/submission.csv\").set_index(\"id\")","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:05:09.290980Z","iopub.execute_input":"2022-05-05T02:05:09.291304Z","iopub.status.idle":"2022-05-05T02:05:09.366836Z","shell.execute_reply.started":"2022-05-05T02:05:09.291267Z","shell.execute_reply":"2022-05-05T02:05:09.365902Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lstm = pd.read_csv(\"/kaggle/input/fork-of-football-prob-lstm-v03/submission.csv\").set_index(\"id\")","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:06:56.046876Z","iopub.execute_input":"2022-05-05T02:06:56.047396Z","iopub.status.idle":"2022-05-05T02:06:56.140362Z","shell.execute_reply.started":"2022-05-05T02:06:56.047338Z","shell.execute_reply":"2022-05-05T02:06:56.139560Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"combined = lgbm * 0.2 + lstm * 0.8","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:09:49.408569Z","iopub.execute_input":"2022-05-05T02:09:49.409099Z","iopub.status.idle":"2022-05-05T02:09:49.416141Z","shell.execute_reply.started":"2022-05-05T02:09:49.409036Z","shell.execute_reply":"2022-05-05T02:09:49.415499Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"combined = combined.reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:09:51.203933Z","iopub.execute_input":"2022-05-05T02:09:51.204512Z","iopub.status.idle":"2022-05-05T02:09:51.210608Z","shell.execute_reply.started":"2022-05-05T02:09:51.204459Z","shell.execute_reply":"2022-05-05T02:09:51.209710Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"combined['draw'] = 1 - (combined['home'] + combined['away'])","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:10:22.139052Z","iopub.execute_input":"2022-05-05T02:10:22.139367Z","iopub.status.idle":"2022-05-05T02:10:22.145984Z","shell.execute_reply.started":"2022-05-05T02:10:22.139310Z","shell.execute_reply":"2022-05-05T02:10:22.145142Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"combined","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:10:24.999486Z","iopub.execute_input":"2022-05-05T02:10:24.999778Z","iopub.status.idle":"2022-05-05T02:10:25.015876Z","shell.execute_reply.started":"2022-05-05T02:10:24.999744Z","shell.execute_reply":"2022-05-05T02:10:25.014883Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"combined.to_csv(\"submission.csv\", index=False)","metadata":{"execution":{"iopub.status.busy":"2022-05-05T02:07:42.509574Z","iopub.execute_input":"2022-05-05T02:07:42.510069Z","iopub.status.idle":"2022-05-05T02:07:43.059863Z","shell.execute_reply.started":"2022-05-05T02:07:42.510014Z","shell.execute_reply":"2022-05-05T02:07:43.059175Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}