{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"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\n#for 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 5GB 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","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"sub_10 = pd.read_csv('../input/model-1-fold0/submission_fold0_epoch35.csv')\nsub_20 = pd.read_csv('../input/model-2-fold0/submission_fold0_epoch38.csv')\nsub_30 = pd.read_csv('../input/model-3-fold0/submission_fold0_epoch39.csv')\nsub_11 = pd.read_csv('../input/model-1-fold1/submission_fold1_epoch_30.csv')\nsub_21 = pd.read_csv('../input/model-2-fold1/submission_fold1_epoch_34.csv')\nsub_31 = pd.read_csv('../input/model-3-fold1/submission_fold1_epoch_38.csv')\nsub_12 = pd.read_csv('../input/model-1-fold2/submission_fold2_epoch_34.csv')\nsub_22 = pd.read_csv('../input/model-2-fold2/submission_fold2_epoch_37.csv')\nsub_32 = pd.read_csv('../input/model-3-fold2/submission_fold2_epoch_39.csv')\nsub_13 = pd.read_csv('../input/model-1-fold3/submission_fold3_epoch_35.csv')\nsub_23 = pd.read_csv('../input/model-2-fold3/submission_fold3_epoch_36.csv')\nsub_33 = pd.read_csv('../input/model-3-fold3/submission_fold3_epoch_39.csv')\nsub_14 = pd.read_csv('../input/model-1-fold4/submission_fold4_epoch_33.csv')\nsub_24 = pd.read_csv('../input/model-2-fold4/submission_fold4_epoch_35.csv')\nsub_34 = pd.read_csv('../input/model-3-fold4/submission_fold4_epoch_36.csv')\nsub_b3_13 = pd.read_csv('../input/b3-fold3-m1/submission_fold3_b3_m1.csv')\nsub_b3_23 = pd.read_csv('../input/b3-fold3-m2/submission_fold3_b3_m2.csv')\nsub_b3_33 = pd.read_csv('../input/b3-fold3-m3/submission_fold3_b3_m3.csv')\nsub_b3_10 = pd.read_csv('../input/b3-fold0-m1/submission_fold0_b3_m1.csv')\nsub_b3_20 = pd.read_csv('../input/b3-fold0-m2/submission_fold0_b3_m2.csv')\nsub_b3_30 = pd.read_csv('../input/b3-fold0-m3/submission_fold0_b3_m3.csv')\nsub_oc_1 = pd.read_csv('../input/oc-m1/submission_openclose_m1.csv')\nsub_oc_2 = pd.read_csv('../input/oc-m2/submission_openclose_m2.csv')\nsub_oc_3 = pd.read_csv('../input/oc-m3/submission_openclose_m3.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sub_10 = sub_10.sort_values(by='Id')\nsub_20 = sub_20.sort_values(by='Id')\nsub_30 = sub_30.sort_values(by='Id')\nsub_11 = sub_11.sort_values(by='Id')\nsub_21 = sub_21.sort_values(by='Id')\nsub_31 = sub_31.sort_values(by='Id')\nsub_12 = sub_12.sort_values(by='Id')\nsub_22 = sub_22.sort_values(by='Id')\nsub_32 = sub_32.sort_values(by='Id')\nsub_13 = sub_13.sort_values(by='Id')\nsub_23 = sub_23.sort_values(by='Id')\nsub_33 = sub_33.sort_values(by='Id')\nsub_14 = sub_14.sort_values(by='Id')\nsub_24 = sub_24.sort_values(by='Id')\nsub_34 = sub_34.sort_values(by='Id')\nsub_b3_13 = sub_b3_13.sort_values(by='Id')\nsub_b3_23 = sub_b3_23.sort_values(by='Id')\nsub_b3_33 = sub_b3_33.sort_values(by='Id')\nsub_b3_10 = sub_b3_10.sort_values(by='Id')\nsub_b3_20 = sub_b3_20.sort_values(by='Id')\nsub_b3_30 = sub_b3_30.sort_values(by='Id')\nsub_oc_1 = sub_oc_1.sort_values(by='Id')\nsub_oc_2 = sub_oc_2.sort_values(by='Id')\nsub_oc_3 = sub_oc_3.sort_values(by='Id')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sub_10.reset_index(inplace=True,drop=True)\nsub_20.reset_index(inplace=True,drop=True)\nsub_30.reset_index(inplace=True,drop=True)\nsub_11.reset_index(inplace=True,drop=True)\nsub_21.reset_index(inplace=True,drop=True)\nsub_31.reset_index(inplace=True,drop=True)\nsub_12.reset_index(inplace=True,drop=True)\nsub_22.reset_index(inplace=True,drop=True)\nsub_32.reset_index(inplace=True,drop=True)\nsub_13.reset_index(inplace=True,drop=True)\nsub_23.reset_index(inplace=True,drop=True)\nsub_33.reset_index(inplace=True,drop=True)\nsub_14.reset_index(inplace=True,drop=True)\nsub_24.reset_index(inplace=True,drop=True)\nsub_34.reset_index(inplace=True,drop=True)\nsub_b3_13.reset_index(inplace=True,drop=True)\nsub_b3_23.reset_index(inplace=True,drop=True)\nsub_b3_33.reset_index(inplace=True,drop=True)\nsub_b3_10.reset_index(inplace=True,drop=True)\nsub_b3_20.reset_index(inplace=True,drop=True)\nsub_b3_30.reset_index(inplace=True,drop=True)\nsub_oc_1.reset_index(inplace=True,drop=True)\nsub_oc_2.reset_index(inplace=True,drop=True)\nsub_oc_3.reset_index(inplace=True,drop=True)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#w0 = 1/6\n#final_sub = pd.DataFrame()\n#final_sub['Id']=sub_b3_13.Id.values\n#final_sub['Label']=w0*sub_b3_13.Label + w0*sub_b3_23.Label + w0*sub_b3_33.Label + w0*sub_b3_10.Label + w0*sub_b3_20.Label + w0*sub_b3_30.Label\n#final_sub.to_csv('submission_Jul20_blend_b3.csv', index=False)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"w0 = 1/24\nfinal_sub = pd.DataFrame()\nfinal_sub['Id']=sub_10.Id.values\nfinal_sub['Label']=w0*sub_10.Label + w0*sub_20.Label + w0*sub_30.Label + w0*sub_11.Label + w0*sub_21.Label + w0*sub_31.Label + w0*sub_12.Label + w0*sub_22.Label + w0*sub_32.Label + w0*sub_13.Label + w0*sub_23.Label + w0*sub_33.Label + w0*sub_14.Label + w0*sub_24.Label + w0*sub_34.Label + w0*sub_b3_13.Label + w0*sub_b3_23.Label + w0*sub_b3_33.Label + w0*sub_b3_10.Label + w0*sub_b3_20.Label + w0*sub_b3_30.Label + w0*sub_oc_1.Label + w0*sub_oc_2.Label +w0*sub_oc_3.Label\nfinal_sub.to_csv('submission_Jul20_blend_b3_b2_oc.csv', index=False)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"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":4,"nbformat_minor":4}