{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":59093,"databundleVersionId":7469972,"sourceType":"competition"}],"dockerImageVersionId":30635,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-01-22T00:46:44.894409Z","iopub.execute_input":"2024-01-22T00:46:44.895120Z","iopub.status.idle":"2024-01-22T00:46:45.367973Z","shell.execute_reply.started":"2024-01-22T00:46:44.895083Z","shell.execute_reply":"2024-01-22T00:46:45.366668Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### **①** is not totalvalue 1","metadata":{}},{"cell_type":"code","source":"pred_list = [[0.1, 0.2, 0.3, 0.4, 0.5, 0.6],[0.2, 0.3, 0.4, 0.5, 0.6, 0.7]]\npred_df = pd.DataFrame(pred_list, columns=['seizure_vote','lpd_vote','gpd_vote','lrda_vote','grda_vote','other_vote'])\ndisplay(pred_df)\npred_df.sum(axis = 1)","metadata":{"execution":{"iopub.status.busy":"2024-01-22T00:47:10.513803Z","iopub.execute_input":"2024-01-22T00:47:10.514285Z","iopub.status.idle":"2024-01-22T00:47:10.537995Z","shell.execute_reply.started":"2024-01-22T00:47:10.514245Z","shell.execute_reply":"2024-01-22T00:47:10.536441Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### **②** normalize 1","metadata":{}},{"cell_type":"code","source":"normalize_df = pred_df.apply(lambda x: x/x.sum(), axis=1)\ndisplay(normalize_df)\nnormalize_df.sum(axis = 1)","metadata":{"execution":{"iopub.status.busy":"2024-01-22T00:47:15.595964Z","iopub.execute_input":"2024-01-22T00:47:15.596385Z","iopub.status.idle":"2024-01-22T00:47:15.621168Z","shell.execute_reply.started":"2024-01-22T00:47:15.596351Z","shell.execute_reply":"2024-01-22T00:47:15.620088Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}