{"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":"import os\nimport warnings\nimport pandas as pd\nimport numpy as np\nimport plotly.figure_factory as ff\nimport plotly.express as px\nwarnings.filterwarnings(\"ignore\") \n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2021-08-14T19:50:52.656723Z","iopub.execute_input":"2021-08-14T19:50:52.657158Z","iopub.status.idle":"2021-08-14T19:50:56.348796Z","shell.execute_reply.started":"2021-08-14T19:50:52.657069Z","shell.execute_reply":"2021-08-14T19:50:56.347718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Group data together\nSolutions for blend\n* 0.864 - [🕳️G2Net🕳️ - EDA and Modeling](https://www.kaggle.com/ihelon/g2net-eda-and-modeling)\n* 0.860 - [G2Net / efficientnet_b7 / baseline [inference]](https://www.kaggle.com/yasufuminakama/g2net-efficientnet-b7-baseline-inference)\n* 0.855 - [TF G2Net EDA and Starter](https://www.kaggle.com/mrigendraagrawal/tf-g2net-eda-and-starter)\n* 0.834 - [G2Net EfficientNetB1[TPU Evaluate]](https://www.kaggle.com/miklgr500/g2net-efficientnetb1-tpu-evaluate)\n* 0.855 - [G2Net: Fast and Almost Accurate Detector](https://www.kaggle.com/kneroma/g2net-fast-and-almost-accurate-detector)\n* 0.866 - [CQT G2Net EfficientNetB1[TPU Inference] ](https://www.kaggle.com/miklgr500/cqt-g2net-efficientnetb1-tpu-inference)\n* 0.869 - [G2Net: TF On-the-fly CQT TPU Training](https://www.kaggle.com/hidehisaarai1213/g2net-tf-on-the-fly-cqt-tpu-training)","metadata":{}},{"cell_type":"code","source":"sub1 = pd.read_csv('../input/g2net-eda-and-modeling/model_submission.csv').sort_values('id') \nsub2 = pd.read_csv('../input/k/yasufuminakama/g2net-efficientnet-b0-baseline-inference/submission.csv').sort_values('id') \nsub3 = pd.read_csv('../input/tf-g2net-eda-and-starter/submission.csv').sort_values('id') \nsub4 = pd.read_csv('../input/g2net-efficientnetb1-tpu-evaluate/submission.csv').sort_values('id') \nsub5 = pd.read_csv('../input/g2net-fast-and-almost-accurate-detector/submission.csv').sort_values('id') \nsub6 = pd.read_csv('../input/cqt-g2net-efficientnetb1-tpu-inference/submission.csv').sort_values('id') \nsub7 = pd.read_csv('../input/g2net-tf-on-the-fly-cqt-tpu-inference/submission.csv').sort_values('id') ","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2021-08-14T19:50:56.350568Z","iopub.execute_input":"2021-08-14T19:50:56.351018Z","iopub.status.idle":"2021-08-14T19:51:00.307202Z","shell.execute_reply.started":"2021-08-14T19:50:56.350986Z","shell.execute_reply":"2021-08-14T19:51:00.306141Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Group data together\nhist_data = [sub1.target, sub2.target, sub3.target, sub4.target, sub5.target, sub6.target, sub7.target]\n\ngroup_labels = ['Yaroslav Isaienkov - 0.864', 'Y.Nakama - 0.860', 'Mrigendra Agrawal - 0.855', 'Welf Crozzo - 0.834',\n                'kkiller - 0.855', 'Welf Crozzo CQT - 0.866', 'Hidehisa Arai - 0.869']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(hist_data, group_labels, bin_size=.2, show_hist=False, show_rug=False)\nfig.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2021-08-14T19:51:49.656017Z","iopub.execute_input":"2021-08-14T19:51:49.656391Z","iopub.status.idle":"2021-08-14T19:52:07.925687Z","shell.execute_reply.started":"2021-08-14T19:51:49.656359Z","shell.execute_reply":"2021-08-14T19:52:07.924955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data=np.corrcoef([sub1.target, sub2.target, sub3.target, sub4.target, sub5.target, sub6.target, sub7.target])\nfig = px.imshow(data,\n                x=group_labels,\n                y=group_labels\n               )\nfig.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2021-08-14T19:52:07.926816Z","iopub.execute_input":"2021-08-14T19:52:07.927196Z","iopub.status.idle":"2021-08-14T19:52:08.851157Z","shell.execute_reply.started":"2021-08-14T19:52:07.927167Z","shell.execute_reply":"2021-08-14T19:52:08.850333Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub = sub1.copy()\nsub.target = np.quantile([sub1.target.values, \n          #sub2.target.values, \n          #sub3.target.values, \n          #sub4.target, \n          #sub5.target, \n          sub6.target.values,\n          sub7.target.values],\n         0.8, axis=0)# / (0 + 0 + 0 + 0 + 0 + 14 + 14)\nsub.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-14T20:11:53.810698Z","iopub.execute_input":"2021-08-14T20:11:53.811072Z","iopub.status.idle":"2021-08-14T20:11:54.712061Z","shell.execute_reply.started":"2021-08-14T20:11:53.811038Z","shell.execute_reply":"2021-08-14T20:11:54.710991Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Group data together\nhist_data = [sub1.target, sub2.target, sub3.target, sub4.target, sub5.target, sub6.target, sub7.target, sub.target]\n\ngroup_labels = ['Yaroslav Isaienkov - 0.864', 'Y.Nakama - 0.860', 'Mrigendra Agrawal - 0.855', 'Welf Crozzo - 0.834',\n                'kkiller - 0.855', 'Welf Crozzo CQT - 0.866', 'Hidehisa Arai - 0.869', 'Blended']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(hist_data, group_labels, bin_size=.2, show_hist=False, show_rug=False)\nfig.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2021-08-14T20:11:56.083983Z","iopub.execute_input":"2021-08-14T20:11:56.084489Z","iopub.status.idle":"2021-08-14T20:12:16.799817Z","shell.execute_reply.started":"2021-08-14T20:11:56.084454Z","shell.execute_reply":"2021-08-14T20:12:16.798704Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}