{"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 pickle\n# import pandas as pd\nimport os\n\n\noutput_path = \"tranposed_summission.csv\"\n\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-10-12T18:48:19.976924Z","iopub.execute_input":"2022-10-12T18:48:19.977438Z","iopub.status.idle":"2022-10-12T18:48:20.005781Z","shell.execute_reply.started":"2022-10-12T18:48:19.977349Z","shell.execute_reply":"2022-10-12T18:48:20.004440Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\n\n# np.vstack([output, output]).T.shape","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:20.008018Z","iopub.execute_input":"2022-10-12T18:48:20.008435Z","iopub.status.idle":"2022-10-12T18:48:20.016476Z","shell.execute_reply.started":"2022-10-12T18:48:20.008398Z","shell.execute_reply":"2022-10-12T18:48:20.015329Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# with open(\"../input/lgbm-hardcore-ensemble/0-1000\", \"rb\") as f:\n#     test = pickle.load(f)","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:20.017731Z","iopub.execute_input":"2022-10-12T18:48:20.018386Z","iopub.status.idle":"2022-10-12T18:48:20.026891Z","shell.execute_reply.started":"2022-10-12T18:48:20.018350Z","shell.execute_reply":"2022-10-12T18:48:20.025757Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ROWS = 55935\nCOLS = 23418\noutputs = np.zeros((ROWS, COLS))","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:20.029856Z","iopub.execute_input":"2022-10-12T18:48:20.030436Z","iopub.status.idle":"2022-10-12T18:48:20.037526Z","shell.execute_reply.started":"2022-10-12T18:48:20.030396Z","shell.execute_reply":"2022-10-12T18:48:20.036568Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# from tqdm import tqdm\n\nimport gc\n\noutputs = []\nfor start, end in zip(range(0, 24000, 1000), range(1000, 25000, 1000)):\n    if start >= 12000:\n\n        if end > 23418:\n            end = 23418\n\n        path = f\"../input/lgbm-hardcore-ensemble/{start}-{end}\"\n\n        print(path)\n\n        with open(path, \"rb\") as f:\n            o = pickle.load(f)\n        outputs.append(o)\n\n        gc.collect()\n\n","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:20.039202Z","iopub.execute_input":"2022-10-12T18:48:20.039944Z","iopub.status.idle":"2022-10-12T18:48:55.874076Z","shell.execute_reply.started":"2022-10-12T18:48:20.039899Z","shell.execute_reply":"2022-10-12T18:48:55.872711Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"outputs = np.hstack(outputs)","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:55.875918Z","iopub.execute_input":"2022-10-12T18:48:55.876968Z","iopub.status.idle":"2022-10-12T18:48:58.608313Z","shell.execute_reply.started":"2022-10-12T18:48:55.876923Z","shell.execute_reply":"2022-10-12T18:48:58.607226Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\n\n\npd.DataFrame(outputs).to_csv(\"higher_12000.csv\", index=False, header=False)","metadata":{"execution":{"iopub.status.busy":"2022-10-12T18:48:58.609699Z","iopub.execute_input":"2022-10-12T18:48:58.610038Z","iopub.status.idle":"2022-10-12T19:24:03.644439Z","shell.execute_reply.started":"2022-10-12T18:48:58.610010Z","shell.execute_reply":"2022-10-12T19:24:03.641520Z"},"trusted":true},"execution_count":null,"outputs":[]}]}