{"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":59094,"databundleVersionId":7010844,"sourceType":"competition"},{"sourceId":6960988,"sourceType":"datasetVersion","datasetId":3998769},{"sourceId":7068220,"sourceType":"datasetVersion","datasetId":3955392},{"sourceId":7060098,"sourceType":"datasetVersion","datasetId":4064397}],"dockerImageVersionId":30626,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#### Approach\n\nIn early testing I used a combination of blends and ridge models. When testing the ML models in the early stages a selection of certain cell types such as B cells, T regulatory cells and NK cells did help improve the model and including CD8 T cells gave a worse score on the public leaderboard. During testing I used the features \"cell_type\" and \"sm_name\" and used certain a 'cell_type' with a selection of compounds. The following notebook was very useful: https://www.kaggle.com/code/mehrankazeminia/3-op2-feature-augment-fragments-of-smiles\n\nMy final submission are adpatations of ensemble blends that worked well from the following notebooks including; \n\n1. PyBoost (Thank you to the following notebook: https://www.kaggle.com/competitions/open-problems-single-cell-perturbations/discussion/460858) as it is good for multi target models. \n\n2. https://www.kaggle.com/code/zacharyscheben/scp-blend-0-58 which helped include 'cell_type','sm_name','sm_lincs_id','SMILES' into model aswell as RMSE, autoencoder and Neural Networks.\n\nI'm still quite new to ML so it was helpful to include some models that were shared in the competition (other notebooks aknowledged below aswell), I tried a different combination of weights and choose the best score when I tested these models. It was interesting to see that the ensemble ML models in my submission was overfitted as I was dowm 105 points on the leaderboard from the public to the private score! In hindsight I may have ensembled too many models for a better public predicition score and it may have been better to be more selective in future approaches.\n\n#### Aknowledgements to the following notebooks which helped with my submisssion:\n\nhttps://www.kaggle.com/competitions/open-problems-single-cell-perturbations/discussion/457081 <br>\nhttps://www.kaggle.com/code/mehrankazeminia/3-op2-feature-augment-fragments-of-smiles <br>\nhttps://www.kaggle.com/code/zacharyscheben/scp-blend-0-58 <br>\nhttps://www.kaggle.com/code/altynbulmers/scp-blend-0-580 <br>\nhttps://www.kaggle.com/code/hhache/scp-blends-streamlined","metadata":{}},{"cell_type":"code","source":"import os\nimport pandas as pd \nimport numpy as np\n\ndf577 = pd.read_csv('/kaggle/input/open-problems-2-blends/LB0577_ZacharyScheben_blend_SCPblend058_nbV19.csv', index_col='id') \ndf574 = pd.read_csv('/kaggle/input/testsubmissiondataset/submission.csv', index_col='id') \n","metadata":{"execution":{"iopub.status.busy":"2023-12-22T17:03:26.794187Z","iopub.execute_input":"2023-12-22T17:03:26.794579Z","iopub.status.idle":"2023-12-22T17:03:34.345252Z","shell.execute_reply.started":"2023-12-22T17:03:26.794546Z","shell.execute_reply":"2023-12-22T17:03:34.344220Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sm_name_lb = ['FK 866',\n 'AZ628',\n 'CEP-37440',\n 'Sunitinib',\n 'Tivantinib',\n 'I-BET151',\n 'GO-6976',\n 'PF-04691502',\n 'Masitinib',\n 'BAY 87-2243',\n 'Colchicine',\n 'Ganetespib (STA-9090)',\n 'Ricolinostat',\n 'Oxybenzone',\n 'Selumetinib',\n 'AMD-070 (hydrochloride)',\n 'BMS-265246',\n 'Topotecan',\n '5-(9-Isopropyl-8-methyl-2-morpholino-9H-purin-6-yl)pyrimidin-2-amine',\n 'Pomalidomide',\n 'Dovitinib',\n 'PRT-062607',\n 'TGX 221',\n 'Isoniazid',\n 'PD-0325901',\n 'Riociguat',\n 'Azacitidine',\n 'Midostaurin',\n 'GW843682X',\n 'Tamatinib',\n 'Proscillaridin A;Proscillaridin-A',\n 'RG7090',\n 'IN1451',\n 'Raloxifene',\n 'Pitavastatin Calcium',\n  'TR-14035',\n 'BX 912',\n 'STK219801',\n 'Methotrexate',\n 'AT 7867',\n 'Scriptaid',\n 'UNII-BXU45ZH6LI',\n 'BI-D1870',\n 'Quizartinib',\n 'Tivozanib',\n 'ABT737',\n 'MK-5108',\n 'GLPG0634',\n 'TL_HRAS26',\n 'Navitoclax']                         ","metadata":{"execution":{"iopub.status.busy":"2023-12-22T17:04:56.836721Z","iopub.execute_input":"2023-12-22T17:04:56.837127Z","iopub.status.idle":"2023-12-22T17:04:56.843876Z","shell.execute_reply.started":"2023-12-22T17:04:56.837094Z","shell.execute_reply":"2023-12-22T17:04:56.842693Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fn = '/kaggle/input/open-problems-single-cell-perturbations/id_map.csv'\ndf_id_map = pd.read_csv(fn,index_col = 0)\nprint(df_id_map.shape)","metadata":{"execution":{"iopub.status.busy":"2023-12-22T17:05:00.678335Z","iopub.execute_input":"2023-12-22T17:05:00.678739Z","iopub.status.idle":"2023-12-22T17:05:00.689512Z","shell.execute_reply.started":"2023-12-22T17:05:00.678706Z","shell.execute_reply":"2023-12-22T17:05:00.688456Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_id_map['LB'] = 0\ndf_id_map[df_id_map['sm_name'].isin(sm_name_lb)  ] = 1","metadata":{"execution":{"iopub.status.busy":"2023-12-22T17:05:03.324025Z","iopub.execute_input":"2023-12-22T17:05:03.324369Z","iopub.status.idle":"2023-12-22T17:05:03.331871Z","shell.execute_reply.started":"2023-12-22T17:05:03.324341Z","shell.execute_reply":"2023-12-22T17:05:03.331101Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"RMSA SQRT","metadata":{}},{"cell_type":"code","source":"prediction = df577#+0.01\nactual = df574\nsumm=0\ncol_cnt= len(prediction.iloc[0])\ndf_id_map['RMSE']= 0\ndf_id_map['RMSE*100']= 0\n\nprint (col_cnt)\nfor i in range(len(df577)):\n    sqr= np.sqrt( ((prediction.iloc[i]  -  actual.iloc[i] ) ** 2).sum(axis = 0 )/col_cnt )\n    print(df_id_map.iloc[i]['LB'], ' ', i,sqr,sqr.astype(int))\n    df_id_map.at[i,'RMSE'] = sqr\n    df_id_map.at[i,'RMSE*100'] = sqr*100\n    summ = summ+sqr\nprint(summ )\nprint(summ/len(df577) )","metadata":{"execution":{"iopub.status.busy":"2023-12-22T17:05:10.662364Z","iopub.execute_input":"2023-12-22T17:05:10.662725Z","iopub.status.idle":"2023-12-22T17:05:11.242252Z","shell.execute_reply.started":"2023-12-22T17:05:10.662696Z","shell.execute_reply":"2023-12-22T17:05:11.241208Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"df = pd.read_csv('/kaggle/working/pred.csv', index_col='id')","metadata":{}},{"cell_type":"markdown","source":"#### For Ensembling methods I would experiment by changing the weights as follows:","metadata":{}},{"cell_type":"code","source":"df = 0.7*df574 + 0.3*df577\ndf[:128] = 0.85 * df574[   :128]\\\n         + 0.15 * df577[   :128]\ndf[128: ] = 0.73 * df574[128:]\\\n          + 0.27 * df577[128:]","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.to_csv('pred.csv')","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/working/pred.csv', index_col='id')","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#### Logistic Regresssion\nlogistic regression expression where each cofficient is the result of the minimizing the loss and maximizing the predictive power of the prediction model. \n\nThank you for the following dataset https://www.kaggle.com/datasets/liudacheldieva/op2-eda-lb-dataset. \n\nFor one of my better predicitions that I submitted, I used the following code:","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/op2-eda-lb-dataset/submission_pred_third.csv', index_col='id')\ndf[0   : 0 +1] =   0.36213948733388067  + df[0   : 0 +1] - 0.22213948733388067      # 0.39213948733388067 0.29213948733388067 0.22213948733388067  0.6605283510014389\ndf[2   : 2 +1] =   4.52726867303685704  + df[2   : 2 +1] - 0.33726867303685704      # down 4.59726867303685704 4.09726867303685704 up 4.99726867303685704 6.99726867303685704 2.99726867303685704 2.49726867303685704 1.89726867303685704 1.29726867303685704 0.96726867303685704 0.66726867303685704 0.56726867303685704 0.51726867303685704 0.41726867303685704 0.33726867303685704  0.5221531342334503\ndf[3   : 3 +1] =   0.2618257668013562   + df[3   : 3 +1] - 0.09418257668013562      # 0.2718257668013562 0.09418257668013562  0.14386434013906943\ndf[4   : 4 +1] =   0.13020367582015482  + df[4   : 4 +1] - 0.13020367582015482      # old 0.13020367582015482\n\ndf[7   : 7 +1] =   0.11723875081367628  + df[7   : 7 +1] - 0.16723875081367628      #  0.11723875081367628 0.16723875081367628\ndf[14  :14 +1] =   0.08252905100447995  + df[14  :14 +1] - 0.08252905100447995    #5- 0.08252905100447995\ndf[16  :16 +1] =   0.0837147850368046   + df[16  :16 +1] - 0.0837147850368046     #5-- 0.0837147850368046    0.2799608353316663\ndf[17  :17 +1] =   0.1251529287205031   + df[17  :17 +1] - 0.1351529287205031     #5--- 0.1351529287205031    0.2620567885382467\ndf[18  :18 +1] =   -0.297118068357961244 + df[18  :18 +1] - 0.017118068357961244   #05----strong -031bed -0.317118068357961244 -0.017118068357961244 min 0.017118068357961244  0.3136285088644549\ndf[22  :22 +1] =   0.29680998610523934  + df[22  :22 +1] - 0.29680998610523934    #1-  0.29680998610523934   0.4457487783484533\ndf[26  :26 +1] =   0.03611845814985363  + df[26  :26 +1] - 0.03611845814985363    #1--- 0.03611845814985363   0.12664416538350154\n\ndf[36  :36 +1] =   0.7436020038922901   + df[36  :36 +1] - 0.5436020038922901        # 0.5436020038922901    0.5281536314905186 \n\n\ndf[43  :43 +1] =   0.037070524676656585 + df[43  :43 +1] - 0.037070524676656585   #1- 0.037070524676656585  0.22997265114133378\ndf[45  :45 +1] =   0.21902912433850864  + df[45  :45 +1] - 0.10902912433850864    #5- 1+ 0.20902912433850864 0.10902912433850864    0.23912356106253685\n# 0.17540392693017479   0.3152267265256008\ndf[48  :48 +1] =   0.1476105562033179   + df[48  :48 +1] - 0.1476105562033179     # 0.1476105562033179    0.23252018841017447\ndf[51  :51 +1] =   0.08647498539941902  + df[51  :51 +1] - 0.08647498539941902    # 0.08647498539941902   0.19215659541298016\ndf[52  :52 +1] =   0.2660282110147496   + df[52  :52 +1] - 1.0660282110147496        #e-01.. 0.2660282110147496 0.6660282110147496 1.0660282110147496     2.0289040397071822\ndf[55  :55 +1] =   0.4126541904087474   + df[55  :55 +1] - 0.4126541904087474        # 0.4126541904087474  0.4126541904087474 0.9878844676094365\ndf[58  :58 +1] =   7.199996265283832    + df[58  :58 +1] - 7.199996265283832         # 7.199996265283832  7.199996265283832 8.492990293994495\ndf[60  :60 +1] =   0.07112750664045349  + df[60  :60 +1] - 0.07112750664045349    # 0.07112750664045349  0.07112750664045349 0.12044197811824477\ndf[68  :68 +1] =  -0.006886963570227396 + df[68  :68 +1] - -0.006786963570227396     #e ...-0.006786963570227396 -0.006786963570227396 0.10645249191486438\ndf[69  :69 +1] =  -0.0035365102850524227+ df[69  :69 +1] - -0.0035365102850524227 # -0.0035365102850524227  0.11360544372367823\ndf[70  :70 +1] =  -0.07962089062224188  + df[70  :70 +1] - -0.07962089062224188   # -0.07962089062224188  0.17195013698583952\ndf[71  :71 +1] =   0.23403040793990001  + df[71  :71 +1] - 0.23403040793990001    # 0.23403040793990001 0.4417582196228151\ndf[74  :74 +1] =   0.0280678922345458   + df[74  :74 +1] - 0.0180678922345458     # 0.0180678922345458 0.1069810175094605\ndf[78  :78 +1] =  -0.004571761803302726 +df[78  :78 +1]  -  -0.003571761803302726 #   -0.003571761803302726  -0.003571761803302726 0.10206067942408151\ndf[79  :79 +1] =   0.0560839045441533   + df[79  :79 +1] -  0.1260839045441533    #   0.1260839045441533  0.1260839045441533 0.32703266608953824\ndf[81  :81 +1] =   0.26159179583819164  + df[81  :81 +1] -  0.26159179583819164      #   0.26159179583819164  0.26159179583819164 0.6600016602971092\ndf[82  :82 +1] =   0.17927202785299345  + df[82  :82 +1] -  0.17927202785299345      #   0.17927202785299345  0.17927202785299345 0.6600038815242055\ndf[85  :85 +1] =   0.1098083174313835   + df[85  :85 +1] -  0.2098083174313835    #   0.2098083174313835 0.2098083174313835 0.36112123388862033\ndf[86  :86 +1] =   0.000749541820475984 + df[86  :86 +1] -  0.010749541820475984  #   0.010749541820475984 0.010749541820475984 0.16778111685638078\ndf[88  :88 +1] =   0.476146929573681    + df[88  :88 +1] -  0.676146929573681        #-01+...   0.676146929573681 0.676146929573681 1.2161320032838714\ndf[90  :90 +1] =   -0.11099762708971858  + df[90  :90 +1] -  0.14099762708971858     #e- -06  -04+ -0.07099762708971858  -0.00099762708971858 04099762708971858 10099762708971858 0.14099762708971858 0.14099762708971858 0.2762352723290275\ndf[91  :91 +1] =   0.03012649438797055  + df[91  :91 +1] -  0.13112649438797055      #e-08 -02+ -001+ 03012649438797055 0.11012649438797055  0.13112649438797055 0.13112649438797055 0.19515745415889235\ndf[95  :95 +1] =   0.24755862785363397  + df[95  :95 +1] -  0.24755862785363397   #+1-   0.24755862785363397 0.24755862785363397 0.3204166639439024\ndf[97  :97 +1] =   0.08047334932548725  + df[97  :97 +1] -  0.08047334932548725   #+1--   0.08047334932548725 0.08047334932548725 0.15822243458934104\ndf[98  :98 +1] =   -0.012187859776825693+ df[98  :98 +1] -  -0.012187859776825693 #-1---  1--   -0.012187859776825693 -0.012187859776825693 0.10632096001119536\ndf[103  :103 +1] =  0.028958762713079168+ df[103  :103 +1] -  0.028958762713079168#-1----, 1---   0.028958762713079168  0.028958762713079168 0.0953477001461466\ndf[105  :105 +1] =  0.37517648135806164 + df[105  :105 +1] -  0.37517648135806164    #   0.37517648135806164  0.37517648135806164 1.0991931699113378\ndf[106  :106 +1] =  0.1369792360585789  + df[106  :106 +1] -  0.2169792360585789  #1+   0.2169792360585789  0.2169792360585789 0.4347456379311954\ndf[108  :108 +1] =  0.09280103854556405 + df[108  :108 +1] -  0.09280103854556405 #1-   0.09280103854556405  0.09280103854556405 0.22075085524490629\ndf[109  :109 +1] =  0.12976636720657075 + df[109  :109 +1] -  0.12976636720657075 #+04...   0.12976636720657075  0.12976636720657075 0.3139120848317401\ndf[111  :111 +1] =  0.025822426084850966+ df[111  :111 +1] -  0.025822426084850966# +04...  0.025822426084850966  0.025822426084850966 0.1166328722307441\ndf[113  :113 +1] =  0.1307035174106585  + df[113  :113 +1] -  0.1307035174106585  #+04 ... -05---   0.1307035174106585   0.1307035174106585 0.2970698629538433\ndf[115  :115 +1] =  0.14506452044894116 + df[115  :115 +1] -  0.14506452044894116    #   0.14506452044894116  0.14506452044894116 0.6302640109914814\ndf[117  :117 +1] =  0.05003198752587669 + df[117  :117 +1] -  0.05003198752587669 #-05--   0.05003198752587669  0.05003198752587669 0.1399270669686351\ndf[118  :118 +1] =  0.076078264068246856+ df[118  :118 +1] -  0.026078264068246856#+05 -06---- ?   0.026078264068246856  0.026078264068246856 0.13291073024247604\ndf[119  :119 +1] =  -0.012518668105113774+ df[119  :119 +1] -  -0.012518668105113774#-05+. ..   -0.012518668105113774   -0.012518668105113774 0.12788156085559843\ndf[122  :122 +1] =  1.2170585543884642  + df[122  :122 +1] -  1.2170585543884642      #   1.2170585543884642  1.2170585543884642 1.7994461425363537e-06\ndf[128  :128 +1] =  2.449344593604451   + df[128  :128 +1] -  2.449344593604451       #?   2.449344593604451  2.449344593604451 1.4318912976364806\ndf[130  :130 +1] =  0.15480237916888023 + df[130  :130 +1] -  0.15480237916888023     #   0.15480237916888023  0.15480237916888023 0.6142021152260291\ndf[131  :131 +1] =  0.060475924918985305+ df[131  :131 +1] -  0.060475924918985305#-05-    0.060475924918985305  0.060475924918985305 0.18677485844599426\ndf[132  :132 +1] =  0.08535515580920174 + df[132  :132 +1] -  0.08535515580920174     #  0.08535515580920174  0.08535515580920174 0.536909587310016\ndf[135  :135 +1] =  0.3200240966100563  + df[135  :135 +1] -  0.3700240966100563  #-05+   0.3700240966100563  0.3700240966100563 0.8463214639283433\ndf[142  :142 +1] =  0.04391781993034358 + df[142  :142 +1] -  0.09391781993034358 #-05+   0.09391781993034358  0.09391781993034358 0.29995864558635577\ndf[144  :144 +1] =  0.2015272040351239  + df[144  :144 +1] -  0.2015272040351239  #-05-   0.2015272040351239  0.2015272040351239 0.43444231157897456\ndf[145  :145 +1] =  0.12632619587458975 + df[145  :145 +1] -  0.17632619587458975 #-05+ - ok? 0.17632619587458975  0.17632619587458975 0.4042951003070734\ndf[146  :146 +1] =  0.01517010098767026 + df[146  :146 +1] -  0.06517010098767026 #-05---   0.06517010098767026  0.06517010098767026 0.34571066605246586\ndf[149  :149 +1] =  0.5201320110588635  + df[149  :149 +1] -  0.5201320110588635      #   0.5201320110588635  0.5201320110588635 1.0129926490016545\ndf[154  :154 +1] =  0.01104661139579785 + df[154  :154 +1] -  0.06104661139579785 #-05 --  0.06104661139579785  0.06104661139579785 0.18549327200011365\ndf[163  :163 +1] =  0.4232501904608271  + df[163  :163 +1] -  0.4232501904608271  #-05 ----  0.4232501904608271  0.4232501904608271 0.6862472810025912\ndf[170  :170 +1] =  0.07923971821291118 + df[170  :170 +1] -  0.07923971821291118 #-05 -----  0.07923971821291118  0.07923971821291118 0.2680786214150016\ndf[172  :172 +1] =  0.17504188199545492 + df[172  :172 +1] -  0.17504188199545492 #3--   0.17504188199545492  0.17504188199545492 0.4119299998337265\ndf[174  :174 +1] =  0.450870160150057   + df[174  :174 +1] -  0.450870160150057   #3---   0.450870160150057  0.450870160150057 0.8083238799500648\ndf[175  :175 +1] =  0.2338148285296618  + df[175  :175 +1] -  0.2338148285296618  #3-   0.2338148285296618  0.2338148285296618 0.43893266414756704\ndf[178  :178 +1] =  0.14389821481361403 + df[178  :178 +1] -  0.14389821481361403 #3----   0.14389821481361403  0.14389821481361403 0.35306246832874455\ndf[179  :179 +1] =  2.3142648679547837  + df[179  :179 +1] -  2.3142648679547837      #   2.3142648679547837  2.3142648679547837 2.173648680072905\ndf[182  :182 +1] =  0.573647530043794   + df[182  :182 +1] -  0.573647530043794       #   0.573647530043794  0.573647530043794 1.462655858637076\ndf[185  :185 +1] =  0.7590599719991385  + df[185  :185 +1] -  0.7590599719991385      #   0.7590599719991385  0.7590599719991385 2.8176372041131845\ndf[187  :187 +1] =  0.05931911309937085 + df[187  :187 +1] -  0.05931911309937085 #1---   0.05931911309937085  0.05931911309937085 0.17821827471914303\ndf[195  :195 +1] =  -0.020003290776414162+ df[195  :195 +1] -  -0.020003290776414162#1--   -0.020003290776414162  -0.020003290776414162 0.1341709005448927\ndf[196  :196 +1] =  0.005092583322837178+ df[196  :196 +1] -  0.005092583322837178 #1-   0.005092583322837178  0.005092583322837178 0.14511741334499198\ndf[197  :197 +1] =  -0.07716758317954835+ df[197  :197 +1] -  -0.07716758317954835 #1---   -0.07716758317954835  -0.07716758317954835 0.187782764752969\ndf[198  :198 +1] =  0.39414338274866106 + df[198  :198 +1] -  0.39414338274866106      #   0.39414338274866106  0.39414338274866106 0.7310100949880322\ndf[201  :201 +1] =  0.01252104576411241 + df[201  :201 +1] -  0.01252104576411241  #1--   0.01252104576411241  0.01252104576411241 0.14872746432901457\ndf[205  :205 +1] =  0.012908478812453038+ df[205  :205 +1] -  0.012908478812453038 #1---   0.012908478812453038   0.012908478812453038 0.14768170653372484\ndf[206  :206 +1] =  0.37531796110557725 + df[206  :206 +1] -  0.37531796110557725      #   0.37531796110557725  0.37531796110557725 0.6304677155556506\ndf[208  :208 +1] =  1.786022309075873   + df[208  :208 +1] -  1.786022309075873        #   1.786022309075873  1.786022309075873 1.374043895474802\ndf[209  :209 +1] =  0.8343555559653307  + df[209  :209 +1] -  0.8343555559653307       #   0.8343555559653307  0.8343555559653307 1.3636310710509763\ndf[212  :212 +1] =  1.0249364942376658  + df[212  :212 +1] -  1.0249364942376658       #   1.0249364942376658  1.0249364942376658 0.7298170181860324\ndf[213  :213 +1] =  0.01710478164786451 + df[213  :213 +1] -  0.01710478164786451  #1-   0.01710478164786451  0.01710478164786451 0.17355515738440602\ndf[215  :215 +1] =  0.9677042457069044  + df[215  :215 +1] -  0.9677042457069044       #   0.9677042457069044  0.9677042457069044 2.349601080094341\ndf[217  :217 +1] =  0.214278776957712   + df[217  :217 +1] -  0.214278776957712        #   0.214278776957712   0.214278776957712 0.6081687897716357\ndf[218  :218 +1] =  0.13316450955116665 + df[218  :218 +1] -  0.13316450955116665  #1---   0.13316450955116665  0.13316450955116665 0.37763235449509663\ndf[222  :222 +1] =  0.3004695537577972  + df[222  :222 +1] -  0.3004695537577972       #   0.3004695537577972  0.3004695537577972 0.7422955154934671\ndf[224  :224 +1] =  0.08566045857512372 + df[224  :224 +1] -  0.08566045857512372  #1--   0.08566045857512372  0.08566045857512372 0.19848143091937376\ndf[225  :225 +1] =  0.10974563167961874 + df[225  :225 +1] -  0.00974563167961874  #5---- +1 0.10974563167961874  0.00974563167961874  0.00974563167961874 0.14382905785276137\ndf[230  :230 +1] =  0.05228704000459084 + df[230  :230 +1] -  0.05228704000459084  #-1   0.05228704000459084  0.05228704000459084 0.1642971623022285\ndf[232  :232 +1] =  0.8073146335028377  + df[232  :232 +1] -  0.8073146335028377       #   0.8073146335028377  0.8073146335028377 1.5319503419624265\ndf[233  :233 +1] =  0.6965739221772329  + df[233  :233 +1] -  0.6965739221772329       #   0.6965739221772329  0.6965739221772329 0.8882551999304463\ndf[235  :235 +1] =  0.16890207999866205 + df[235  :235 +1] -  0.16890207999866205  #--1   0.16890207999866205  0.16890207999866205 0.40554845922966287\ndf[236  :236 +1] =  0.2042066666850411  + df[236  :236 +1] -  0.2142066666850411   #---1   0.2142066666850411  0.2142066666850411 0.4634109266231379\ndf[238  :238 +1] =  0.14045158726195313 + df[238  :238 +1] -  0.04045158726195313  #5--- ++1 0.14045158726195313  0.04045158726195313  0.04045158726195313 0.15263803297199183\ndf[240  :240 +1] =  0.31112826333018834 + df[240  :240 +1] -  0.31112826333018834      #?   0.31112826333018834  0.31112826333018834 0.6621416297863888\ndf[242  :242 +1] =  1.0465758149395004  + df[242  :242 +1] -  1.0465758149395004       #   1.0465758149395004  1.0465758149395004 1.3019655420114344\ndf[244  :244 +1] =  0.16390041177437726 + df[244  :244 +1] -  0.06390041177437726  #5-- +1   0.06390041177437726  0.06390041177437726 0.19677038270925978\ndf[245  :245 +1] =  0.04980330296088735 + df[245  :245 +1] -  0.04980330296088735  #1   0.04980330296088735  0.04980330296088735 0.19410019029102935\ndf[246  :246 +1] =  0.04035973107570107 + df[246  :246 +1] -  0.04035973107570107  #1   0.04035973107570107  0.04035973107570107 0.17827318920337584\ndf[249  :249 +1] =  4.019050299889077   + df[249  :249 +1] -  4.019050299889077        #   4.019050299889077  4.019050299889077 4.099198546854503","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.to_csv('submission.csv') ","metadata":{},"execution_count":null,"outputs":[]}]}