{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"tpu1vmV38","dataSources":[{"sourceId":56537,"databundleVersionId":8877088,"sourceType":"competition"}],"dockerImageVersionId":30628,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!pip install polars","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:45:13.413415Z","iopub.execute_input":"2024-07-08T02:45:13.413635Z","iopub.status.idle":"2024-07-08T02:45:19.895696Z","shell.execute_reply.started":"2024-07-08T02:45:13.41361Z","shell.execute_reply":"2024-07-08T02:45:19.894904Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nimport random, sys, gc, warnings, math\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom time import time\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras.callbacks import LearningRateScheduler, EarlyStopping\nfrom tensorflow.keras.optimizers.schedules import ExponentialDecay\nfrom tensorflow.keras.layers import Input, Dense, Concatenate, Dropout\nfrom tensorflow.keras.utils import Sequence\nimport polars as pl\n\nt0 = time()\nnp.random.seed(13)\nrandom.seed(13)\n\n# Configure Strategy. Assume TPU...if not set default for GPU\ntpu = None\ntry:\n    tpu = tf.distribute.cluster_resolver.TPUClusterResolver(\"local\")\n    tf.config.experimental_connect_to_cluster(tpu)\n    tf.tpu.experimental.initialize_tpu_system(tpu)\n    strategy = tf.distribute.experimental.TPUStrategy(tpu)\nexcept:\n    strategy = tf.distribute.get_strategy()\nprint(\"REPLICAS: \", strategy.num_replicas_in_sync)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:45:19.897153Z","iopub.execute_input":"2024-07-08T02:45:19.897408Z","iopub.status.idle":"2024-07-08T02:45:43.654497Z","shell.execute_reply.started":"2024-07-08T02:45:19.89738Z","shell.execute_reply":"2024-07-08T02:45:43.653785Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# read test\nimport torch\ndf = pl.read_csv(\"/kaggle/input/leap-atmospheric-physics-ai-climsim/test.csv\")\nxt = torch.from_numpy(df[:,1:557].to_numpy().astype(np.float64))\n\n#xt[:,120:149]=0.\n\ndel df\ngc.collect()\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:45:43.655408Z","iopub.execute_input":"2024-07-08T02:45:43.655641Z","iopub.status.idle":"2024-07-08T02:46:16.416799Z","shell.execute_reply.started":"2024-07-08T02:45:43.655616Z","shell.execute_reply":"2024-07-08T02:46:16.415731Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n\ndf = pl.read_csv(\"/kaggle/input/leap-atmospheric-physics-ai-climsim/train.csv\")\n\nx = torch.from_numpy(df[:,1:557].to_numpy().astype(np.float64))\n\n#x[:,120:149]=0.\n\ny = torch.from_numpy(df[:,557:].to_numpy().astype(np.float64))\n\n#y[:,120:149]=0.\n\ndel df\ngc.collect()\n\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:46:16.41878Z","iopub.execute_input":"2024-07-08T02:46:16.419389Z","iopub.status.idle":"2024-07-08T02:54:00.464176Z","shell.execute_reply.started":"2024-07-08T02:46:16.419356Z","shell.execute_reply":"2024-07-08T02:54:00.463268Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def r2_score(y_true, y_pred):\n    # Ensure inputs are 2D tensors\n    assert y_true.dim() == 2 and y_pred.dim() == 2, \"Inputs must be 2D tensors\"\n    assert y_true.shape == y_pred.shape, \"Input shapes must match\"\n\n    # Calculate mean of y_true for each column\n    y_mean = torch.mean(y_true, dim=0)\n\n    # Calculate total sum of squares\n    ss_tot = torch.sum((y_true - y_mean)**2, dim=0)\n\n    # Calculate residual sum of squares\n    ss_res = torch.sum((y_true - y_pred)**2, dim=0)\n\n    # Calculate R2 score\n    r2 = 1 - (ss_res / ss_tot)\n\n    # Handle cases where both ss_res and ss_tot are 0\n    zero_mask = (ss_res == 0) & (ss_tot == 0)\n    r2[zero_mask] = 1.0\n\n    return r2","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:00.465297Z","iopub.execute_input":"2024-07-08T02:54:00.465569Z","iopub.status.idle":"2024-07-08T02:54:00.47133Z","shell.execute_reply.started":"2024-07-08T02:54:00.465542Z","shell.execute_reply":"2024-07-08T02:54:00.470616Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ss=pl.read_csv(\"/kaggle/input/leap-atmospheric-physics-ai-climsim/sample_submission.csv\", n_rows=1)\nss=torch.from_numpy(ss[:,1:].to_numpy().astype(np.float64))[0]\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:00.472219Z","iopub.execute_input":"2024-07-08T02:54:00.472521Z","iopub.status.idle":"2024-07-08T02:54:00.553186Z","shell.execute_reply.started":"2024-07-08T02:54:00.472493Z","shell.execute_reply":"2024-07-08T02:54:00.552267Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y_pred_132_148=-x[:,132:149]/1200\nyt_pred_132_148=-xt[:,132:149]/1200\ny=y*ss","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:00.554393Z","iopub.execute_input":"2024-07-08T02:54:00.554794Z","iopub.status.idle":"2024-07-08T02:54:03.577902Z","shell.execute_reply.started":"2024-07-08T02:54:00.554766Z","shell.execute_reply":"2024-07-08T02:54:03.576906Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"r2_score(y[:,132:149],y_pred_132_148)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:03.579126Z","iopub.execute_input":"2024-07-08T02:54:03.579805Z","iopub.status.idle":"2024-07-08T02:54:04.766436Z","shell.execute_reply.started":"2024-07-08T02:54:03.579771Z","shell.execute_reply":"2024-07-08T02:54:04.765287Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_mean=[ 2.1562e+02,  2.2790e+02,  2.3732e+02,  2.4791e+02,  2.5623e+02,\n         2.5945e+02,  2.5528e+02,  2.4671e+02,  2.3699e+02,  2.3028e+02,\n         2.2506e+02,  2.2093e+02,  2.1711e+02,  2.1389e+02,  2.1053e+02,\n         2.0704e+02,  2.0284e+02,  2.0004e+02,  1.9928e+02,  2.0123e+02,\n         2.0371e+02,  2.0690e+02,  2.1043e+02,  2.1424e+02,  2.1805e+02,\n         2.2190e+02,  2.2567e+02,  2.2934e+02,  2.3291e+02,  2.3638e+02,\n         2.3974e+02,  2.4301e+02,  2.4620e+02,  2.4929e+02,  2.5226e+02,\n         2.5511e+02,  2.5784e+02,  2.6042e+02,  2.6285e+02,  2.6510e+02,\n         2.6717e+02,  2.6905e+02,  2.7076e+02,  2.7232e+02,  2.7374e+02,\n         2.7507e+02,  2.7631e+02,  2.7749e+02,  2.7860e+02,  2.7964e+02,\n         2.8062e+02,  2.8154e+02,  2.8242e+02,  2.8328e+02,  2.8413e+02,\n         2.8499e+02,  2.8584e+02,  2.8670e+02,  2.8756e+02,  2.8844e+02,\n         1.7181e-06,  1.7212e-06,  1.7281e-06,  1.7347e-06,  1.7434e-06,\n         1.7533e-06,  1.7672e-06,  1.7837e-06,  1.8052e-06,  1.8297e-06,\n         1.8616e-06,  1.9038e-06,  1.9296e-06,  1.9378e-06,  1.9291e-06,\n         1.8856e-06,  1.7853e-06,  1.7304e-06,  2.0951e-06,  3.2314e-06,\n         5.6744e-06,  9.7554e-06,  1.6698e-05,  2.8637e-05,  4.8190e-05,\n         7.8504e-05,  1.2174e-04,  1.7969e-04,  2.5373e-04,  3.4585e-04,\n         4.5909e-04,  5.9616e-04,  7.5836e-04,  9.4668e-04,  1.1642e-03,\n         1.4152e-03,  1.7016e-03,  2.0236e-03,  2.3784e-03,  2.7619e-03,\n         3.1721e-03,  3.6051e-03,  4.0556e-03,  4.5187e-03,  4.9870e-03,\n         5.4493e-03,  5.8932e-03,  6.3072e-03,  6.6869e-03,  7.0371e-03,\n         7.3663e-03,  7.6840e-03,  7.9975e-03,  8.3103e-03,  8.6190e-03,\n         8.9100e-03,  9.1648e-03,  9.3751e-03,  9.5516e-03,  9.7242e-03,\n         3.6861e-34,  3.6514e-34,  3.6405e-34,  3.6063e-34,  3.5928e-34,\n         3.7677e-34,  3.9333e-34,  3.8934e-34,  3.4586e-34,  2.6779e-34,\n         1.7579e-34,  5.5697e-35,  2.5380e-38,  9.8206e-44,  5.8861e-49,\n         1.1215e-51,  6.9565e-48,  4.6069e-43,  3.6540e-40,  1.2173e-37,\n         7.7579e-35,  5.4033e-32,  4.3833e-29,  3.4779e-26,  7.2849e-23,\n         1.3390e-18,  1.6802e-13,  1.0335e-11,  4.3907e-09,  1.1255e-07,\n         6.2103e-07,  1.5633e-06,  2.6231e-06,  3.6509e-06,  4.7280e-06,\n         5.9298e-06,  7.1791e-06,  8.4399e-06,  9.7346e-06,  1.1086e-05,\n         1.2601e-05,  1.4311e-05,  1.6285e-05,  1.8700e-05,  2.1621e-05,\n         2.4767e-05,  2.7503e-05,  2.9132e-05,  2.9578e-05,  2.9147e-05,\n         2.8015e-05,  2.6279e-05,  2.3877e-05,  2.0830e-05,  1.7324e-05,\n         1.3813e-05,  1.0846e-05,  8.6201e-06,  6.7006e-06,  3.5626e-06,\n         2.6874e-12,  2.8493e-12,  3.2188e-12,  3.7171e-12,  4.2521e-12,\n         4.8457e-12,  6.0151e-12,  8.9745e-12,  1.5283e-11,  3.0420e-11,\n         5.3425e-11,  1.0274e-10,  2.1475e-10,  1.8144e-10,  1.5941e-10,\n         4.8347e-10,  7.7587e-09,  4.4167e-08,  1.0848e-07,  4.6163e-07,\n         1.0061e-06,  1.8353e-06,  2.8546e-06,  3.9681e-06,  5.0697e-06,\n         6.2104e-06,  7.3934e-06,  8.5482e-06,  9.5782e-06,  1.0396e-05,\n         1.0779e-05,  1.0522e-05,  9.8667e-06,  9.1705e-06,  8.5727e-06,\n         8.0296e-06,  7.4958e-06,  7.0145e-06,  6.6046e-06,  6.2622e-06,\n         5.9587e-06,  5.6844e-06,  5.4459e-06,  5.2493e-06,  5.0717e-06,\n         4.8800e-06,  4.6504e-06,  4.3863e-06,  4.1035e-06,  3.8151e-06,\n         3.5327e-06,  3.2607e-06,  3.0009e-06,  2.7540e-06,  2.5258e-06,\n         2.3239e-06,  2.1511e-06,  1.9989e-06,  1.8396e-06,  1.6806e-06,\n         8.5808e+00,  1.0622e+01,  1.2268e+01,  1.2507e+01,  1.1831e+01,\n         1.0774e+01,  9.6587e+00,  8.5251e+00,  7.4786e+00,  6.4845e+00,\n         5.6457e+00,  5.1350e+00,  5.1302e+00,  5.5987e+00,  6.4626e+00,\n         7.9020e+00,  1.0248e+01,  1.3420e+01,  1.6583e+01,  1.8949e+01,\n         2.0436e+01,  2.1212e+01,  2.1414e+01,  2.1221e+01,  2.0734e+01,\n         2.0033e+01,  1.9187e+01,  1.8255e+01,  1.7270e+01,  1.6252e+01,\n         1.5214e+01,  1.4166e+01,  1.3118e+01,  1.2079e+01,  1.1061e+01,\n         1.0079e+01,  9.1447e+00,  8.2670e+00,  7.4531e+00,  6.7079e+00,\n         6.0343e+00,  5.4288e+00,  4.8835e+00,  4.3878e+00,  3.9296e+00,\n         3.4992e+00,  3.0917e+00,  2.7068e+00,  2.3446e+00,  2.0058e+00,\n         1.6929e+00,  1.4076e+00,  1.1513e+00,  9.2449e-01,  7.2898e-01,\n         5.5971e-01,  3.9941e-01,  2.5114e-01,  9.7796e-02, -4.2963e-02,\n        -1.2189e+00, -5.2384e-01, -2.3782e-01, -7.3613e-02,  2.7848e-02,\n         5.5327e-02,  4.0612e-02,  3.0236e-02,  2.2429e-02,  1.7535e-02,\n         1.5152e-02,  1.4897e-02,  1.3260e-02,  1.0814e-02,  8.8470e-03,\n         9.6958e-03,  1.4125e-02, -1.0670e-02, -1.0349e-01, -1.6470e-01,\n        -1.6343e-01, -1.2913e-01, -9.7294e-02, -5.8160e-02, -3.3568e-02,\n        -2.5953e-02, -2.3846e-02, -2.2000e-02, -1.9121e-02, -1.8907e-02,\n        -2.2687e-02, -2.6575e-02, -2.4627e-02, -1.6934e-02, -7.2721e-03,\n        -2.2105e-03, -4.6014e-03, -1.3437e-02, -2.6067e-02, -3.8664e-02,\n        -5.0500e-02, -6.0819e-02, -6.8090e-02, -7.0198e-02, -6.4318e-02,\n        -4.9087e-02, -2.5839e-02,  4.8902e-03,  4.0829e-02,  7.7319e-02,\n         1.1241e-01,  1.4483e-01,  1.7513e-01,  2.0214e-01,  2.2680e-01,\n         2.4701e-01,  2.5753e-01,  2.4221e-01,  1.9531e-01,  1.6860e-01,\n         9.8623e+04,  3.4052e+02,  7.2613e+01,  2.2371e+01, -2.5110e-03,\n        -2.3980e-03,  2.5028e-01,  5.5979e-01,  5.7616e-01,  5.4848e-01,\n         5.6523e-01,  4.0412e+02,  3.7130e-02,  2.9945e-01,  6.6342e-01,\n         5.3464e-02,  2.8687e-07,  5.1667e-07,  9.2608e-07,  1.6449e-06,\n         2.8792e-06,  4.9333e-06,  8.2193e-06,  1.3003e-05,  1.3689e-05,\n         1.4030e-05,  1.3044e-05,  1.1390e-05,  9.0054e-06,  6.9250e-06,\n         4.8630e-06,  3.2873e-06,  2.1201e-06,  1.2944e-06,  8.4477e-07,\n         6.0533e-07,  4.6860e-07,  3.7914e-07,  3.0738e-07,  2.4438e-07,\n         1.9552e-07,  1.5895e-07,  1.3040e-07,  1.1509e-07,  1.0202e-07,\n         9.5672e-08,  9.0157e-08,  8.6738e-08,  8.4083e-08,  8.1559e-08,\n         7.9236e-08,  7.6918e-08,  7.4794e-08,  7.2805e-08,  7.0840e-08,\n         6.8769e-08,  6.6733e-08,  6.4802e-08,  6.2957e-08,  6.1120e-08,\n         5.9378e-08,  5.7734e-08,  5.6258e-08,  5.5132e-08,  5.4122e-08,\n         5.3191e-08,  5.2312e-08,  5.1596e-08,  5.1009e-08,  5.0437e-08,\n         4.9859e-08,  4.9271e-08,  4.8720e-08,  4.8128e-08,  4.7432e-08,\n         4.6798e-08,  1.3602e-07,  1.5706e-07,  1.8126e-07,  2.0887e-07,\n         2.4003e-07,  2.7463e-07,  3.1236e-07,  3.5266e-07,  3.9490e-07,\n         4.3849e-07,  4.8306e-07,  5.2841e-07,  5.7451e-07,  6.2127e-07,\n         6.6847e-07,  7.1572e-07,  7.6255e-07,  8.0858e-07,  8.5358e-07,\n         8.9292e-07,  9.2243e-07,  9.4637e-07,  9.6583e-07,  9.8120e-07,\n         9.9173e-07,  9.9717e-07,  9.9845e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,  9.9861e-07,\n         9.9861e-07,  2.4723e-08,  3.0954e-08,  3.8712e-08,  4.8286e-08,\n         5.9940e-08,  7.3865e-08,  9.0125e-08,  1.0864e-07,  1.2919e-07,\n         1.5154e-07,  1.7546e-07,  2.0082e-07,  2.2754e-07,  2.5550e-07,\n         2.8452e-07,  3.1428e-07,  3.4439e-07,  3.7450e-07,  4.0439e-07,\n         4.3050e-07,  4.4939e-07,  4.6398e-07,  4.7497e-07,  4.8292e-07,\n         4.8788e-07,  4.9026e-07,  4.9079e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,  4.9086e-07,\n         4.9086e-07]\nx_std = [6.6413e+00, 8.6505e+00, 8.2435e+00, 6.7923e+00, 6.2700e+00, 8.2776e+00,\n        1.0174e+01, 1.0119e+01, 9.2167e+00, 8.8063e+00, 8.1321e+00, 7.4289e+00,\n        6.7295e+00, 6.3368e+00, 6.5385e+00, 7.6403e+00, 9.9975e+00, 1.1812e+01,\n        1.0056e+01, 8.2620e+00, 5.4877e+00, 4.0752e+00, 4.3115e+00, 5.4674e+00,\n        6.9500e+00, 8.2992e+00, 9.5123e+00, 1.0510e+01, 1.1339e+01, 1.1996e+01,\n        1.2511e+01, 1.2891e+01, 1.3160e+01, 1.3328e+01, 1.3406e+01, 1.3409e+01,\n        1.3361e+01, 1.3283e+01, 1.3193e+01, 1.3103e+01, 1.3018e+01, 1.2943e+01,\n        1.2880e+01, 1.2829e+01, 1.2792e+01, 1.2773e+01, 1.2772e+01, 1.2790e+01,\n        1.2826e+01, 1.2877e+01, 1.2940e+01, 1.3014e+01, 1.3098e+01, 1.3198e+01,\n        1.3327e+01, 1.3507e+01, 1.3770e+01, 1.4074e+01, 1.4391e+01, 1.4755e+01,\n        3.9649e-07, 3.9840e-07, 3.9936e-07, 4.0004e-07, 4.0135e-07, 4.0256e-07,\n        4.0030e-07, 3.9394e-07, 3.8193e-07, 3.6497e-07, 3.4722e-07, 3.5125e-07,\n        3.9113e-07, 4.5642e-07, 5.6186e-07, 6.7049e-07, 5.7955e-07, 6.3968e-07,\n        1.0699e-06, 1.9878e-06, 3.5241e-06, 5.8749e-06, 1.1688e-05, 2.4004e-05,\n        4.6340e-05, 8.2588e-05, 1.3571e-04, 2.0675e-04, 2.9552e-04, 4.0227e-04,\n        5.2893e-04, 6.7491e-04, 8.3555e-04, 1.0055e-03, 1.1821e-03, 1.3653e-03,\n        1.5554e-03, 1.7523e-03, 1.9554e-03, 2.1630e-03, 2.3748e-03, 2.5897e-03,\n        2.8058e-03, 3.0193e-03, 3.2268e-03, 3.4263e-03, 3.6180e-03, 3.8028e-03,\n        3.9794e-03, 4.1477e-03, 4.3110e-03, 4.4748e-03, 4.6457e-03, 4.8274e-03,\n        5.0178e-03, 5.2017e-03, 5.3589e-03, 5.4750e-03, 5.5568e-03, 5.6348e-03,\n        7.7712e-34, 8.0743e-34, 8.8674e-34, 1.0213e-33, 1.2953e-33, 1.8058e-33,\n        2.1677e-33, 2.1033e-33, 1.6451e-33, 1.1595e-33, 7.7159e-34, 2.5953e-34,\n        2.6386e-37, 1.2388e-42, 1.0086e-47, 2.4925e-48, 9.0102e-45, 6.4137e-40,\n        4.3499e-37, 1.1117e-34, 8.1623e-32, 6.2614e-29, 5.2657e-26, 3.8102e-23,\n        7.9353e-20, 2.4546e-15, 3.2663e-10, 1.9267e-09, 9.3159e-08, 1.2635e-06,\n        4.1823e-06, 7.6702e-06, 1.0813e-05, 1.3512e-05, 1.6022e-05, 1.8364e-05,\n        1.9995e-05, 2.1103e-05, 2.2316e-05, 2.3646e-05, 2.5150e-05, 2.6716e-05,\n        2.8374e-05, 3.0434e-05, 3.2992e-05, 3.5806e-05, 3.8143e-05, 3.9085e-05,\n        3.8669e-05, 3.7460e-05, 3.5771e-05, 3.4083e-05, 3.2329e-05, 3.0534e-05,\n        2.8725e-05, 2.6867e-05, 2.5072e-05, 2.3350e-05, 2.1137e-05, 1.3931e-05,\n        3.9929e-12, 4.3381e-12, 5.2359e-12, 6.7139e-12, 8.6256e-12, 1.1128e-11,\n        1.6524e-11, 3.0273e-11, 5.5601e-11, 1.7181e-10, 5.6118e-10, 2.3423e-09,\n        8.1238e-09, 6.0419e-09, 4.8444e-09, 8.2684e-08, 6.9547e-07, 2.1726e-06,\n        2.9328e-06, 6.4517e-06, 9.6362e-06, 1.2812e-05, 1.5667e-05, 1.7965e-05,\n        1.9851e-05, 2.1841e-05, 2.4058e-05, 2.6151e-05, 2.7718e-05, 2.8376e-05,\n        2.7390e-05, 2.4626e-05, 2.1450e-05, 1.8975e-05, 1.7391e-05, 1.6433e-05,\n        1.5842e-05, 1.5391e-05, 1.4923e-05, 1.4390e-05, 1.3820e-05, 1.3253e-05,\n        1.2705e-05, 1.2195e-05, 1.1718e-05, 1.1265e-05, 1.0815e-05, 1.0358e-05,\n        9.8946e-06, 9.4498e-06, 9.0400e-06, 8.6584e-06, 8.2948e-06, 7.9490e-06,\n        7.6387e-06, 7.3803e-06, 7.1639e-06, 6.9527e-06, 6.6518e-06, 6.2650e-06,\n        3.8941e+01, 3.7417e+01, 3.7536e+01, 3.8386e+01, 3.8776e+01, 3.7380e+01,\n        3.3990e+01, 3.0187e+01, 2.6969e+01, 2.4342e+01, 2.2113e+01, 2.0209e+01,\n        1.8524e+01, 1.7114e+01, 1.6079e+01, 1.5392e+01, 1.5070e+01, 1.5436e+01,\n        1.6290e+01, 1.7131e+01, 1.7654e+01, 1.7718e+01, 1.7453e+01, 1.6895e+01,\n        1.6145e+01, 1.5277e+01, 1.4377e+01, 1.3488e+01, 1.2629e+01, 1.1815e+01,\n        1.1055e+01, 1.0362e+01, 9.7511e+00, 9.2295e+00, 8.7938e+00, 8.4346e+00,\n        8.1456e+00, 7.9167e+00, 7.7340e+00, 7.5818e+00, 7.4476e+00, 7.3288e+00,\n        7.2309e+00, 7.1625e+00, 7.1279e+00, 7.1243e+00, 7.1433e+00, 7.1733e+00,\n        7.2041e+00, 7.2307e+00, 7.2506e+00, 7.2589e+00, 7.2447e+00, 7.1953e+00,\n        7.0984e+00, 6.9495e+00, 6.7362e+00, 6.4202e+00, 5.9192e+00, 5.2497e+00,\n        2.0911e+01, 1.5309e+01, 1.2066e+01, 1.0596e+01, 9.1914e+00, 7.6162e+00,\n        6.4676e+00, 6.0058e+00, 5.6546e+00, 5.2334e+00, 4.8493e+00, 4.5566e+00,\n        4.3505e+00, 4.2306e+00, 4.2253e+00, 4.3951e+00, 4.8946e+00, 6.0501e+00,\n        7.5742e+00, 8.8840e+00, 9.7843e+00, 1.0279e+01, 1.0430e+01, 1.0261e+01,\n        9.8568e+00, 9.3361e+00, 8.8126e+00, 8.3335e+00, 7.8961e+00, 7.4837e+00,\n        7.0823e+00, 6.6871e+00, 6.2995e+00, 5.9237e+00, 5.5653e+00, 5.2304e+00,\n        4.9232e+00, 4.6517e+00, 4.4186e+00, 4.2250e+00, 4.0690e+00, 3.9482e+00,\n        3.8590e+00, 3.7988e+00, 3.7682e+00, 3.7727e+00, 3.8186e+00, 3.9054e+00,\n        4.0249e+00, 4.1639e+00, 4.3103e+00, 4.4569e+00, 4.5999e+00, 4.7309e+00,\n        4.8420e+00, 4.9244e+00, 4.9691e+00, 4.9548e+00, 4.8193e+00, 4.4011e+00,\n        4.4395e+03, 4.3882e+02, 7.8419e+01, 5.9526e+01, 8.6765e-02, 6.8615e-02,\n        3.2239e-01, 4.3019e-01, 4.1779e-01, 4.5151e-01, 4.3914e-01, 7.7498e+01,\n        1.4471e-01, 3.8968e-01, 4.1279e-01, 2.0905e-01, 2.4501e-08, 4.4127e-08,\n        7.9094e-08, 1.4049e-07, 2.4590e-07, 4.2134e-07, 7.0198e-07, 1.1033e-06,\n        1.5746e-06, 2.4548e-06, 2.3759e-06, 1.7994e-06, 8.9932e-07, 6.5308e-07,\n        1.0076e-06, 1.1810e-06, 1.1716e-06, 1.0192e-06, 7.8018e-07, 5.8429e-07,\n        4.5461e-07, 3.6576e-07, 2.9358e-07, 2.2862e-07, 1.7126e-07, 1.2560e-07,\n        8.7374e-08, 6.5296e-08, 4.7186e-08, 3.8432e-08, 3.1666e-08, 2.8107e-08,\n        2.5780e-08, 2.4250e-08, 2.3584e-08, 2.3067e-08, 2.2558e-08, 2.2063e-08,\n        2.1646e-08, 2.1437e-08, 2.1356e-08, 2.1340e-08, 2.1353e-08, 2.1331e-08,\n        2.1381e-08, 2.1494e-08, 2.1597e-08, 2.1530e-08, 2.1495e-08, 2.1486e-08,\n        2.1465e-08, 2.1377e-08, 2.1246e-08, 2.1110e-08, 2.1000e-08, 2.0861e-08,\n        2.0657e-08, 2.0355e-08, 1.9889e-08, 1.9404e-08, 6.7325e-08, 7.6268e-08,\n        8.6124e-08, 9.6814e-08, 1.0815e-07, 1.1985e-07, 1.3148e-07, 1.4261e-07,\n        1.5279e-07, 1.6167e-07, 1.6899e-07, 1.7457e-07, 1.7827e-07, 1.7996e-07,\n        1.7952e-07, 1.7692e-07, 1.7219e-07, 1.6545e-07, 1.5688e-07, 1.4299e-07,\n        1.2178e-07, 9.7498e-08, 7.1716e-08, 4.7140e-08, 2.5724e-08, 9.5716e-09,\n        2.2909e-09, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 1.2306e-08, 1.4951e-08,\n        1.8089e-08, 2.1755e-08, 2.5944e-08, 3.0600e-08, 3.5607e-08, 4.0798e-08,\n        4.5981e-08, 5.0979e-08, 5.5648e-08, 5.9881e-08, 6.3592e-08, 6.6703e-08,\n        6.9142e-08, 7.0853e-08, 7.1813e-08, 7.2038e-08, 7.1574e-08, 6.7121e-08,\n        5.6942e-08, 4.4936e-08, 3.2354e-08, 2.0731e-08, 1.0980e-08, 3.9797e-09,\n        9.4292e-10, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00]\ny_mean=[ 1.0293e-05, -7.0281e-06, -3.1783e-06, -3.1923e-06, -3.6305e-06,\n        -2.2230e-06, -3.1574e-07,  3.9614e-07,  1.8350e-07, -1.5025e-08,\n         1.4140e-07,  1.8991e-07,  2.9911e-07,  3.7836e-07,  5.7042e-07,\n         9.3496e-07,  1.7220e-06,  1.6504e-06,  7.5952e-07, -3.9152e-07,\n        -3.5008e-07, -2.3830e-06, -4.1224e-06, -5.6501e-06, -6.6162e-06,\n        -6.6196e-06, -5.8169e-06, -4.6825e-06, -3.5742e-06, -2.5693e-06,\n        -1.6870e-06, -9.0353e-07, -2.7668e-07,  1.8943e-07,  4.8232e-07,\n         6.4682e-07,  6.9192e-07,  6.9456e-07,  6.8264e-07,  6.0524e-07,\n         4.6188e-07,  2.5631e-07, -3.9707e-08, -3.9279e-07, -7.0516e-07,\n        -7.0207e-07, -1.9406e-07,  6.6915e-07,  1.5757e-06,  2.3883e-06,\n         3.0654e-06,  3.6993e-06,  4.2736e-06,  4.4461e-06,  3.9050e-06,\n         2.1095e-06, -1.3361e-06, -8.6302e-06, -2.5211e-05, -6.2107e-05,\n        -3.6084e-17, -2.2607e-17,  2.2829e-17,  7.1212e-19,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  2.9608e-15,  7.5404e-15,  9.9102e-15,\n         4.8055e-14,  3.3179e-14, -2.5586e-13, -5.8646e-13, -2.5492e-12,\n        -9.4726e-12, -3.1134e-11, -8.9123e-11, -2.1081e-10, -4.2915e-10,\n        -7.6005e-10, -1.1670e-09, -1.5839e-09, -1.9651e-09, -2.3255e-09,\n        -2.6630e-09, -2.8910e-09, -2.9827e-09, -2.9461e-09, -2.8255e-09,\n        -2.6786e-09, -2.5211e-09, -2.3596e-09, -2.1801e-09, -1.9747e-09,\n        -1.7037e-09, -1.3449e-09, -8.7260e-10, -2.2778e-10,  4.7601e-10,\n         1.0514e-09,  1.2363e-09,  9.2195e-10,  2.9053e-10, -6.6154e-10,\n        -2.0496e-09, -4.2078e-09, -7.4380e-09, -1.1539e-08, -1.6028e-08,\n        -1.9473e-08, -2.1270e-08, -1.9714e-08, -1.8091e-08, -1.4410e-08,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00, -2.1150e-41, -8.1838e-47, -4.9051e-52,\n        -9.3460e-55, -5.7971e-51, -3.8391e-46, -3.0450e-43, -1.0144e-40,\n        -6.4649e-38, -4.5027e-35, -3.6527e-32, -2.8982e-29, -6.0708e-26,\n        -1.1158e-21, -1.4002e-16, -7.7815e-15, -3.4375e-12, -3.1629e-11,\n        -8.0750e-11, -9.6265e-11, -7.8450e-11, -6.6339e-11, -6.1060e-11,\n        -4.9178e-11, -2.9992e-11, -1.7450e-11, -6.9846e-12,  3.1773e-12,\n         1.2787e-11,  3.1217e-11,  4.5542e-11,  6.2931e-11,  8.4487e-11,\n         1.0612e-10,  1.1483e-10,  1.1333e-10,  1.0991e-10,  1.0911e-10,\n         1.2513e-10,  1.3899e-10,  1.3954e-10,  1.1351e-10,  8.0548e-11,\n         4.8613e-11,  2.8333e-11,  6.0504e-12, -5.8430e-11, -5.6665e-10,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00, -8.5518e-16, -7.3666e-16, -8.2069e-16,\n         3.6988e-15, -1.6568e-14, -6.9476e-13, -5.7272e-12, -1.7874e-11,\n        -3.8928e-11, -6.4956e-11, -8.6388e-11, -9.9737e-11, -1.1239e-10,\n        -1.2531e-10, -1.3065e-10, -1.1794e-10, -9.0361e-11, -3.9697e-11,\n         3.5617e-11,  9.2071e-11,  1.0254e-10,  9.2492e-11,  8.5340e-11,\n         8.2676e-11,  7.3386e-11,  5.8594e-11,  4.9210e-11,  4.4622e-11,\n         3.9622e-11,  3.3718e-11,  2.8289e-11,  2.4847e-11,  2.2575e-11,\n         2.0580e-11,  1.9100e-11,  2.1192e-11,  2.6015e-11,  3.2527e-11,\n         3.6671e-11,  3.7630e-11,  3.4087e-11,  2.5423e-11,  1.2012e-11,\n        -2.7590e-12, -1.5077e-11, -2.1427e-11, -4.4690e-11, -2.0760e-10,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  7.1664e-09,  4.5984e-09,  1.5695e-08,\n         2.0287e-08,  7.3367e-08,  5.1994e-07,  1.4148e-06,  1.8570e-06,\n         7.1469e-07,  2.5257e-08, -6.0153e-07, -9.6801e-07, -1.3793e-06,\n        -1.6439e-06, -1.6095e-06, -1.4829e-06, -1.3327e-06, -1.1871e-06,\n        -1.0603e-06, -9.2664e-07, -7.8335e-07, -6.1282e-07, -4.7620e-07,\n        -4.1084e-07, -4.3579e-07, -4.9280e-07, -5.6152e-07, -6.4633e-07,\n        -7.9266e-07, -1.0281e-06, -1.3661e-06, -1.8080e-06, -2.3485e-06,\n        -2.8943e-06, -3.1762e-06, -2.9612e-06, -2.2367e-06, -9.2743e-07,\n         9.1381e-07,  3.1168e-06,  5.1450e-06,  6.3396e-06,  6.2281e-06,\n         5.4982e-06,  5.9036e-06,  6.4175e-06,  5.6645e-06,  7.7886e-06,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,\n         0.0000e+00,  0.0000e+00,  1.6717e-10,  8.0971e-11,  1.0864e-09,\n         1.1311e-08,  7.9210e-09, -9.8580e-08, -8.7774e-08,  1.7331e-07,\n         3.3001e-07,  3.2184e-07,  2.4471e-07, -2.9038e-08, -1.2626e-07,\n        -1.6659e-07, -1.4950e-07, -1.1093e-07, -6.7458e-08, -4.4353e-08,\n        -2.6233e-08, -1.7367e-09,  2.0642e-08,  3.3030e-08,  2.9465e-08,\n         4.2831e-09, -6.5740e-08, -1.6071e-07, -2.4989e-07, -3.0568e-07,\n        -3.0786e-07, -2.3030e-07, -8.6547e-08,  1.0501e-07,  3.0829e-07,\n         4.7720e-07,  5.9757e-07,  6.1516e-07,  5.2246e-07,  3.3562e-07,\n         9.3188e-08, -2.0639e-07, -6.3433e-07, -9.8461e-07, -1.0975e-06,\n        -9.9422e-07, -5.0803e-07,  6.2312e-07,  1.3958e-06,  6.2858e-07,\n         1.5830e+02,  3.5120e+02,  2.7387e-09,  2.9191e-08,  6.1790e+01,\n         6.7310e+01,  3.3474e+01,  1.7693e+01]\ny_std=[3.2278e-05, 4.4440e-05, 5.2926e-05, 6.8898e-05, 9.1371e-05, 1.1031e-04,\n        1.0348e-04, 7.8811e-05, 5.0276e-05, 3.8713e-05, 2.9507e-05, 2.2664e-05,\n        1.6719e-05, 1.2589e-05, 9.3146e-06, 7.3681e-06, 6.6934e-06, 7.7825e-06,\n        1.0900e-05, 1.3746e-05, 1.5030e-05, 1.5890e-05, 1.7665e-05, 2.0213e-05,\n        2.3240e-05, 2.7091e-05, 3.1759e-05, 3.7177e-05, 4.2888e-05, 4.8876e-05,\n        5.4390e-05, 5.8441e-05, 6.1208e-05, 6.3061e-05, 6.4181e-05, 6.4526e-05,\n        6.4052e-05, 6.3300e-05, 6.2601e-05, 6.1995e-05, 6.1496e-05, 6.1080e-05,\n        6.0987e-05, 6.1254e-05, 6.1619e-05, 6.1760e-05, 6.1195e-05, 6.0076e-05,\n        5.8805e-05, 5.7371e-05, 5.5843e-05, 5.4255e-05, 5.2542e-05, 5.0758e-05,\n        4.9000e-05, 4.7694e-05, 4.7182e-05, 4.7419e-05, 5.1446e-05, 7.3111e-05,\n        2.0644e-14, 1.8267e-14, 1.3701e-14, 5.3643e-15, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        1.1474e-12, 9.2317e-13, 6.8011e-12, 2.8125e-11, 2.8447e-11, 2.1698e-11,\n        4.0503e-11, 8.8158e-11, 1.8530e-10, 4.0827e-10, 8.8322e-10, 1.7255e-09,\n        3.0283e-09, 4.8166e-09, 6.9166e-09, 9.0964e-09, 1.1273e-08, 1.3547e-08,\n        1.5719e-08, 1.7467e-08, 1.8876e-08, 2.0140e-08, 2.1485e-08, 2.3166e-08,\n        2.5173e-08, 2.7535e-08, 3.0250e-08, 3.3479e-08, 3.7061e-08, 4.0956e-08,\n        4.4896e-08, 4.8654e-08, 5.2039e-08, 5.5043e-08, 5.7137e-08, 5.8241e-08,\n        5.8805e-08, 5.8829e-08, 5.8538e-08, 5.8045e-08, 5.7320e-08, 5.6315e-08,\n        5.4508e-08, 5.1545e-08, 4.8764e-08, 4.4504e-08, 4.2677e-08, 3.8162e-08,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        2.1988e-40, 1.0323e-45, 8.4051e-51, 2.0771e-51, 7.5085e-48, 5.3447e-43,\n        3.6249e-40, 9.2645e-38, 6.8019e-35, 5.2178e-32, 4.3881e-29, 3.1752e-26,\n        6.6127e-23, 2.0455e-18, 2.7220e-13, 2.6925e-12, 7.0328e-11, 3.3313e-10,\n        6.9795e-10, 1.1305e-09, 1.7853e-09, 2.5903e-09, 3.4803e-09, 4.4903e-09,\n        5.5227e-09, 6.4674e-09, 7.2415e-09, 7.8985e-09, 8.4769e-09, 9.0085e-09,\n        9.5069e-09, 9.9832e-09, 1.0464e-08, 1.0934e-08, 1.1252e-08, 1.1257e-08,\n        1.0941e-08, 1.0354e-08, 9.5687e-09, 8.6285e-09, 7.5792e-09, 6.4728e-09,\n        5.4601e-09, 4.6479e-09, 4.0460e-09, 3.7482e-09, 3.5828e-09, 2.6988e-09,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        1.1394e-12, 8.5119e-13, 7.8703e-13, 4.6025e-11, 3.1651e-10, 9.1688e-10,\n        1.3737e-09, 2.6015e-09, 3.4389e-09, 4.2973e-09, 5.0641e-09, 5.7369e-09,\n        6.2291e-09, 6.5118e-09, 6.5738e-09, 6.5310e-09, 6.4954e-09, 6.5047e-09,\n        6.4600e-09, 6.1220e-09, 5.5552e-09, 4.9919e-09, 4.5299e-09, 4.1444e-09,\n        3.8042e-09, 3.5156e-09, 3.2714e-09, 3.0525e-09, 2.8533e-09, 2.6740e-09,\n        2.5101e-09, 2.3611e-09, 2.2200e-09, 2.0883e-09, 1.9677e-09, 1.8611e-09,\n        1.7641e-09, 1.6817e-09, 1.6136e-09, 1.5591e-09, 1.5076e-09, 1.4508e-09,\n        1.3924e-09, 1.3442e-09, 1.3127e-09, 1.2938e-09, 1.2438e-09, 1.2946e-09,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        2.1674e-07, 5.0017e-07, 1.1054e-06, 2.3051e-06, 4.8262e-06, 9.2733e-06,\n        1.7347e-05, 2.4627e-05, 2.0947e-05, 1.9354e-05, 1.7718e-05, 1.6543e-05,\n        1.5325e-05, 1.3904e-05, 1.2734e-05, 1.1987e-05, 1.1489e-05, 1.1063e-05,\n        1.0640e-05, 1.0248e-05, 9.8592e-06, 9.5574e-06, 9.4621e-06, 9.6188e-06,\n        1.0035e-05, 1.0606e-05, 1.1171e-05, 1.1641e-05, 1.2079e-05, 1.2634e-05,\n        1.3360e-05, 1.4209e-05, 1.5286e-05, 1.6680e-05, 1.8260e-05, 1.9856e-05,\n        2.1639e-05, 2.3811e-05, 2.6531e-05, 2.9555e-05, 3.1401e-05, 3.1314e-05,\n        3.1792e-05, 3.3217e-05, 3.7095e-05, 3.6023e-05, 3.3497e-05, 5.2265e-05,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n        1.3123e-07, 3.1762e-07, 7.6428e-07, 1.8501e-06, 4.6460e-06, 9.7517e-06,\n        1.4608e-05, 1.9727e-05, 1.9422e-05, 1.9192e-05, 1.8512e-05, 1.7903e-05,\n        1.6571e-05, 1.4495e-05, 1.2643e-05, 1.1419e-05, 1.0620e-05, 9.8132e-06,\n        8.9488e-06, 8.1659e-06, 7.5708e-06, 7.0901e-06, 6.8327e-06, 6.8515e-06,\n        7.1686e-06, 7.7816e-06, 8.5715e-06, 9.3059e-06, 9.9741e-06, 1.0626e-05,\n        1.1307e-05, 1.2087e-05, 1.2977e-05, 1.4019e-05, 1.5152e-05, 1.6181e-05,\n        1.7171e-05, 1.8276e-05, 1.9675e-05, 2.1711e-05, 2.4546e-05, 2.7521e-05,\n        2.9428e-05, 2.9771e-05, 2.9421e-05, 2.7569e-05, 2.4282e-05, 3.4253e-05,\n        2.4669e+02, 7.2034e+01, 7.4003e-09, 8.1835e-08, 1.1025e+02, 1.1642e+02,\n        4.6432e+01, 2.9733e+01]\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:04.768397Z","iopub.execute_input":"2024-07-08T02:54:04.76874Z","iopub.status.idle":"2024-07-08T02:54:04.831043Z","shell.execute_reply.started":"2024-07-08T02:54:04.768705Z","shell.execute_reply":"2024-07-08T02:54:04.830032Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_std=torch.Tensor(x_std)\ny_std=torch.Tensor(y_std)\nx_std[x_std==0]=1\ny_std[y_std==0]=1","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:04.834106Z","iopub.execute_input":"2024-07-08T02:54:04.83499Z","iopub.status.idle":"2024-07-08T02:54:04.851696Z","shell.execute_reply.started":"2024-07-08T02:54:04.834959Z","shell.execute_reply":"2024-07-08T02:54:04.850705Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x[:,132:149]=0\nxt[:,132:149]=0\ny[:,132:149]=0\nx=(x-torch.Tensor(x_mean))/torch.Tensor(x_std)\nxt=(xt-torch.Tensor(x_mean))/torch.Tensor(x_std)\ny=(y-torch.Tensor(y_mean))/torch.Tensor(y_std)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:04.852832Z","iopub.execute_input":"2024-07-08T02:54:04.853145Z","iopub.status.idle":"2024-07-08T02:54:28.411645Z","shell.execute_reply.started":"2024-07-08T02:54:04.853113Z","shell.execute_reply":"2024-07-08T02:54:28.410417Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Random shuffle\ng_cpu = torch.Generator()\ng_cpu.manual_seed(46)\nindices = torch.randperm(x.size(0),generator=g_cpu)\n\n# Train-validation split (80-20)\ntrain_size = int(0.8 * x.size(0))\ntrain_indices = indices[:train_size]\nval_indices = indices[train_size:]\n\nx_train, x_val = x[train_indices], x[val_indices]\ny_train, y_val = y[train_indices], y[val_indices]","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:28.412985Z","iopub.execute_input":"2024-07-08T02:54:28.413329Z","iopub.status.idle":"2024-07-08T02:54:46.332411Z","shell.execute_reply.started":"2024-07-08T02:54:28.413297Z","shell.execute_reply":"2024-07-08T02:54:46.331063Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import gc\ndel x\ndel y\ngc.collect()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:46.333816Z","iopub.execute_input":"2024-07-08T02:54:46.334151Z","iopub.status.idle":"2024-07-08T02:54:54.141052Z","shell.execute_reply.started":"2024-07-08T02:54:46.334119Z","shell.execute_reply":"2024-07-08T02:54:54.139924Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train=x_train.to(torch.float)\ny_train=y_train.to(torch.float)\nx_val=x_val.to(torch.float)\ny_val=y_val.to(torch.float)\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:54:54.142325Z","iopub.execute_input":"2024-07-08T02:54:54.142628Z","iopub.status.idle":"2024-07-08T02:55:05.29565Z","shell.execute_reply.started":"2024-07-08T02:54:54.142596Z","shell.execute_reply":"2024-07-08T02:55:05.294423Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def cumulative_sum_normalized_prop(mse_tensor, n=10):\n    # Sort the tensor in descending order\n    #sorted_mse, _ = torch.sort(mse_tensor, descending=True)\n    \n    \n    #prop = (sorted_mse/(sorted_mse.sum()))*sorted_mse.shape[0]\n    prop = (mse_tensor/(mse_tensor.sum()))*mse_tensor.shape[0]\n    \n    #prop=prop.cpu().numpy()\n    \n    prop=torch.ceil(prop).type(torch.int)\n    \n    print(f\"First {n} values of the proportion:\")\n    for i, value in enumerate(prop[:n], 1):\n        print(f\"{i}: {value:.6f}\")\n    \n    return prop","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:05.296959Z","iopub.execute_input":"2024-07-08T02:55:05.297313Z","iopub.status.idle":"2024-07-08T02:55:05.303197Z","shell.execute_reply.started":"2024-07-08T02:55:05.297275Z","shell.execute_reply":"2024-07-08T02:55:05.302313Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n\nmse_tensor_orig=(y_train**2).sum(1)\n\nprop = cumulative_sum_normalized_prop(mse_tensor_orig)\nprint(prop.sum())\n\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:05.3043Z","iopub.execute_input":"2024-07-08T02:55:05.304555Z","iopub.status.idle":"2024-07-08T02:55:07.714565Z","shell.execute_reply.started":"2024-07-08T02:55:05.304528Z","shell.execute_reply":"2024-07-08T02:55:07.713275Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train = x_train.repeat_interleave(prop, dim=0)\ny_train = y_train.repeat_interleave(prop, dim=0)\nweights = torch.repeat_interleave(1 / prop.float(), prop, dim=0)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:07.716073Z","iopub.execute_input":"2024-07-08T02:55:07.716444Z","iopub.status.idle":"2024-07-08T02:55:14.540278Z","shell.execute_reply.started":"2024-07-08T02:55:07.716408Z","shell.execute_reply":"2024-07-08T02:55:14.538948Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train.shape","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:14.541645Z","iopub.execute_input":"2024-07-08T02:55:14.541952Z","iopub.status.idle":"2024-07-08T02:55:14.547904Z","shell.execute_reply.started":"2024-07-08T02:55:14.541922Z","shell.execute_reply":"2024-07-08T02:55:14.546966Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Generate random permutation\nnum_rows = x_train.size(0)\nperm = torch.randperm(num_rows,generator=g_cpu)\n\n# Use the permutation to shuffle both tensors\nx_train = x_train[perm]\ny_train = y_train[perm]\nweights = weights[perm]","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:14.549061Z","iopub.execute_input":"2024-07-08T02:55:14.549391Z","iopub.status.idle":"2024-07-08T02:55:23.786809Z","shell.execute_reply.started":"2024-07-08T02:55:14.549358Z","shell.execute_reply":"2024-07-08T02:55:23.785442Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train=x_train.numpy()\ny_train=y_train.numpy()\nweights=weights.numpy()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:23.788816Z","iopub.execute_input":"2024-07-08T02:55:23.789176Z","iopub.status.idle":"2024-07-08T02:55:23.794232Z","shell.execute_reply.started":"2024-07-08T02:55:23.789139Z","shell.execute_reply":"2024-07-08T02:55:23.793096Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_val=x_val.numpy()\ny_val=y_val.numpy()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:23.795673Z","iopub.execute_input":"2024-07-08T02:55:23.795935Z","iopub.status.idle":"2024-07-08T02:55:23.809223Z","shell.execute_reply.started":"2024-07-08T02:55:23.795907Z","shell.execute_reply":"2024-07-08T02:55:23.808356Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nweights_val = np.ones((len(x_val), 1))","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:23.810473Z","iopub.execute_input":"2024-07-08T02:55:23.81077Z","iopub.status.idle":"2024-07-08T02:55:23.824132Z","shell.execute_reply.started":"2024-07-08T02:55:23.81074Z","shell.execute_reply":"2024-07-08T02:55:23.823198Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"gc.collect()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:23.825242Z","iopub.execute_input":"2024-07-08T02:55:23.82555Z","iopub.status.idle":"2024-07-08T02:55:24.136423Z","shell.execute_reply.started":"2024-07-08T02:55:23.825522Z","shell.execute_reply":"2024-07-08T02:55:24.135224Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import tensorflow as tf\n\n# Define the column indices to select\ncolumn_indices = tf.concat([\n    tf.range(0, 60),\n    tf.range(60, 120),\n    tf.range(120, 180),\n    tf.range(180, 240),\n    tf.range(240, 300),\n    tf.range(300, 360),\n    tf.range(376, 436),\n    tf.range(436, 496),\n    tf.range(496, 556)\n], axis=0)\n\nclass SelectRepeatReshape(tf.keras.layers.Layer):\n    def __init__(self):\n        super(SelectRepeatReshape, self).__init__()\n        self.column_indices = tf.Variable(column_indices, trainable=False)\n\n    def call(self, x):\n        selected_columns = tf.gather(x, self.column_indices, axis=1)\n        reshaped_selected = tf.transpose(tf.reshape(selected_columns, [-1, 9, 60]), [0, 2, 1])\n        repeated_columns = x[:, 360:376]\n        out = tf.pad(reshaped_selected, [[0, 0], [0, 0], [0, 16]])\n        repeated_columns = tf.transpose(tf.reshape(repeated_columns, [-1, 16, 1]), [0, 2, 1])\n        repeated_columns = tf.pad(repeated_columns, [[0, 0], [0, 0], [9, 0]])\n        out = tf.concat([out, repeated_columns], axis=1)\n        return out\n\nclass ReshapeFunction(tf.keras.layers.Layer):\n    def __init__(self):\n        super(ReshapeFunction, self).__init__()\n\n    def call(self, x):\n        first_6_channels = x[:, :-1, :6]\n        first_6_channels = tf.transpose(first_6_channels, [0, 2, 1])\n        reshaped_first_6 = tf.reshape(first_6_channels, [-1, 60*6])\n        remaining_8_channels = x[:, -1, 6:]\n        average_remaining_8 = remaining_8_channels\n        output = tf.concat([reshaped_first_6, average_remaining_8], axis=-1)\n        return output","metadata":{"execution":{"iopub.status.busy":"2024-07-08T02:55:24.137661Z","iopub.execute_input":"2024-07-08T02:55:24.138404Z","iopub.status.idle":"2024-07-08T02:55:24.159582Z","shell.execute_reply.started":"2024-07-08T02:55:24.138369Z","shell.execute_reply":"2024-07-08T02:55:24.158445Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def create_model(hidden_size):\n    \n    class PositionalEncoding(keras.layers.Layer):\n            def __init__(self, position, d_model):\n                super(PositionalEncoding, self).__init__()\n                self.position = position\n                self.d_model = d_model\n                self.pos_encoding = self.positional_encoding(position, d_model)\n\n            def get_angles(self, position, i, d_model):\n                angles = 1 / tf.pow(10000, (2 * (i // 2)) / tf.cast(d_model, tf.float32))\n                return position * angles\n\n            def positional_encoding(self, position, d_model):\n                angle_rads = self.get_angles(\n                    position=tf.range(position, dtype=tf.float32)[:, tf.newaxis],\n                    i=tf.range(d_model, dtype=tf.float32)[tf.newaxis, :],\n                    d_model=d_model)\n\n                angle_rads = angle_rads[:, 0::2]\n\n                sines = tf.math.sin(angle_rads)\n                cosines = tf.math.cos(angle_rads)\n\n                pos_encoding = tf.concat([sines, cosines], axis=-1)\n                pos_encoding = pos_encoding[tf.newaxis, ...]\n                return tf.cast(pos_encoding, tf.float32)\n\n            def call(self, inputs):\n                return inputs + self.pos_encoding[:, :tf.shape(inputs)[1], :]\n            \n            \n    class TransformerBlock(keras.layers.Layer):\n        def __init__(self, hidden_size):\n            super(TransformerBlock, self).__init__()\n            self.hidden_size = hidden_size\n            self.mha = keras.layers.MultiHeadAttention(key_dim=hidden_size // 8, num_heads=8)\n            self.layernorm1 = keras.layers.LayerNormalization()\n            self.dense1 = keras.layers.Dense(hidden_size * 4, activation='silu')\n            self.dense2 = keras.layers.Dense(hidden_size, activation='linear')\n            self.layernorm2 = keras.layers.LayerNormalization()\n\n        def call(self, x):\n            x1 = self.mha(x, x, x)\n            x = x + x1\n            x = self.layernorm1(x)\n            \n            x2 = self.dense1(x)\n            x2 = self.dense2(x2)\n            x = x + x2\n            x = self.layernorm2(x)\n            return x\n        \n    inputs = tf.keras.Input(shape=(556,), name='main_input')\n    weights = tf.keras.Input(shape=(1,), name='weights')\n    \n    x = SelectRepeatReshape()(inputs)\n    \n    x0 = tf.keras.layers.Dense(hidden_size, activation='linear')(x)\n    x0 = PositionalEncoding(position=61, d_model=hidden_size)(x0)\n    \n    #x1 = tf.keras.layers.Conv1D(hidden_size, kernel_size=5, padding='same', activation=\"silu\")(x0)\n    x1 = tf.keras.layers.Dense(hidden_size*4, activation=\"silu\")(x0)\n    x1 = tf.keras.layers.Dense(hidden_size, activation=\"linear\")(x1)\n    \n    x2 = TransformerBlock(hidden_size)(x1)\n    \n    x3 = TransformerBlock(hidden_size)(x2)\n    x3 = keras.layers.Concatenate(axis=-1)([x3,x2])\n    x3 = keras.layers.Dense(hidden_size,activation='linear')(x3)\n    \n    x4 = TransformerBlock(hidden_size)(x3)\n    x4 = keras.layers.Concatenate(axis=-1)([x4,x1])\n    x4 = keras.layers.Dense(hidden_size,activation='linear')(x4)\n    \n    x5 = TransformerBlock(hidden_size)(x4)\n    x5 = keras.layers.Concatenate(axis=-1)([x5,x0])\n    x5 = keras.layers.Dense(hidden_size,activation='linear')(x5)\n    \n    x = tf.keras.layers.Dense(14, activation='linear')(x5)\n    main_output = ReshapeFunction()(x)\n    \n    # Concatenate main output with weights\n    output = tf.keras.layers.Concatenate(axis=1)([main_output, weights])\n    \n    model = tf.keras.Model(inputs=[inputs, weights], outputs=output)\n    return model","metadata":{"execution":{"iopub.status.busy":"2024-07-08T04:28:23.856055Z","iopub.execute_input":"2024-07-08T04:28:23.856764Z","iopub.status.idle":"2024-07-08T04:28:23.873406Z","shell.execute_reply.started":"2024-07-08T04:28:23.856729Z","shell.execute_reply":"2024-07-08T04:28:23.872463Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import tensorflow as tf\nimport numpy as np\nfrom tensorflow.keras.optimizers import AdamW\nfrom tensorflow.keras.losses import MeanSquaredError\ntf.keras.backend.clear_session()\n\nbatch_size = 1024\nhidden_size = 256\n#learning_rate = 0.002\nepochs = 5\nweight_decay = 6e-5\nbeta_1 = 0.85\nbeta_2 = 0.95\neps = 2e-6\n\n\ninitial_learning_rate=1e-7\nalpha = 1e-4\nwarmup_target=0.001\nwarmup_steps=5500\ndecay_steps=55000\n\n# Cosine decay learning rate schedule\nlr_schedule = tf.keras.optimizers.schedules.CosineDecay(\n    initial_learning_rate=initial_learning_rate,\n    decay_steps=decay_steps,\n    warmup_target=warmup_target,\n    warmup_steps=warmup_steps,\n    alpha=alpha\n)\n\n# Custom loss function for weighted MSE\ndef weighted_mse(y_true, y_pred):\n    # Separate the target and weights\n    target, sample_weight = y_true[:, :-1], y_true[:, -1]\n    pred = y_pred[:, :-1]\n    \n    mse = tf.keras.losses.mean_squared_error(target, pred)\n    return tf.reduce_mean(mse * sample_weight)\n\ntf.keras.backend.clear_session()\n\nwith strategy.scope():\n    model = create_model(hidden_size)\n    optimizer = AdamW(learning_rate=lr_schedule, weight_decay=weight_decay, beta_1=beta_1, beta_2=beta_2, epsilon=eps)\n    \n    # Compile the model with custom loss function\n    model.compile(optimizer=optimizer, loss=weighted_mse)\n\nmodel.summary()\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T05:10:34.165339Z","iopub.execute_input":"2024-07-08T05:10:34.16603Z","iopub.status.idle":"2024-07-08T05:10:36.192798Z","shell.execute_reply.started":"2024-07-08T05:10:34.165997Z","shell.execute_reply":"2024-07-08T05:10:36.191449Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"gc.collect()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T05:10:42.556841Z","iopub.execute_input":"2024-07-08T05:10:42.558006Z","iopub.status.idle":"2024-07-08T05:10:48.882298Z","shell.execute_reply.started":"2024-07-08T05:10:42.557945Z","shell.execute_reply":"2024-07-08T05:10:48.881172Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from tensorflow.keras.callbacks import Callback\n\n# Custom callback to print the required value after each epoch\nclass CustomCallback(Callback):\n    def on_epoch_end(self, epoch, logs=None):\n        val_loss = logs.get('val_loss')\n        if val_loss is not None:\n            print()\n            print(\"R2: \",1 - (val_loss + (17 - 16.1619) / 368))\n            print()\n\n# Concatenate y_train with weights and y_val with weights_val\ny_train_with_weights = np.concatenate([y_train, weights.reshape(-1,1)], axis=1)\ny_val_with_weights = np.concatenate([y_val, weights_val.reshape(-1,1)], axis=1)\n\n# Train the model\nhistory = model.fit(\n    [x_train, weights],  # Inputs\n    y_train_with_weights,  # Output (including weights)\n    validation_data=([x_val, weights_val], y_val_with_weights),\n    batch_size=batch_size,\n    epochs=epochs,\n    callbacks=[CustomCallback()],  # Add the custom callback here\n    shuffle=True\n)\n","metadata":{"execution":{"iopub.status.busy":"2024-07-08T05:10:53.982953Z","iopub.execute_input":"2024-07-08T05:10:53.983295Z","iopub.status.idle":"2024-07-08T06:02:22.246407Z","shell.execute_reply.started":"2024-07-08T05:10:53.983267Z","shell.execute_reply":"2024-07-08T06:02:22.245265Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.save(\"BERT_V22_s1.keras\")","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:02:52.280008Z","iopub.execute_input":"2024-07-08T06:02:52.280436Z","iopub.status.idle":"2024-07-08T06:02:53.017753Z","shell.execute_reply.started":"2024-07-08T06:02:52.280404Z","shell.execute_reply":"2024-07-08T06:02:53.016485Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"gc.collect()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:02:55.884728Z","iopub.execute_input":"2024-07-08T06:02:55.885696Z","iopub.status.idle":"2024-07-08T06:03:02.614319Z","shell.execute_reply.started":"2024-07-08T06:02:55.885655Z","shell.execute_reply":"2024-07-08T06:03:02.613292Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weights_test = np.ones((len(xt), 1))","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:02.616933Z","iopub.execute_input":"2024-07-08T06:03:02.61721Z","iopub.status.idle":"2024-07-08T06:03:02.621804Z","shell.execute_reply.started":"2024-07-08T06:03:02.617184Z","shell.execute_reply":"2024-07-08T06:03:02.620968Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yt=model.predict([xt.numpy(),weights_test], batch_size=batch_size)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:02.622774Z","iopub.execute_input":"2024-07-08T06:03:02.623042Z","iopub.status.idle":"2024-07-08T06:03:28.0408Z","shell.execute_reply.started":"2024-07-08T06:03:02.623015Z","shell.execute_reply":"2024-07-08T06:03:28.039734Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yt=yt[:,:-1]","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:28.046561Z","iopub.execute_input":"2024-07-08T06:03:28.04689Z","iopub.status.idle":"2024-07-08T06:03:28.051145Z","shell.execute_reply.started":"2024-07-08T06:03:28.046853Z","shell.execute_reply":"2024-07-08T06:03:28.05037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yt=(yt*np.array(y_std))+np.array(y_mean)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:28.052091Z","iopub.execute_input":"2024-07-08T06:03:28.052369Z","iopub.status.idle":"2024-07-08T06:03:29.135976Z","shell.execute_reply.started":"2024-07-08T06:03:28.052343Z","shell.execute_reply":"2024-07-08T06:03:29.134784Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yt=yt*np.array(ss)","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:29.137232Z","iopub.execute_input":"2024-07-08T06:03:29.137575Z","iopub.status.idle":"2024-07-08T06:03:29.769962Z","shell.execute_reply.started":"2024-07-08T06:03:29.137536Z","shell.execute_reply":"2024-07-08T06:03:29.768723Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yt[:,132:149]=yt_pred_132_148.numpy()","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:29.771092Z","iopub.execute_input":"2024-07-08T06:03:29.771409Z","iopub.status.idle":"2024-07-08T06:03:29.837389Z","shell.execute_reply.started":"2024-07-08T06:03:29.771379Z","shell.execute_reply":"2024-07-08T06:03:29.836299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub=pd.read_csv(\"/kaggle/input/leap-atmospheric-physics-ai-climsim/sample_submission.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:29.83861Z","iopub.execute_input":"2024-07-08T06:03:29.838909Z","iopub.status.idle":"2024-07-08T06:03:50.690681Z","shell.execute_reply.started":"2024-07-08T06:03:29.838879Z","shell.execute_reply":"2024-07-08T06:03:50.689322Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub.iloc[:,1:]=yt","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:50.692182Z","iopub.execute_input":"2024-07-08T06:03:50.692544Z","iopub.status.idle":"2024-07-08T06:03:58.036652Z","shell.execute_reply.started":"2024-07-08T06:03:50.692498Z","shell.execute_reply":"2024-07-08T06:03:58.03532Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pl.from_pandas(sub).write_csv(\"submission.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-07-08T06:03:58.038935Z","iopub.execute_input":"2024-07-08T06:03:58.039265Z","iopub.status.idle":"2024-07-08T06:04:43.97275Z","shell.execute_reply.started":"2024-07-08T06:03:58.039218Z","shell.execute_reply":"2024-07-08T06:04:43.971446Z"},"trusted":true},"execution_count":null,"outputs":[]}]}