{"cells":[{"metadata":{},"cell_type":"markdown","source":"# About\n\nThis kernel was built for you in case you're running your work elsewhere and want to try out your submissions directly."},{"metadata":{},"cell_type":"markdown","source":"<font size=4 color='red'> If you find this kernel useful, please don't forget to upvote. Thank you. </font>"},{"metadata":{},"cell_type":"markdown","source":"# Reminder\n\nPlease note that in order to be eligible for this competition prizes, your submission can't be generated from this kernel but from machine learning code fully run on TPUs for both training and inference. That code must be made public following the end of the competition. Prizes are subject to fulfillment of Winners Obligations as specified in the competition's rules."},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"_kg_hide-output":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 in \nimport numpy as np\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the \"../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\nos.listdir('../input/')\n# Any results you write to the current directory are saved as output.","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds1=np.load('../input/tpu-enet-b7-densenet-random-cut/probs.npz')\npreds1['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds2=np.load('../input/kernel4-aug/probs.npz')\npreds2['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds4=np.load('../input/fork-of-tpu-enet-b7-incepentionresnetv2-densene/probs.npz')\npreds4['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds3=np.load('../input/fork-of-fork-of-tpu-enet-b7-incepentionresnetv2/probs.npz')\npreds3['a'].shape","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## 5fold b7"},{"metadata":{"trusted":true},"cell_type":"code","source":"preds51=np.load('../input/5-kfold-efficentne-e7-p1/probs.npz')\npreds51['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds52=np.load('../input/5-kfold-efficentne-e7-p2/probs.npz')\npreds52['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds53=np.load('../input/5-kfold-efficentne-e7-p3/probs.npz')\npreds53['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds54=np.load('../input/5-kfold-efficentne-e7-p4/probs.npz')\npreds54['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds55=np.load('../input/5-kfold-efficentne-e7-p5/probs.npz')\npreds55['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds55=(preds51['a']+preds52['a']+preds53['a']+preds54['a']+preds55['a'])/5","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds55=0.65*preds4['a']+0.35*preds55","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds=0.3*preds1['a']+0.3*preds2['a']+0.3*preds3['a']+0.1*preds55\npreds.shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"del preds1,preds2,preds3,preds4,preds55\nimport gc\ngc.collect()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#lb 0.96387\npreds6=np.load('../input/flowertpuwin-densenet201/probs.npz')\npreds6['a'].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#lb 0.96557\npreds7=np.load('../input/flowertpuwin-densenet201/probs.npz')\npreds7['a'].shape\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#lb 0.96335\npreds8=np.load('../input/tpu-enet-b7-incepention-b6-new/probs.npz')\npreds8['a'].shape\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"preds=0.7*preds+0.3*(0.3*preds6['a']+0.4*preds7['a']+0.3*preds8['a'])\npreds.shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"# help(np.argmax)\npreds=np.argmax(preds, axis=1)\npreds.shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"submission = pd.read_csv('/kaggle/input/flower-blending-v1/submission.csv')\n\nsubmission.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"submission1=submission.copy()\nsubmission1['label']=preds\nsubmission1.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"submission1.to_csv('submission.csv', index=False)\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"submission1['y']=submission['label']\nsubmission1.corr()","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}