{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd \nimport os\nprint(os.listdir(\"../input\"))\nprint(os.listdir(\"../input/final-subs\"))\nprint(os.listdir(\"../input/lgbm-tunning-bayes-search\"))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"xgb = pd.read_csv(\"../input/final-subs/xgb_final.csv\")\nprint(xgb.shape)\nlgb = pd.read_csv(\"../input/lgbm-tunning-bayes-search/clean_submission.csv\")\nprint(lgb.shape)\ncat = pd.read_csv(\"../input/final-subs/cat_boost.csv\")\nprint(cat.shape)\n\nxgb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"lgb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cat.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"comb = cat\ncomb.rename(columns={'time_to_failure':'cat'},inplace=True)\ncomb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"comb['lgb'] = lgb.time_to_failure\ncomb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"comb['xgb'] = xgb.time_to_failure\ncomb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"comb['time_to_failure'] = comb.mean(numeric_only=True, axis=1)\ncomb.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sub = comb.loc[:,['seg_id','time_to_failure']]\nsub.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(sub.shape)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sub.to_csv('submission.csv',index=False)","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.4","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}