{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import pandas as pd\n\nfold5_1 = pd.read_csv('../input/ranzcr-prob/prob1.csv')\nfold5_2 = pd.read_csv('../input/ranzcr-prob/prob2.csv')\nfold5_3 = pd.read_csv('../input/ranzcr-prob/prob3.csv')\nfold5_4 = pd.read_csv('../input/ranzcr-prob/prob4.csv')\nfold5_5 = pd.read_csv('../input/ranzcr-prob/prob5.csv')\ncolumns = fold5_1.columns","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"P = [0.4, 0.4, 0, 0.1, 0.1]\nfor i in columns[1:]:\n    fold5_1[i] = fold5_1[i] * P[0]  + fold5_2[i] * P[1] + fold5_3[i] * P[2] + \\\n                 fold5_4[i] * P[3] + fold5_5[i] * P[4]","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"fold5_1.to_csv('sub.csv', index=False)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"pd.read_csv('../input/ranzcr-clip-catheter-line-classification/sample_submission.csv',usecols=[0],index_col=0).join(pd.read_csv('./sub.csv').set_index('StudyInstanceUID')).fillna(0).to_csv('submission.csv')","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}