You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3126 lines
502 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "b49e1760-bb2f-49c7-9b65-44960f9b3571",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import math\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9c0269c0-ebb6-4e08-875b-d65b3d80f7d7",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-05-12 10:01:17.237220: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1\n"
]
}
],
"source": [
"import tensorflow as tf\n",
"from tensorflow import keras\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.metrics import mean_squared_error, mean_absolute_error\n",
"from sklearn.metrics import roc_auc_score, RocCurveDisplay"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "6cecf819-5aac-4c5e-8099-2af286e34abd",
"metadata": {},
"outputs": [],
"source": [
"#Load the data\n",
"folder='/home/unipi/v.vichi3/Desktop/'\n",
"X_train, X_val, X_test, y_train, y_val, y_test=np.load(folder+'X_train.npy'), np.load(folder+'X_val.npy'), np.load(folder+'X_test.npy'), np.load(folder+'y_train.npy'), np.load(folder+'y_val.npy'), np.load(folder+'y_test.npy')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "49dac575-43c3-44ba-90a3-ba2869eb58eb",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-05-12 10:01:54.035011: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set\n",
"2024-05-12 10:01:54.035943: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1\n",
"2024-05-12 10:01:54.047761: E tensorflow/stream_executor/cuda/cuda_driver.cc:328] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected\n",
"2024-05-12 10:01:54.047780: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (a4-lab19): /proc/driver/nvidia/version does not exist\n",
"2024-05-12 10:01:54.048081: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA\n",
"To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
"2024-05-12 10:01:54.048625: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set\n"
]
}
],
"source": [
"#Define the model\n",
"model=keras.models.Sequential()\n",
"model.add(keras.layers.Dense(units=32,\n",
" activation=\"relu\",\n",
" input_dim=X_train.shape[1],\n",
" kernel_initializer=keras.initializers.RandomNormal(mean=0.0,stddev=0.1)))\n",
"model.add(keras.layers.Dense(units=32,\n",
" activation=\"sigmoid\",\n",
" kernel_initializer=keras.initializers.RandomNormal(mean=0.0,stddev=0.1)))\n",
"model.add(keras.layers.Dense(units=64,\n",
" activation=\"sigmoid\",\n",
" kernel_initializer=keras.initializers.RandomNormal(mean=0.0,stddev=0.1)))\n",
"model.add(keras.layers.Dense(units=1,\n",
" activation=\"relu\",\n",
" kernel_initializer=keras.initializers.RandomNormal(mean=0.0,stddev=0.1)))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "abbaf178-ecf4-4d52-bc24-52d49de137f3",
"metadata": {},
"outputs": [],
"source": [
"def r2_score(y_true, y_pred):\n",
" SS_res = keras.backend.sum(keras.backend.square( y_true-y_pred ))\n",
" SS_tot = keras.backend.sum(keras.backend.square( y_true - keras.backend.mean(y_true) ) )\n",
" return ( 1 - SS_res/(SS_tot + keras.backend.epsilon()) )"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "886b8252-ffc4-4de1-b1d1-966bdd3ba15b",
"metadata": {},
"outputs": [],
"source": [
"model.load_weights(folder+'nn_model1_1000epochs.h5')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "6c116269-1c09-469d-b107-5f5c525df0a3",
"metadata": {},
"outputs": [],
"source": [
"model.compile(\n",
" optimizer=\"adam\",\n",
" loss=\"mean_squared_error\",\n",
" metrics=[\"mean_absolute_error\",r2_score]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "5244e4cd-0a17-45a1-8a53-2e82deaf3f58",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Model: \"sequential\"\n",
"_________________________________________________________________\n",
"Layer (type) Output Shape Param # \n",
"=================================================================\n",
"dense (Dense) (None, 32) 192 \n",
"_________________________________________________________________\n",
"dense_1 (Dense) (None, 32) 1056 \n",
"_________________________________________________________________\n",
"dense_2 (Dense) (None, 64) 2112 \n",
"_________________________________________________________________\n",
"dense_3 (Dense) (None, 1) 65 \n",
"=================================================================\n",
"Total params: 3,425\n",
"Trainable params: 3,425\n",
"Non-trainable params: 0\n",
"_________________________________________________________________\n"
]
}
],
"source": [
"#Display the model's architecture\n",
"model.summary()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "90ae96fc-3764-407e-8fcd-0ac3d3d07e24",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 1/1637 [..............................] - ETA: 4:16 - loss: 8.4898e-05 - mean_absolute_error: 0.0074 - r2_score: 0.9951"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-05-12 10:02:04.694166: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)\n",
"2024-05-12 10:02:04.694441: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 3892690000 Hz\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"1637/1637 [==============================] - 1s 253us/step - loss: 1.0265e-04 - mean_absolute_error: 0.0073 - r2_score: 0.9932\n"
]
},
{
"data": {
"text/plain": [
"[0.00010416494478704408, 0.007332309614866972, 0.9931228756904602]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(X_test,y_test)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "f13eb2f1-8118-4808-bdd7-420f25e5248a",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 1/500\n",
"18750/18750 [==============================] - 8s 393us/step - loss: 2.4147e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9840 - val_loss: 2.1745e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9856\n",
"Epoch 2/500\n",
"18750/18750 [==============================] - 7s 384us/step - loss: 2.4598e-04 - mean_absolute_error: 0.0112 - r2_score: 0.9837 - val_loss: 2.0596e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9864\n",
"Epoch 3/500\n",
"18750/18750 [==============================] - 7s 389us/step - loss: 2.3998e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9841 - val_loss: 2.4425e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9839\n",
"Epoch 4/500\n",
"18750/18750 [==============================] - 7s 387us/step - loss: 2.3892e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9842 - val_loss: 1.8591e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9878\n",
"Epoch 5/500\n",
"18750/18750 [==============================] - 7s 382us/step - loss: 2.3697e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9844 - val_loss: 2.7226e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9820\n",
"Epoch 6/500\n",
"18750/18750 [==============================] - 7s 382us/step - loss: 2.4067e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9841 - val_loss: 2.6640e-04 - val_mean_absolute_error: 0.0120 - val_r2_score: 0.9824\n",
"Epoch 7/500\n",
"18750/18750 [==============================] - 7s 383us/step - loss: 2.4342e-04 - mean_absolute_error: 0.0111 - r2_score: 0.9839 - val_loss: 1.9361e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9873\n",
"Epoch 8/500\n",
"18750/18750 [==============================] - 8s 406us/step - loss: 2.3618e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9844 - val_loss: 1.9148e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9874\n",
"Epoch 9/500\n",
"18750/18750 [==============================] - 7s 387us/step - loss: 2.3705e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9843 - val_loss: 1.8227e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9880\n",
"Epoch 10/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.3720e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9843 - val_loss: 2.8300e-04 - val_mean_absolute_error: 0.0123 - val_r2_score: 0.9812\n",
"Epoch 11/500\n",
"18750/18750 [==============================] - 8s 401us/step - loss: 2.3581e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9844 - val_loss: 1.5858e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 12/500\n",
"18750/18750 [==============================] - 8s 400us/step - loss: 2.3420e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9846 - val_loss: 1.8181e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9880\n",
"Epoch 13/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.3380e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9845 - val_loss: 2.3095e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9849\n",
"Epoch 14/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.3374e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9846 - val_loss: 2.3746e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9846\n",
"Epoch 15/500\n",
"18750/18750 [==============================] - 7s 388us/step - loss: 2.3588e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9844 - val_loss: 1.8413e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9879\n",
"Epoch 16/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.3772e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9842 - val_loss: 2.5248e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9834\n",
"Epoch 17/500\n",
"18750/18750 [==============================] - 7s 386us/step - loss: 2.3437e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9845 - val_loss: 1.6079e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9895\n",
"Epoch 18/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.4294e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9840 - val_loss: 1.6717e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9890\n",
"Epoch 19/500\n",
"18750/18750 [==============================] - 7s 387us/step - loss: 2.3357e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 1.6934e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9889\n",
"Epoch 20/500\n",
"18750/18750 [==============================] - 8s 402us/step - loss: 2.3630e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9844 - val_loss: 2.2015e-04 - val_mean_absolute_error: 0.0112 - val_r2_score: 0.9854\n",
"Epoch 21/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.3163e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 2.0513e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9865\n",
"Epoch 22/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.3465e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9844 - val_loss: 2.9082e-04 - val_mean_absolute_error: 0.0131 - val_r2_score: 0.9808\n",
"Epoch 23/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.3996e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9841 - val_loss: 3.1719e-04 - val_mean_absolute_error: 0.0132 - val_r2_score: 0.9790\n",
"Epoch 24/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.3319e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 2.7639e-04 - val_mean_absolute_error: 0.0125 - val_r2_score: 0.9817\n",
"Epoch 25/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.2851e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9849 - val_loss: 1.8782e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9877\n",
"Epoch 26/500\n",
"18750/18750 [==============================] - 8s 400us/step - loss: 2.3122e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 1.7076e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9888\n",
"Epoch 27/500\n",
"18750/18750 [==============================] - 8s 400us/step - loss: 2.3099e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 2.7527e-04 - val_mean_absolute_error: 0.0120 - val_r2_score: 0.9818\n",
"Epoch 28/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.2881e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9849 - val_loss: 4.2009e-04 - val_mean_absolute_error: 0.0154 - val_r2_score: 0.9722\n",
"Epoch 29/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.3413e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9845 - val_loss: 3.7911e-04 - val_mean_absolute_error: 0.0138 - val_r2_score: 0.9749\n",
"Epoch 30/500\n",
"18750/18750 [==============================] - 7s 391us/step - loss: 2.2946e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9848 - val_loss: 1.9619e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9871\n",
"Epoch 31/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.3257e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 1.5597e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9898\n",
"Epoch 32/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.2773e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9849 - val_loss: 1.4662e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9904\n",
"Epoch 33/500\n",
"18750/18750 [==============================] - 7s 400us/step - loss: 2.3321e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 3.3411e-04 - val_mean_absolute_error: 0.0126 - val_r2_score: 0.9778\n",
"Epoch 34/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.2646e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9850 - val_loss: 2.0536e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9865\n",
"Epoch 35/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.2997e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9848 - val_loss: 1.8161e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9880\n",
"Epoch 36/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.3087e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9848 - val_loss: 3.7053e-04 - val_mean_absolute_error: 0.0146 - val_r2_score: 0.9757\n",
"Epoch 37/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.3304e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 2.5159e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9836\n",
"Epoch 38/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.3301e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9845 - val_loss: 3.9798e-04 - val_mean_absolute_error: 0.0136 - val_r2_score: 0.9738\n",
"Epoch 39/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.2696e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9850 - val_loss: 1.6641e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9890\n",
"Epoch 40/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.3131e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9847 - val_loss: 3.5746e-04 - val_mean_absolute_error: 0.0136 - val_r2_score: 0.9762\n",
"Epoch 41/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.2500e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9852 - val_loss: 6.0576e-04 - val_mean_absolute_error: 0.0167 - val_r2_score: 0.9602\n",
"Epoch 42/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2902e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9849 - val_loss: 1.7194e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9887\n",
"Epoch 43/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.2706e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9849 - val_loss: 2.3367e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9845\n",
"Epoch 44/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.3242e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 2.0060e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9868\n",
"Epoch 45/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.2993e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9848 - val_loss: 1.9677e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9870\n",
"Epoch 46/500\n",
"18750/18750 [==============================] - 8s 424us/step - loss: 2.3383e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9845 - val_loss: 1.9046e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9875\n",
"Epoch 47/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.3771e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9843 - val_loss: 1.9553e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9871\n",
"Epoch 48/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.3212e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 1.8431e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9879\n",
"Epoch 49/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.3257e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 1.7222e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9887\n",
"Epoch 50/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.3122e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 1.8888e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9876\n",
"Epoch 51/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.3583e-04 - mean_absolute_error: 0.0110 - r2_score: 0.9844 - val_loss: 2.2373e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9853\n",
"Epoch 52/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.2831e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9849 - val_loss: 1.8694e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9876\n",
"Epoch 53/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.2694e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9850 - val_loss: 2.5439e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9833\n",
"Epoch 54/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.3169e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9846 - val_loss: 2.6008e-04 - val_mean_absolute_error: 0.0117 - val_r2_score: 0.9828\n",
"Epoch 55/500\n",
"18750/18750 [==============================] - 8s 424us/step - loss: 2.2977e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9848 - val_loss: 2.5468e-04 - val_mean_absolute_error: 0.0117 - val_r2_score: 0.9832\n",
"Epoch 56/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.2820e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9850 - val_loss: 2.1271e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9861\n",
"Epoch 57/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2518e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9851 - val_loss: 3.9633e-04 - val_mean_absolute_error: 0.0143 - val_r2_score: 0.9737\n",
"Epoch 58/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.3175e-04 - mean_absolute_error: 0.0109 - r2_score: 0.9847 - val_loss: 2.5958e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9828\n",
"Epoch 59/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.3082e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9847 - val_loss: 2.9071e-04 - val_mean_absolute_error: 0.0121 - val_r2_score: 0.9809\n",
"Epoch 60/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.2590e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9851 - val_loss: 1.8773e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9876\n",
"Epoch 61/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.3050e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9848 - val_loss: 1.8520e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9878\n",
"Epoch 62/500\n",
"18750/18750 [==============================] - 7s 400us/step - loss: 2.3154e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9847 - val_loss: 2.5560e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9832\n",
"Epoch 63/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.2511e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9852 - val_loss: 1.6917e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9888\n",
"Epoch 64/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.2549e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9851 - val_loss: 1.6999e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9888\n",
"Epoch 65/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.2659e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9850 - val_loss: 2.0130e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9867\n",
"Epoch 66/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.2216e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9853 - val_loss: 2.0001e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9869\n",
"Epoch 67/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.2654e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9850 - val_loss: 1.8359e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9880\n",
"Epoch 68/500\n",
"18750/18750 [==============================] - 7s 388us/step - loss: 2.2860e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9849 - val_loss: 2.9827e-04 - val_mean_absolute_error: 0.0124 - val_r2_score: 0.9804\n",
"Epoch 69/500\n",
"18750/18750 [==============================] - 7s 388us/step - loss: 2.2310e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9852 - val_loss: 2.1468e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9858\n",
"Epoch 70/500\n",
"18750/18750 [==============================] - 7s 388us/step - loss: 2.2668e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9850 - val_loss: 2.7697e-04 - val_mean_absolute_error: 0.0122 - val_r2_score: 0.9818\n",
"Epoch 71/500\n",
"18750/18750 [==============================] - 7s 391us/step - loss: 2.2107e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 3.7984e-04 - val_mean_absolute_error: 0.0138 - val_r2_score: 0.9752\n",
"Epoch 72/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.2249e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9853 - val_loss: 1.9053e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9874\n",
"Epoch 73/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.2385e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9851 - val_loss: 2.2739e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9849\n",
"Epoch 74/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.2551e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9851 - val_loss: 3.0698e-04 - val_mean_absolute_error: 0.0122 - val_r2_score: 0.9798\n",
"Epoch 75/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.2022e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 6.3238e-04 - val_mean_absolute_error: 0.0186 - val_r2_score: 0.9583\n",
"Epoch 76/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1982e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 1.5889e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9896\n",
"Epoch 77/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.2305e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9852 - val_loss: 2.4724e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9837\n",
"Epoch 78/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.2090e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 1.8905e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9876\n",
"Epoch 79/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.2888e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9849 - val_loss: 1.5690e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9897\n",
"Epoch 80/500\n",
"18750/18750 [==============================] - 8s 423us/step - loss: 2.2349e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9852 - val_loss: 1.8198e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9881\n",
"Epoch 81/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.2270e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9853 - val_loss: 1.5526e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9898\n",
"Epoch 82/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1802e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 3.4445e-04 - val_mean_absolute_error: 0.0127 - val_r2_score: 0.9771\n",
"Epoch 83/500\n",
"18750/18750 [==============================] - 8s 422us/step - loss: 2.2298e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9853 - val_loss: 1.7723e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9884\n",
"Epoch 84/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1940e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9855 - val_loss: 5.5064e-04 - val_mean_absolute_error: 0.0156 - val_r2_score: 0.9637\n",
"Epoch 85/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2018e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9855 - val_loss: 1.3713e-04 - val_mean_absolute_error: 0.0083 - val_r2_score: 0.9910\n",
"Epoch 86/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.2560e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9850 - val_loss: 1.7417e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9885\n",
"Epoch 87/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.2159e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 1.5787e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9896\n",
"Epoch 88/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2178e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9853 - val_loss: 1.6455e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9891\n",
"Epoch 89/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.1836e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 1.6369e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9893\n",
"Epoch 90/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.1861e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9855 - val_loss: 1.6057e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9894\n",
"Epoch 91/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.2017e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 2.0354e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9865\n",
"Epoch 92/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.2182e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9853 - val_loss: 2.3351e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9847\n",
"Epoch 93/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.2117e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 2.0281e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9867\n",
"Epoch 94/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1932e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9855 - val_loss: 1.4232e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9906\n",
"Epoch 95/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1560e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 2.2920e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9849\n",
"Epoch 96/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.1779e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 3.0965e-04 - val_mean_absolute_error: 0.0132 - val_r2_score: 0.9795\n",
"Epoch 97/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.1537e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.8257e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9880\n",
"Epoch 98/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1518e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.8420e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9879\n",
"Epoch 99/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1816e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 1.8057e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9880\n",
"Epoch 100/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1709e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 2.0199e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9866\n",
"Epoch 101/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2034e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9855 - val_loss: 2.9039e-04 - val_mean_absolute_error: 0.0122 - val_r2_score: 0.9809\n",
"Epoch 102/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1561e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 2.0265e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9866\n",
"Epoch 103/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1649e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 2.6520e-04 - val_mean_absolute_error: 0.0126 - val_r2_score: 0.9824\n",
"Epoch 104/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1771e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 1.8645e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9877\n",
"Epoch 105/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1710e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 3.2952e-04 - val_mean_absolute_error: 0.0133 - val_r2_score: 0.9782\n",
"Epoch 106/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1714e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 1.8675e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9877\n",
"Epoch 107/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.2069e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9854 - val_loss: 1.8587e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9878\n",
"Epoch 108/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1700e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 2.4581e-04 - val_mean_absolute_error: 0.0112 - val_r2_score: 0.9838\n",
"Epoch 109/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1739e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 2.2065e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9854\n",
"Epoch 110/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.1234e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.8639e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9877\n",
"Epoch 111/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1715e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 2.0400e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9865\n",
"Epoch 112/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.2249e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9853 - val_loss: 2.2981e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9849\n",
"Epoch 113/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1455e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 2.5602e-04 - val_mean_absolute_error: 0.0118 - val_r2_score: 0.9831\n",
"Epoch 114/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1649e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 1.6037e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9895\n",
"Epoch 115/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1735e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 1.5419e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9899\n",
"Epoch 116/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.1161e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.5796e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9896\n",
"Epoch 117/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1383e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 1.5995e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9895\n",
"Epoch 118/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1279e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.9386e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9872\n",
"Epoch 119/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1262e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 1.5334e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9899\n",
"Epoch 120/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1202e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.4067e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9907\n",
"Epoch 121/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1543e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 2.1505e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9858\n",
"Epoch 122/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1483e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9858 - val_loss: 3.0713e-04 - val_mean_absolute_error: 0.0127 - val_r2_score: 0.9798\n",
"Epoch 123/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1609e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9857 - val_loss: 1.8326e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9880\n",
"Epoch 124/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1045e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.1025e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9861\n",
"Epoch 125/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1352e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 2.0344e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9867\n",
"Epoch 126/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1242e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 2.5437e-04 - val_mean_absolute_error: 0.0115 - val_r2_score: 0.9834\n",
"Epoch 127/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1550e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9857 - val_loss: 1.6351e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9893\n",
"Epoch 128/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1497e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9858 - val_loss: 1.4996e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9901\n",
"Epoch 129/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1034e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.4427e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9840\n",
"Epoch 130/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.1370e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 2.1712e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9857\n",
"Epoch 131/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1214e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 2.2019e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9854\n",
"Epoch 132/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0842e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 2.4602e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9838\n",
"Epoch 133/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1002e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 3.2836e-04 - val_mean_absolute_error: 0.0134 - val_r2_score: 0.9785\n",
"Epoch 134/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1611e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9857 - val_loss: 1.6946e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9889\n",
"Epoch 135/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.1008e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.9785e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9869\n",
"Epoch 136/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.1465e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 1.6794e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9890\n",
"Epoch 137/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.1437e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9858 - val_loss: 2.0161e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9866\n",
"Epoch 138/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.1487e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9857 - val_loss: 1.9856e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9869\n",
"Epoch 139/500\n",
"18750/18750 [==============================] - 7s 389us/step - loss: 2.1287e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 2.4317e-04 - val_mean_absolute_error: 0.0110 - val_r2_score: 0.9841\n",
"Epoch 140/500\n",
"18750/18750 [==============================] - 7s 389us/step - loss: 2.1220e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.9317e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9873\n",
"Epoch 141/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1180e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 2.1602e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9858\n",
"Epoch 142/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.0978e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 1.7473e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9885\n",
"Epoch 143/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.1112e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 2.2977e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9850\n",
"Epoch 144/500\n",
"18750/18750 [==============================] - 7s 391us/step - loss: 2.0981e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.4950e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9836\n",
"Epoch 145/500\n",
"18750/18750 [==============================] - 7s 391us/step - loss: 2.1157e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9860 - val_loss: 1.8358e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9879\n",
"Epoch 146/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.1046e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.5758e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9830\n",
"Epoch 147/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.1083e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.1536e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9859\n",
"Epoch 148/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1047e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.6502e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9892\n",
"Epoch 149/500\n",
"18750/18750 [==============================] - 7s 391us/step - loss: 2.1416e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9858 - val_loss: 2.6188e-04 - val_mean_absolute_error: 0.0112 - val_r2_score: 0.9830\n",
"Epoch 150/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1367e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 1.9969e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9868\n",
"Epoch 151/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0924e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 2.0874e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9862\n",
"Epoch 152/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.0890e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 2.6805e-04 - val_mean_absolute_error: 0.0118 - val_r2_score: 0.9824\n",
"Epoch 153/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0958e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.0754e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9863\n",
"Epoch 154/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1262e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.6960e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9888\n",
"Epoch 155/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0787e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.6243e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9893\n",
"Epoch 156/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1004e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 1.8292e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9881\n",
"Epoch 157/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0942e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 3.1016e-04 - val_mean_absolute_error: 0.0126 - val_r2_score: 0.9796\n",
"Epoch 158/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.1020e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 1.3930e-04 - val_mean_absolute_error: 0.0083 - val_r2_score: 0.9909\n",
"Epoch 159/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0296e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.5838e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9896\n",
"Epoch 160/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1067e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 1.6689e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9890\n",
"Epoch 161/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0665e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.7574e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9885\n",
"Epoch 162/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0581e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.9030e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9875\n",
"Epoch 163/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.0797e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.8410e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9879\n",
"Epoch 164/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.0690e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 1.6847e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9889\n",
"Epoch 165/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0904e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 3.0552e-04 - val_mean_absolute_error: 0.0129 - val_r2_score: 0.9797\n",
"Epoch 166/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.1079e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.0496e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9865\n",
"Epoch 167/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.0867e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 1.5151e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9900\n",
"Epoch 168/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0695e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.5236e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9900\n",
"Epoch 169/500\n",
"18750/18750 [==============================] - 8s 422us/step - loss: 2.0755e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.8963e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9875\n",
"Epoch 170/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0652e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.6038e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9894\n",
"Epoch 171/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.0488e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.4526e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9905\n",
"Epoch 172/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0631e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 1.8382e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9879\n",
"Epoch 173/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0643e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 1.7316e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9887\n",
"Epoch 174/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0698e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 2.2814e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9848\n",
"Epoch 175/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.0505e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.5427e-04 - val_mean_absolute_error: 0.0119 - val_r2_score: 0.9832\n",
"Epoch 176/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1037e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.2106e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9854\n",
"Epoch 177/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0780e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 1.8569e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9879\n",
"Epoch 178/500\n",
"18750/18750 [==============================] - 8s 429us/step - loss: 2.1071e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 1.8040e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9881\n",
"Epoch 179/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1483e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.7886e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9883\n",
"Epoch 180/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1729e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 2.9776e-04 - val_mean_absolute_error: 0.0128 - val_r2_score: 0.9803\n",
"Epoch 181/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.0812e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 1.6460e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9892\n",
"Epoch 182/500\n",
"18750/18750 [==============================] - 8s 421us/step - loss: 2.0670e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 2.5581e-04 - val_mean_absolute_error: 0.0123 - val_r2_score: 0.9830\n",
"Epoch 183/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0118e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 2.3395e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9845\n",
"Epoch 184/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0434e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.8383e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9879\n",
"Epoch 185/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.0421e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.6686e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 186/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0335e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.1468e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9859\n",
"Epoch 187/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.0973e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9861 - val_loss: 2.0780e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9863\n",
"Epoch 188/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0483e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.3762e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9843\n",
"Epoch 189/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0251e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 3.2795e-04 - val_mean_absolute_error: 0.0142 - val_r2_score: 0.9783\n",
"Epoch 190/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0639e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 2.3750e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9843\n",
"Epoch 191/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0486e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.6741e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9890\n",
"Epoch 192/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0727e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 1.9707e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9870\n",
"Epoch 193/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0364e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.4218e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9839\n",
"Epoch 194/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.0105e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.3498e-04 - val_mean_absolute_error: 0.0083 - val_r2_score: 0.9912\n",
"Epoch 195/500\n",
"18750/18750 [==============================] - 8s 421us/step - loss: 2.0751e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 1.9173e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9873\n",
"Epoch 196/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0318e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.7318e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9886\n",
"Epoch 197/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0365e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.5063e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9902\n",
"Epoch 198/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0917e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9862 - val_loss: 1.7966e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9882\n",
"Epoch 199/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0305e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.8913e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9875\n",
"Epoch 200/500\n",
"18750/18750 [==============================] - 8s 421us/step - loss: 2.0434e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.5125e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9900\n",
"Epoch 201/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.0202e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.4417e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9905\n",
"Epoch 202/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0213e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.8393e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9879\n",
"Epoch 203/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.0198e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.4781e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9903\n",
"Epoch 204/500\n",
"18750/18750 [==============================] - 8s 404us/step - loss: 2.0101e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 2.7047e-04 - val_mean_absolute_error: 0.0117 - val_r2_score: 0.9821\n",
"Epoch 205/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.0342e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.7647e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9884\n",
"Epoch 206/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0091e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.9813e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9869\n",
"Epoch 207/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0373e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.4984e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9901\n",
"Epoch 208/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 1.9907e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5979e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9895\n",
"Epoch 209/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.0139e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 2.0729e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9863\n",
"Epoch 210/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.0273e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.6816e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9889\n",
"Epoch 211/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0271e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.6544e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9891\n",
"Epoch 212/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0077e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.5621e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9897\n",
"Epoch 213/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0154e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.7787e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9885\n",
"Epoch 214/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.0159e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 2.7523e-04 - val_mean_absolute_error: 0.0124 - val_r2_score: 0.9819\n",
"Epoch 215/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 1.9850e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.3501e-04 - val_mean_absolute_error: 0.0082 - val_r2_score: 0.9912\n",
"Epoch 216/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.0391e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.9616e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9871\n",
"Epoch 217/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0246e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.5899e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9896\n",
"Epoch 218/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.0175e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.9491e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9872\n",
"Epoch 219/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0061e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 3.9419e-04 - val_mean_absolute_error: 0.0146 - val_r2_score: 0.9737\n",
"Epoch 220/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 1.9980e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 1.7929e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9883\n",
"Epoch 221/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0013e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.7121e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9887\n",
"Epoch 222/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 1.9916e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.6975e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9889\n",
"Epoch 223/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0418e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9865 - val_loss: 1.7855e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9883\n",
"Epoch 224/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 1.9885e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 2.1109e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9860\n",
"Epoch 225/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.0104e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.4623e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9904\n",
"Epoch 226/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0123e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 2.0507e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9866\n",
"Epoch 227/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 1.9973e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5933e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9895\n",
"Epoch 228/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0040e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 2.0593e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9864\n",
"Epoch 229/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 1.9847e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.6494e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9892\n",
"Epoch 230/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 1.9892e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.7422e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9885\n",
"Epoch 231/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0044e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 4.8424e-04 - val_mean_absolute_error: 0.0172 - val_r2_score: 0.9680\n",
"Epoch 232/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 1.9812e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.7937e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9882\n",
"Epoch 233/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0317e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.6990e-04 - val_mean_absolute_error: 0.0127 - val_r2_score: 0.9821\n",
"Epoch 234/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 1.9945e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 6.3975e-04 - val_mean_absolute_error: 0.0184 - val_r2_score: 0.9579\n",
"Epoch 235/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0047e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.9859e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9870\n",
"Epoch 236/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 2.0108e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.9995e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9868\n",
"Epoch 237/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0023e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 2.2379e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9856\n",
"Epoch 238/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 1.9701e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 3.2750e-04 - val_mean_absolute_error: 0.0127 - val_r2_score: 0.9784\n",
"Epoch 239/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 1.9951e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.4681e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9904\n",
"Epoch 240/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.0127e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.8805e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9876\n",
"Epoch 241/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 1.9646e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.4899e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9902\n",
"Epoch 242/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 1.9837e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.5362e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9899\n",
"Epoch 243/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 1.9927e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.4819e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9903\n",
"Epoch 244/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 1.9817e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 1.4602e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9904\n",
"Epoch 245/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 1.9809e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.4179e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9907\n",
"Epoch 246/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 1.9766e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.4565e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9905\n",
"Epoch 247/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 1.9986e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 1.5946e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9895\n",
"Epoch 248/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0258e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.8918e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9876\n",
"Epoch 249/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 1.9960e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.6536e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9892\n",
"Epoch 250/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 1.9832e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.5631e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9897\n",
"Epoch 251/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0156e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.5764e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9896\n",
"Epoch 252/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 1.9708e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.6328e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9892\n",
"Epoch 253/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 1.9931e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 1.6282e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9893\n",
"Epoch 254/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 1.9726e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 2.7173e-04 - val_mean_absolute_error: 0.0120 - val_r2_score: 0.9823\n",
"Epoch 255/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 1.9906e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.9092e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9874\n",
"Epoch 256/500\n",
"18750/18750 [==============================] - 8s 418us/step - loss: 1.9731e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.8191e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9880\n",
"Epoch 257/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 1.9925e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9868 - val_loss: 1.8220e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9881\n",
"Epoch 258/500\n",
"18750/18750 [==============================] - 8s 430us/step - loss: 1.9533e-04 - mean_absolute_error: 0.0099 - r2_score: 0.9871 - val_loss: 2.0540e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9864\n",
"Epoch 259/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 1.9825e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.5711e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9897\n",
"Epoch 260/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 1.9677e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.7581e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9884\n",
"Epoch 261/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 1.9746e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.8421e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9878\n",
"Epoch 262/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 1.9640e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.5289e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9900\n",
"Epoch 263/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 1.9705e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.9824e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9869\n",
"Epoch 264/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 1.9848e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 2.6069e-04 - val_mean_absolute_error: 0.0119 - val_r2_score: 0.9829\n",
"Epoch 265/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 1.9658e-04 - mean_absolute_error: 0.0099 - r2_score: 0.9870 - val_loss: 1.6491e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9892\n",
"Epoch 266/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.2048e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9854 - val_loss: 2.0106e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9868\n",
"Epoch 267/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.2021e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9855 - val_loss: 2.0591e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9864\n",
"Epoch 268/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.1939e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9855 - val_loss: 2.0058e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9868\n",
"Epoch 269/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.1856e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9856 - val_loss: 2.0974e-04 - val_mean_absolute_error: 0.0110 - val_r2_score: 0.9862\n",
"Epoch 270/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.1500e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9858 - val_loss: 2.7448e-04 - val_mean_absolute_error: 0.0126 - val_r2_score: 0.9820\n",
"Epoch 271/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1804e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9855 - val_loss: 1.8487e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9879\n",
"Epoch 272/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1933e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9855 - val_loss: 1.5974e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9895\n",
"Epoch 273/500\n",
"18750/18750 [==============================] - 8s 424us/step - loss: 2.1742e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9856 - val_loss: 1.9611e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9871\n",
"Epoch 274/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.1557e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9858 - val_loss: 2.4726e-04 - val_mean_absolute_error: 0.0119 - val_r2_score: 0.9835\n",
"Epoch 275/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1664e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9857 - val_loss: 2.1269e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9860\n",
"Epoch 276/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.1740e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9857 - val_loss: 2.1595e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9859\n",
"Epoch 277/500\n",
"18750/18750 [==============================] - 8s 406us/step - loss: 2.1502e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9858 - val_loss: 1.5271e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9899\n",
"Epoch 278/500\n",
"18750/18750 [==============================] - 8s 405us/step - loss: 2.1242e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 1.9381e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9872\n",
"Epoch 279/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1162e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.6721e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 280/500\n",
"18750/18750 [==============================] - 8s 402us/step - loss: 2.1231e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 2.5432e-04 - val_mean_absolute_error: 0.0114 - val_r2_score: 0.9832\n",
"Epoch 281/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.1707e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9857 - val_loss: 1.8981e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9874\n",
"Epoch 282/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1367e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.9248e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9873\n",
"Epoch 283/500\n",
"18750/18750 [==============================] - 8s 408us/step - loss: 2.1364e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 1.9865e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9869\n",
"Epoch 284/500\n",
"18750/18750 [==============================] - 8s 406us/step - loss: 2.1432e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 2.0639e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9863\n",
"Epoch 285/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.0918e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.9375e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9873\n",
"Epoch 286/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.1250e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.8735e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9877\n",
"Epoch 287/500\n",
"18750/18750 [==============================] - 8s 424us/step - loss: 2.1407e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.8643e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9877\n",
"Epoch 288/500\n",
"18750/18750 [==============================] - 8s 423us/step - loss: 2.1218e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 2.9111e-04 - val_mean_absolute_error: 0.0127 - val_r2_score: 0.9808\n",
"Epoch 289/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.0965e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.9763e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9870\n",
"Epoch 290/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1110e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9861 - val_loss: 1.8963e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9874\n",
"Epoch 291/500\n",
"18750/18750 [==============================] - 8s 425us/step - loss: 2.1374e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 2.0763e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9863\n",
"Epoch 292/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.1224e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 2.3564e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9844\n",
"Epoch 293/500\n",
"18750/18750 [==============================] - 8s 420us/step - loss: 2.0973e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.6810e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 294/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.0919e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.0283e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9867\n",
"Epoch 295/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0844e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.8256e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9880\n",
"Epoch 296/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1052e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.6689e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9891\n",
"Epoch 297/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.1155e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.6760e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 298/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1194e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 2.1550e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9858\n",
"Epoch 299/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.0905e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.8876e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9875\n",
"Epoch 300/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1546e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 2.6396e-04 - val_mean_absolute_error: 0.0115 - val_r2_score: 0.9824\n",
"Epoch 301/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.1106e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9861 - val_loss: 2.5284e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9832\n",
"Epoch 302/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1416e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 3.3181e-04 - val_mean_absolute_error: 0.0136 - val_r2_score: 0.9783\n",
"Epoch 303/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.1036e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 3.9057e-04 - val_mean_absolute_error: 0.0146 - val_r2_score: 0.9739\n",
"Epoch 304/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.1081e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.5099e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9901\n",
"Epoch 305/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.1175e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.8640e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9877\n",
"Epoch 306/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1628e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9857 - val_loss: 1.6526e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9891\n",
"Epoch 307/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.1103e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.9160e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9874\n",
"Epoch 308/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0960e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 2.0245e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9867\n",
"Epoch 309/500\n",
"18750/18750 [==============================] - 8s 407us/step - loss: 2.0992e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 1.8225e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9880\n",
"Epoch 310/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0915e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.5745e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9897\n",
"Epoch 311/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.1138e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.6470e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9892\n",
"Epoch 312/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1178e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9859 - val_loss: 1.7880e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9883\n",
"Epoch 313/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.1029e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.0264e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9867\n",
"Epoch 314/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.2100e-04 - mean_absolute_error: 0.0106 - r2_score: 0.9854 - val_loss: 2.2204e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9853\n",
"Epoch 315/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1152e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.8182e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9881\n",
"Epoch 316/500\n",
"18750/18750 [==============================] - 8s 413us/step - loss: 2.1474e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9858 - val_loss: 1.9883e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9869\n",
"Epoch 317/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.1226e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9860 - val_loss: 1.7869e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9883\n",
"Epoch 318/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0867e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 2.1432e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9858\n",
"Epoch 319/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1046e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.0435e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9865\n",
"Epoch 320/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0863e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.6038e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9895\n",
"Epoch 321/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.1337e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9859 - val_loss: 4.1181e-04 - val_mean_absolute_error: 0.0158 - val_r2_score: 0.9726\n",
"Epoch 322/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.0829e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.6627e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9891\n",
"Epoch 323/500\n",
"18750/18750 [==============================] - 7s 390us/step - loss: 2.0761e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9863 - val_loss: 1.9784e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9870\n",
"Epoch 324/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.1009e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.1280e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9859\n",
"Epoch 325/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0971e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.1423e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9859\n",
"Epoch 326/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1453e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.6852e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 327/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.1049e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.7842e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9882\n",
"Epoch 328/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.5571e-04 - mean_absolute_error: 0.0108 - r2_score: 0.9832 - val_loss: 2.5482e-04 - val_mean_absolute_error: 0.0115 - val_r2_score: 0.9835\n",
"Epoch 329/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.1102e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 2.0569e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9864\n",
"Epoch 330/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.1162e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9860 - val_loss: 1.7741e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9882\n",
"Epoch 331/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0807e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 1.9892e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9868\n",
"Epoch 332/500\n",
"18750/18750 [==============================] - 8s 419us/step - loss: 2.0631e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.8802e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9876\n",
"Epoch 333/500\n",
"18750/18750 [==============================] - 8s 409us/step - loss: 2.0675e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.6252e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9893\n",
"Epoch 334/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.1996e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9855 - val_loss: 1.6866e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9889\n",
"Epoch 335/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0537e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 2.1574e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9859\n",
"Epoch 336/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0765e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.8079e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9881\n",
"Epoch 337/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0786e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.8777e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9878\n",
"Epoch 338/500\n",
"18750/18750 [==============================] - 8s 412us/step - loss: 2.0868e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 2.4778e-04 - val_mean_absolute_error: 0.0115 - val_r2_score: 0.9836\n",
"Epoch 339/500\n",
"18750/18750 [==============================] - 8s 414us/step - loss: 2.0867e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 1.7080e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9887\n",
"Epoch 340/500\n",
"18750/18750 [==============================] - 8s 417us/step - loss: 2.0835e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9862 - val_loss: 1.9902e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9869\n",
"Epoch 341/500\n",
"18750/18750 [==============================] - 8s 415us/step - loss: 2.2202e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9854 - val_loss: 2.0233e-04 - val_mean_absolute_error: 0.0103 - val_r2_score: 0.9867\n",
"Epoch 342/500\n",
"18750/18750 [==============================] - 8s 416us/step - loss: 2.1504e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9858 - val_loss: 1.9137e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9874\n",
"Epoch 343/500\n",
"18750/18750 [==============================] - 8s 410us/step - loss: 2.1083e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9861 - val_loss: 2.1664e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9858\n",
"Epoch 344/500\n",
"18750/18750 [==============================] - 8s 411us/step - loss: 2.0825e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9862 - val_loss: 2.5606e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9831\n",
"Epoch 345/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0870e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.5814e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9897\n",
"Epoch 346/500\n",
"18750/18750 [==============================] - 8s 404us/step - loss: 2.2619e-04 - mean_absolute_error: 0.0107 - r2_score: 0.9850 - val_loss: 1.7503e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9884\n",
"Epoch 347/500\n",
"18750/18750 [==============================] - 8s 402us/step - loss: 2.1817e-04 - mean_absolute_error: 0.0105 - r2_score: 0.9856 - val_loss: 1.5994e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9895\n",
"Epoch 348/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0616e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 3.2075e-04 - val_mean_absolute_error: 0.0128 - val_r2_score: 0.9788\n",
"Epoch 349/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0702e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.7284e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9887\n",
"Epoch 350/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0664e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.5868e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 351/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0317e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0169e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9867\n",
"Epoch 352/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.1596e-04 - mean_absolute_error: 0.0104 - r2_score: 0.9857 - val_loss: 1.6245e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9894\n",
"Epoch 353/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0483e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9865 - val_loss: 1.8677e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9877\n",
"Epoch 354/500\n",
"18750/18750 [==============================] - 8s 403us/step - loss: 2.0425e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9865 - val_loss: 2.0279e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9866\n",
"Epoch 355/500\n",
"18750/18750 [==============================] - 8s 401us/step - loss: 2.0377e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.8546e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9878\n",
"Epoch 356/500\n",
"18750/18750 [==============================] - 8s 401us/step - loss: 2.0478e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9865 - val_loss: 1.7120e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9887\n",
"Epoch 357/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0533e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.5191e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9900\n",
"Epoch 358/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0296e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.0260e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9866\n",
"Epoch 359/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0537e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.5889e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9896\n",
"Epoch 360/500\n",
"18750/18750 [==============================] - 7s 400us/step - loss: 2.0421e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.8623e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9878\n",
"Epoch 361/500\n",
"18750/18750 [==============================] - 8s 406us/step - loss: 2.0309e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.6677e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9824\n",
"Epoch 362/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0447e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.6374e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9892\n",
"Epoch 363/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0643e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 2.0272e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9867\n",
"Epoch 364/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0458e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0555e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9863\n",
"Epoch 365/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0528e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9865 - val_loss: 1.7071e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9888\n",
"Epoch 366/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0361e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.5404e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9899\n",
"Epoch 367/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.0370e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0799e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9863\n",
"Epoch 368/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0488e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9865 - val_loss: 1.9782e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9870\n",
"Epoch 369/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0533e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 1.5016e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9901\n",
"Epoch 370/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0693e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9863 - val_loss: 1.7710e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9883\n",
"Epoch 371/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0637e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 2.5733e-04 - val_mean_absolute_error: 0.0113 - val_r2_score: 0.9831\n",
"Epoch 372/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0389e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0806e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9863\n",
"Epoch 373/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0230e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.9223e-04 - val_mean_absolute_error: 0.0102 - val_r2_score: 0.9873\n",
"Epoch 374/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0561e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 1.7095e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9889\n",
"Epoch 375/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0630e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9863 - val_loss: 1.6054e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9894\n",
"Epoch 376/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0117e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 2.2196e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9853\n",
"Epoch 377/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0231e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 1.7944e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9882\n",
"Epoch 378/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0205e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.8500e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9878\n",
"Epoch 379/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0335e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.7730e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9883\n",
"Epoch 380/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0620e-04 - mean_absolute_error: 0.0103 - r2_score: 0.9864 - val_loss: 1.6536e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9891\n",
"Epoch 381/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0168e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.2794e-04 - val_mean_absolute_error: 0.0110 - val_r2_score: 0.9850\n",
"Epoch 382/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9982e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5886e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 383/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0294e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.1207e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9860\n",
"Epoch 384/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0614e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9864 - val_loss: 1.5206e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9900\n",
"Epoch 385/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 2.0297e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.8117e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9881\n",
"Epoch 386/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0398e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.7395e-04 - val_mean_absolute_error: 0.0129 - val_r2_score: 0.9820\n",
"Epoch 387/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0147e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 2.7730e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9820\n",
"Epoch 388/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9891e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.5750e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9897\n",
"Epoch 389/500\n",
"18750/18750 [==============================] - 8s 401us/step - loss: 1.9932e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5565e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9898\n",
"Epoch 390/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0488e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.4642e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9837\n",
"Epoch 391/500\n",
"18750/18750 [==============================] - 7s 399us/step - loss: 2.0428e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0118e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9867\n",
"Epoch 392/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0301e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 2.0198e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9867\n",
"Epoch 393/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0281e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.6845e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9890\n",
"Epoch 394/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0317e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.5192e-04 - val_mean_absolute_error: 0.0122 - val_r2_score: 0.9833\n",
"Epoch 395/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0252e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 2.2945e-04 - val_mean_absolute_error: 0.0106 - val_r2_score: 0.9850\n",
"Epoch 396/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0009e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 2.2315e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9853\n",
"Epoch 397/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0284e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.6890e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9889\n",
"Epoch 398/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0450e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.7637e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9883\n",
"Epoch 399/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0227e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.9290e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9874\n",
"Epoch 400/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0070e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9868 - val_loss: 1.6930e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9888\n",
"Epoch 401/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0087e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.4508e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9905\n",
"Epoch 402/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0244e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 3.4619e-04 - val_mean_absolute_error: 0.0141 - val_r2_score: 0.9768\n",
"Epoch 403/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0364e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 3.2165e-04 - val_mean_absolute_error: 0.0133 - val_r2_score: 0.9790\n",
"Epoch 404/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0000e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 3.1398e-04 - val_mean_absolute_error: 0.0132 - val_r2_score: 0.9791\n",
"Epoch 405/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0208e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 3.3675e-04 - val_mean_absolute_error: 0.0131 - val_r2_score: 0.9780\n",
"Epoch 406/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0201e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 2.0691e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9863\n",
"Epoch 407/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0159e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 1.7220e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9887\n",
"Epoch 408/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0166e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 1.4842e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9902\n",
"Epoch 409/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0181e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.7104e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9888\n",
"Epoch 410/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 2.0212e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.5071e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9901\n",
"Epoch 411/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0399e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.5884e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9895\n",
"Epoch 412/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0079e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.7583e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9885\n",
"Epoch 413/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0083e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.5253e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9900\n",
"Epoch 414/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0260e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.4208e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9906\n",
"Epoch 415/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0199e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9866 - val_loss: 1.7346e-04 - val_mean_absolute_error: 0.0097 - val_r2_score: 0.9886\n",
"Epoch 416/500\n",
"18750/18750 [==============================] - 7s 400us/step - loss: 2.0415e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.5566e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9898\n",
"Epoch 417/500\n",
"18750/18750 [==============================] - 8s 400us/step - loss: 1.9870e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.3881e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9909\n",
"Epoch 418/500\n",
"18750/18750 [==============================] - 7s 398us/step - loss: 2.0094e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 2.5089e-04 - val_mean_absolute_error: 0.0112 - val_r2_score: 0.9834\n",
"Epoch 419/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0098e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.4148e-04 - val_mean_absolute_error: 0.0085 - val_r2_score: 0.9907\n",
"Epoch 420/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9923e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.4879e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9902\n",
"Epoch 421/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9978e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 2.0377e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9866\n",
"Epoch 422/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0312e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9866 - val_loss: 1.7829e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9883\n",
"Epoch 423/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 1.9989e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5328e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9899\n",
"Epoch 424/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0064e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9867 - val_loss: 1.6233e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9893\n",
"Epoch 425/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9876e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.8738e-04 - val_mean_absolute_error: 0.0101 - val_r2_score: 0.9876\n",
"Epoch 426/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9714e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 2.2778e-04 - val_mean_absolute_error: 0.0108 - val_r2_score: 0.9850\n",
"Epoch 427/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0154e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 2.6332e-04 - val_mean_absolute_error: 0.0120 - val_r2_score: 0.9828\n",
"Epoch 428/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9851e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.6235e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9893\n",
"Epoch 429/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 2.0308e-04 - mean_absolute_error: 0.0102 - r2_score: 0.9865 - val_loss: 1.6657e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 430/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9857e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.8417e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9879\n",
"Epoch 431/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0157e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.5937e-04 - val_mean_absolute_error: 0.0089 - val_r2_score: 0.9895\n",
"Epoch 432/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9921e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.6502e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9891\n",
"Epoch 433/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9840e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.7841e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9883\n",
"Epoch 434/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9926e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 2.0741e-04 - val_mean_absolute_error: 0.0110 - val_r2_score: 0.9864\n",
"Epoch 435/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9813e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 2.4040e-04 - val_mean_absolute_error: 0.0110 - val_r2_score: 0.9841\n",
"Epoch 436/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9961e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.8369e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9878\n",
"Epoch 437/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9827e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.8045e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9881\n",
"Epoch 438/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9949e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.6097e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9894\n",
"Epoch 439/500\n",
"18750/18750 [==============================] - 7s 392us/step - loss: 1.9834e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 3.8313e-04 - val_mean_absolute_error: 0.0141 - val_r2_score: 0.9746\n",
"Epoch 440/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9981e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.7169e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9887\n",
"Epoch 441/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9930e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 2.3970e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9843\n",
"Epoch 442/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9657e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.9008e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9875\n",
"Epoch 443/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9842e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.6552e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9891\n",
"Epoch 444/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9725e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.7081e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9887\n",
"Epoch 445/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9736e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.7214e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9887\n",
"Epoch 446/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9752e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.8913e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9875\n",
"Epoch 447/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9431e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 3.1648e-04 - val_mean_absolute_error: 0.0121 - val_r2_score: 0.9793\n",
"Epoch 448/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 2.0080e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 2.5420e-04 - val_mean_absolute_error: 0.0119 - val_r2_score: 0.9831\n",
"Epoch 449/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9659e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9870 - val_loss: 1.8440e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9879\n",
"Epoch 450/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9554e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.7583e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9885\n",
"Epoch 451/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9820e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.5884e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 452/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9602e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 3.4684e-04 - val_mean_absolute_error: 0.0135 - val_r2_score: 0.9769\n",
"Epoch 453/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9766e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.5777e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 454/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 2.0063e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9867 - val_loss: 1.6049e-04 - val_mean_absolute_error: 0.0088 - val_r2_score: 0.9895\n",
"Epoch 455/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9788e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.6566e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9891\n",
"Epoch 456/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9711e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9870 - val_loss: 3.2117e-04 - val_mean_absolute_error: 0.0131 - val_r2_score: 0.9787\n",
"Epoch 457/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9924e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.5046e-04 - val_mean_absolute_error: 0.0091 - val_r2_score: 0.9901\n",
"Epoch 458/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9969e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.9762e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9869\n",
"Epoch 459/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9792e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.6758e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9890\n",
"Epoch 460/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9940e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 3.1736e-04 - val_mean_absolute_error: 0.0129 - val_r2_score: 0.9790\n",
"Epoch 461/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9625e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 3.0707e-04 - val_mean_absolute_error: 0.0135 - val_r2_score: 0.9797\n",
"Epoch 462/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9822e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9869 - val_loss: 1.9965e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9869\n",
"Epoch 463/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9358e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 1.6950e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9889\n",
"Epoch 464/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9651e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 2.1258e-04 - val_mean_absolute_error: 0.0107 - val_r2_score: 0.9860\n",
"Epoch 465/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9734e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.8599e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9878\n",
"Epoch 466/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9563e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.7825e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9883\n",
"Epoch 467/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9686e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.3656e-04 - val_mean_absolute_error: 0.0082 - val_r2_score: 0.9910\n",
"Epoch 468/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9988e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.8137e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9880\n",
"Epoch 469/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9826e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.4599e-04 - val_mean_absolute_error: 0.0086 - val_r2_score: 0.9904\n",
"Epoch 470/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9559e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.5504e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9898\n",
"Epoch 471/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9740e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.5130e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9900\n",
"Epoch 472/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 2.0086e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9867 - val_loss: 2.0268e-04 - val_mean_absolute_error: 0.0105 - val_r2_score: 0.9866\n",
"Epoch 473/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9388e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 1.3202e-04 - val_mean_absolute_error: 0.0082 - val_r2_score: 0.9913\n",
"Epoch 474/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9442e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 2.4126e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9840\n",
"Epoch 475/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9878e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.9979e-04 - val_mean_absolute_error: 0.0099 - val_r2_score: 0.9868\n",
"Epoch 476/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9543e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.8494e-04 - val_mean_absolute_error: 0.0095 - val_r2_score: 0.9879\n",
"Epoch 477/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9673e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.5122e-04 - val_mean_absolute_error: 0.0087 - val_r2_score: 0.9901\n",
"Epoch 478/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9727e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.9779e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9872\n",
"Epoch 479/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9497e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.8822e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9877\n",
"Epoch 480/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9586e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.3897e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9909\n",
"Epoch 481/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9679e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.9391e-04 - val_mean_absolute_error: 0.0104 - val_r2_score: 0.9872\n",
"Epoch 482/500\n",
"18750/18750 [==============================] - 7s 397us/step - loss: 1.9807e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 2.3741e-04 - val_mean_absolute_error: 0.0112 - val_r2_score: 0.9843\n",
"Epoch 483/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9648e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.7585e-04 - val_mean_absolute_error: 0.0094 - val_r2_score: 0.9885\n",
"Epoch 484/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9794e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.6669e-04 - val_mean_absolute_error: 0.0093 - val_r2_score: 0.9891\n",
"Epoch 485/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9685e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 1.9442e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9873\n",
"Epoch 486/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9356e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 2.6054e-04 - val_mean_absolute_error: 0.0109 - val_r2_score: 0.9832\n",
"Epoch 487/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9709e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 2.4525e-04 - val_mean_absolute_error: 0.0116 - val_r2_score: 0.9838\n",
"Epoch 488/500\n",
"18750/18750 [==============================] - 7s 396us/step - loss: 1.9573e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.7302e-04 - val_mean_absolute_error: 0.0096 - val_r2_score: 0.9886\n",
"Epoch 489/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9571e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.4382e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9906\n",
"Epoch 490/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9539e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.5850e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9896\n",
"Epoch 491/500\n",
"18750/18750 [==============================] - 7s 393us/step - loss: 1.9440e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 1.6654e-04 - val_mean_absolute_error: 0.0092 - val_r2_score: 0.9890\n",
"Epoch 492/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9648e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 2.3267e-04 - val_mean_absolute_error: 0.0111 - val_r2_score: 0.9846\n",
"Epoch 493/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9689e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9869 - val_loss: 1.7944e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9881\n",
"Epoch 494/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9231e-04 - mean_absolute_error: 0.0099 - r2_score: 0.9873 - val_loss: 1.3785e-04 - val_mean_absolute_error: 0.0084 - val_r2_score: 0.9909\n",
"Epoch 495/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9615e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 2.4649e-04 - val_mean_absolute_error: 0.0117 - val_r2_score: 0.9839\n",
"Epoch 496/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9358e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 1.7657e-04 - val_mean_absolute_error: 0.0098 - val_r2_score: 0.9884\n",
"Epoch 497/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9900e-04 - mean_absolute_error: 0.0101 - r2_score: 0.9868 - val_loss: 1.6527e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9891\n",
"Epoch 498/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9345e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9872 - val_loss: 1.5912e-04 - val_mean_absolute_error: 0.0090 - val_r2_score: 0.9895\n",
"Epoch 499/500\n",
"18750/18750 [==============================] - 7s 395us/step - loss: 1.9531e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9871 - val_loss: 1.9499e-04 - val_mean_absolute_error: 0.0100 - val_r2_score: 0.9871\n",
"Epoch 500/500\n",
"18750/18750 [==============================] - 7s 394us/step - loss: 1.9684e-04 - mean_absolute_error: 0.0100 - r2_score: 0.9870 - val_loss: 2.4936e-04 - val_mean_absolute_error: 0.0117 - val_r2_score: 0.9835\n",
"Model training time: 3793.7955465316772\n"
]
}
],
"source": [
"#Train the model\n",
"start=time.time()\n",
"history=model.fit(X_train,y_train,\n",
" validation_data=(X_val,y_val),\n",
" batch_size=32,\n",
" epochs=500)\n",
"end=time.time()-start\n",
"print(\"Model training time:\",end)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "4d34ec8b-2c98-433e-a8e6-1621f5f525ea",
"metadata": {},
"outputs": [],
"source": [
"#Save the trained model for future reference (if you want to reload the weights, you have to define a model with \n",
"#the same architecture and then write new_model.load_weights(folder+'nn_model1.h5'))\n",
"model.save(folder+'nn_model1_1000epochs.h5')"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "f178b0ac-85c0-4a59-95d4-dfa74fdc089a",
"metadata": {},
"outputs": [],
"source": [
"#We want to understand which are the most important features, i.e. what the NN bases its prediction on\n",
"w0 = model.weights[0].numpy()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "16450bb0-a1c0-4f16-b958-8b0511c9251c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"31.204111\n",
"83.64697\n",
"0.9327214\n",
"0.5049178\n",
"0.76805365\n"
]
}
],
"source": [
"for i in range(5):\n",
" print(np.linalg.norm(w0[i,:])) #we can see that the most important features are e, a; the angular variables are less important"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "2a0b3591-760e-464b-ae42-8140e88f0ec5",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkkAAAHFCAYAAADmGm0KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB4GUlEQVR4nO3dd3wU1frH8c/sppNCD6GHIh2EBBEQwQIIVxQb2LhgwR8q0lQsWLEgVvSCcFFAsSBeEUVBKVJECQhIk44EQkkMoSRAIGV3fn9MssmSAFlIsgn5vl+vfbGZPTNzdhKyT57znDOGaZomIiIiIuLG5u0OiIiIiJRECpJERERE8qEgSURERCQfCpJERERE8qEgSURERCQfCpJERERE8qEgSURERCQfCpJERERE8qEgSURERCQfCpJEpFh88sknGIaBYRgsXbo0z+umadKgQQMMw6BLly6Fem7DMHjppZc83m/Pnj0YhsEnn3xSoHbnOs/999/vapNbRkYG//3vf2nbti0VK1YkKCiIOnXqcPPNNzN79ux8z5Hf40Len4icm4+3OyAiZUtISAhTpkzJEwgtW7aMv//+m5CQEO90rBCEhITwySef8MILL2Cz5fwNeuLECf73v/8RGhpKSkqK2z79+vXj22+/ZdiwYbz88sv4+/uze/dufv75Z+bPn88tt9zi1v6xxx7j7rvvznPumjVrFs2bEinDFCSJSLHq27cvX3zxBRMmTCA0NNS1fcqUKbRv3z5PEFGa9O3bl48//phffvmFrl27urbPnDkTh8NB7969+fzzz13bY2NjmTlzJi+88AIvv/yya/t1113HwIEDcTqdec5Ru3ZtrrzyyqJ9IyICaLhNRIrZXXfdBcCMGTNc25KTk5k1axb3339/vvscOXKERx55hBo1auDn50e9evUYNWoUaWlpbu1SUlIYOHAglSpVIjg4mBtuuIEdO3bke8ydO3dy9913U7VqVfz9/WnSpAkTJky4qPfWqFEjOnTowNSpU922T506lVtvvZWwsDC37YcPHwYgIiIi3+PlzkaJSPHT/0ARKVahoaHcfvvtboHEjBkzsNls9O3bN0/706dPc8011zB9+nRGjBjB3Llzuffee3nzzTe59dZbXe1M06R379589tlnPP7448yePZsrr7ySHj165Dnmli1baNu2LX/99RfvvPMOP/74I//6178YMmSIW0bnQjzwwAN89913HD16FIDt27ezYsUKHnjggTxtmzRpQvny5Xn55ZeZPHkye/bsOe/xnU4nmZmZeR4iUgRMEZFiMG3aNBMwV69ebS5ZssQEzL/++ss0TdNs27atOWDAANM0TbNZs2Zm586dXftNmjTJBMyvv/7a7Xhjx441AXPBggWmaZrmTz/9ZALm+++/79butddeMwHzxRdfdG3r3r27WbNmTTM5Odmt7eDBg82AgADzyJEjpmmaZmxsrAmY06ZNO+d7y2731ltvmcePHzeDg4PN8ePHm6Zpmk8++aQZGRlpOp1O89FHHzXP/LU7d+5cs3LlyiZgAmalSpXMO+64w5wzZ06+5zjbY/ny5efso4h4TpkkESl2nTt3pn79+kydOpVNmzaxevXqsw61LV68mHLlynH77be7bR8wYAAAv/zyCwBLliwB4J577nFrd2aR8+nTp/nll1+45ZZbCAoKcsvG9OzZk9OnT7Ny5coLfm/BwcHccccdTJ06lczMTKZPn859992XZ1Zbtp49exIXF8fs2bN54oknaNasGd999x033XQTgwcPztN+6NChrF69Os/j8ssvv+A+i0j+VLgtIsXOMAzuu+8+PvjgA06fPs1ll11Gp06d8m17+PBhqlWrlifIqFq1Kj4+Pq66nsOHD+Pj40OlSpXc2lWrVi3P8TIzM/nPf/7Df/7zn3zPmZSUdKFvDbCG3K666ipee+01Dh065AroziYwMJDevXvTu3dvAOLi4ujRowcTJkzg4YcfplmzZq62NWvWJDo6+qL6JyIFo0ySiHjFgAEDSEpKYtKkSdx3331nbVepUiX++ecfTNN0256YmEhmZiaVK1d2tcvMzHQFTdkSEhLcvq5QoQJ2u50BAwbkm5FZvXo1PXv2vKj31rFjRxo1asTo0aPp2rUrtWrV8mj/2rVr89BDDwGwefPmi+qLiFw4BUki4hU1atTgySefpFevXvTv3/+s7a677jpOnDjBd99957Z9+vTprtcBrrnmGgC++OILt3Zffvml29dBQUFcc801rFu3jpYtWxIdHZ3ncWY26kI899xz9OrVi8cff/ysbY4fP86JEyfyfW3r1q0AVK9e/aL7IiIXRsNtIuI1b7zxxnnb/Pvf/2bChAn079+fPXv20KJFC3777Tdef/11evbsyfXXXw9At27duPrqqxk5ciQnT54kOjqa33//nc8++yzPMd9//32uuuoqOnXqxMMPP0zdunU5fvw4u3bt4ocffmDx4sUX/d7uvfde7r333nO22b59O927d+fOO++kc+fOREREcPToUebOncvkyZPp0qULHTp0cNsnLi4u35qpKlWqUL9+/Yvut4jkUJAkIiVaQEAAS5YsYdSoUbz11lscOnSIGjVq8MQTT/Diiy+62tlsNubMmcOIESN48803SU9Pp2PHjsybN4/GjRu7HbNp06b8+eefvPLKKzz33HMkJiZSvnx5GjZseNFDbZ5o0KABI0aMYPHixXz//fccOnQIX19fGjZsyKuvvsqIESPyrJV0tlqqe+65x22hShG5eIZ55kC/iIiIiKgmSURERCQ/CpJERERE8qEgSURERCQfCpJERERE8qEgSURERCQfCpJERERE8qF1ki6Q0+nk4MGDhISEnPXGlSIiIlKymKbJ8ePHqV69ep51yM6kIOkCHTx40OP7MYmIiEjJsG/fPmrWrHnONgqSLlBISAhgXeTQ0FAv90ZEREQKIiUlhVq1ark+x89FQdIFyh5iCw0NVZAkIiJSyhSkVEaF2yIiIiL5UJAkIiIikg8FSSIiIiL5UE2SiIiUeQ6Hg4yMDG93QwqBr68vdru9UI6lIElERMos0zRJSEjg2LFj3u6KFKLy5ctTrVq1i17HUEGSiIiUWdkBUtWqVQkKCtLiwKWcaZqkpqaSmJgIQERExEUdT0GSiIiUSQ6HwxUgVapUydvdkUISGBgIQGJiIlWrVr2ooTcVbouISJmUXYMUFBTk5Z5IYcv+nl5snZmCJBERKdM0xHbpKazvqYIkERERkXwoSBIRESnD6taty7hx4wrcfunSpRiGUSZmBKpwW0REpJTp0qULl19+uUfBzdmsXr2acuXKFbh9hw4diI+PJyws7KLPXdIpSCphTqU7OJKajq/NoGpogLe7IyIipZBpmjgcDnx8zv8xX6VKFY+O7efnR7Vq1S60a6WKhttKmAVbEuj4xmJGfL3B210REZESaMCAASxbtoz3338fwzAwDINPPvkEwzCYP38+0dHR+Pv7s3z5cv7++29uvvlmwsPDCQ4Opm3btixatMjteGcOtxmGwccff8wtt9xCUFAQDRs2ZM6cOa7Xzxxu++STTyhfvjzz58+nSZMmBAcHc8MNNxAfH+/aJzMzkyFDhlC+fHkqVarEU089Rf/+/endu3dRXqqLpiCphLHbrIr8TKfTyz0RESl7TNMkNT3TKw/TNAvUx/fff5/27dszcOBA4uPjiY+Pp1atWgCMHDmSMWPGsHXrVlq2bMmJEyfo2bMnixYtYt26dXTv3p1evXoRFxd3znO8/PLL9OnTh40bN9KzZ0/uuecejhw5ctb2qampvP3223z22Wf8+uuvxMXF8cQTT7heHzt2LF988QXTpk3j999/JyUlhe+++65A79ebNNxWwvhkBUkOZ8H+s4iISOE5leGg6QvzvXLuLaO7E+R3/o/lsLAw/Pz8CAoKcg17bdu2DYDRo0fTtWtXV9tKlSrRqlUr19evvvoqs2fPZs6cOQwePPis5xgwYAB33XUXAK+//jr/+c9/+OOPP7jhhhvybZ+RkcGkSZOoX78+AIMHD2b06NGu1//zn//wzDPPcMsttwAwfvx45s2bd9736m3
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(history.history['loss'][:250])\n",
"plt.plot(history.history['val_loss'][:250])\n",
"plt.yscale('log')\n",
"plt.title('Model MSE')\n",
"plt.xlabel('epoch')\n",
"plt.ylabel('mean squared error')\n",
"plt.legend(['training','validation'],loc='upper right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "fb7e90ff-51a0-4a63-9550-39e25dfc98d7",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAHFCAYAAAAe+pb9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy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UKq9Ua1tgIgiCI9oPb7UZTU1O8h0FEALPZDKPR2OrjtGkhlJmZCaPR6OP+FBcX+7hEBEEQBBEIWZZx7NgxVFRUxHsoRARJTU1Fly5dWtXrr00LIYvFglGjRmHhwoW47LLLvNsXLlyISy65JI4jIwiCINoTXARlZ2fD4XBQk9x2jizLqKurQ3FxMQAgNze3xceKuxCqqanBnj17vL8XFhZi06ZNSE9PR48ePXDvvffixhtvxOjRozF27Fi8/fbbOHjwIO644444jpogCIJoL7jdbq8IysjIiPdwiAhht9sBsChRdnZ2i8NkcRdC69atw6RJk7y/33vvvQCA6dOnY/bs2Zg2bRpKS0vx1FNPoaioCEOHDsX8+fPRs2fPeA2ZIAiCaEfwnCCHwxHnkRCRhr+nTU1N7VcInXnmmWhuubM777wTd955Z4xGRBAEQXREKBzW8YjEe9qmy+cJgiAIgiCiCQkhgiAIgugE9OrVC6+++mrI+y9ZsgSSJHX4Sru4h8YIgiAIgvDPmWeeiZNOOiksAROItWvXIiEhIeT9x40bh6KiIqSkpLT6udsyJITigMc
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(history.history['mean_absolute_error'][:250])\n",
"plt.plot(history.history['val_mean_absolute_error'][:250])\n",
"plt.yscale('log')\n",
"plt.title('Model MAE')\n",
"plt.xlabel('epoch')\n",
"plt.ylabel('mean absolute error')\n",
"plt.legend(['training','validation'],loc='upper right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "259fc031-7912-40f9-b28a-4cf410586b1c",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHFCAYAAAAOmtghAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABjgUlEQVR4nO3deXwM5+MH8M/snZ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fPhw1atRARkYGzpw5g1WrVmHu3LmoVKnSXZ5JolJOxcHMROQi9rOlipJ/tpQQQiQlJYkhQ4aI0NBQodPpREREhBg7dqzIyMhwKHfjxg0xYMAAUa5cOeHp6Snat28vjh49WmC2lBDyDKcBAwaIihUrCr1eL4KCgkRcXJyYPHmyQxmUYLbUf//7X6ePP/3000Kn04mTJ08KIeRZR8id6ZT/KyIioshjZWZmiqlTp4pOnTqJypUrC6PRKEwmk6hVq5YYPXq0SEpKciifnp4uxo8fL6pVqyYMBoMICAgQbdq0EVu3bnUoM2bMGBERESH0er0IDQ0VL774orh+/brDviIiIsSjjz7qtF5XrlwRw4cPF1FRUUKv1wt/f38RExMjxo0bJ27evFnkayK6H0hC5A71JyIiIioDOOaGiIiIyhSGGyIiIipTGG6IiIioTGG4ISIiojKF4YaIiIjKFIYbIiIiKlPuu0X8LBYLLl26BB8fH6dLmxMREdG9RwiB1NTU297DDbgPw82lS5eKdSdgIiIiuvecP3/
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(history.history['r2_score'][:250])\n",
"plt.plot(history.history['val_r2_score'][:250])\n",
"plt.title('Model R2 Score')\n",
"plt.xlabel('epoch')\n",
"plt.ylabel('R2 score')\n",
"plt.legend(['training','validation'],loc='lower right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "72382f07-3613-4c00-bdf5-77855c9eb501",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-05-11 17:31:21.244068: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)\n",
"2024-05-11 17:31:21.270182: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 3892575000 Hz\n",
"2024-05-11 17:31:21.571777: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"1637/1637 [==============================] - 3s 632us/step - loss: 1.0265e-04 - mean_absolute_error: 0.0073 - r2_score: 0.9932\n"
]
},
{
"data": {
"text/plain": [
"[0.00010416490113129839, 0.007332313805818558, 0.9931228160858154]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Evaluate the model\n",
"model.evaluate(X_test,y_test)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "de69f7a1-b8f9-42d9-acfe-bc012f5f3925",
"metadata": {},
"outputs": [],
"source": [
"z=model.predict(X_test)[:,0]"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "b4d9830f-6986-491c-b703-6fea0a0b60ad",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"true: 0.037 , predicted: 0.03611117601394653 \n",
"\n",
"true: 0.1491 , predicted: 0.15110592544078827 \n",
"\n",
"true: 0.2769 , predicted: 0.2777317762374878 \n",
"\n",
"true: 0.2442 , predicted: 0.24263232946395874 \n",
"\n",
"true: 0.4245 , predicted: 0.42558854818344116 \n",
"\n",
"true: 0.2792 , predicted: 0.2945525646209717 \n",
"\n",
"true: 0.4637 , predicted: 0.44423896074295044 \n",
"\n",
"true: 0.1727 , predicted: 0.17932043969631195 \n",
"\n",
"true: 0.1143 , predicted: 0.12211602181196213 \n",
"\n",
"true: 0.2929 , predicted: 0.29719555377960205 \n",
"\n"
]
}
],
"source": [
"n=10\n",
"for el in range(n):\n",
" print(f\"true: {y_test[el]} , predicted: {z[el]} \\n\")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "f9e8e120-4993-4ece-a639-a2a488b4d3d5",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWX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HQ6XTo27cvhg8fDgD49NNPAQAbN27Ed7/7XY9f65tvvsErr7yCQ4cOYcqUKQCA0aNH46OPPsLOnTsZjBARkaoxGAGAggLg4YddlyvA6AiEPHTmzBk0Nzd3CWBsNhsmTpzoz6oRERH5HYMRAFi0CNi6FTh2rL3MZJLLFdCvXz+nn/v06QPRqYWmpaWl7d92ux0A8Ic//AE33HCD037R0dEBqiUREZF/MBgBgJYWuTvGZAKWLgX27JF/bmkBdLqAva1Op8O1a9d63O/666/HqVOnnMrKy8sRFRUFAEhNTUV0dDTOnTvHLhkiItIcBiOAHHCUlABRUYAkAcuWBTwQAYDExESUlpaipqYG/fv3b2vh6GzmzJl4+eWX8eabb2LKlCkoKCjAqVOn2rpgBgwYgKeffhpPPfUU7HY77rjjDjQ2NuLo0aPo378/Hn300YB+DiIiot7g1F4HnU4ORAB5G+BABACefvppREREIDU1Fddffz3OnTvncr+77roLP/rRj/DMM8/AZDLhypUrWLx4sdM+//mf/4kf//jHyMvLQ0pKCu666y787ne/Q1JSUsA/BxERUW9IovN
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(z[:100],'bo',markersize=4)\n",
"plt.plot(y_test[:100],'r*',markersize=4)\n",
"plt.legend(['predicted','true'],loc='upper left')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "a2fccb9f-b114-4f81-a94d-08dc5bdf4547",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAGwCAYAAABIC3rIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3uUlEQVR4nO3de1hVZd7/8c+Wk2CyVZBTgmGhktokOCl20Dw3OT5NM6MNapqmNVZK6ngYNbXHZLJGnTJNHQ9Mnnqeys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Xlat++vStLqxUIRAAA1AENGjRweFyvXj0ZhuGw7ce3tqioqJAk/eMf/9DNN9/sMC4gIMBNVdZcBCIAAGoRf39/+73Yrqdp06bav3+/w7bs7Gz5+flJkm6//XYFBATo66+/Nt3hsashEAEA8CM2W82e55ZbbtGuXbt07Ngx3XTTTfaVnit169ZNL730kv72t78pKSlJq1at0v79++2Hwxo2bKjx48fr2WefVUVFhe655x6VlJRo+/btuummmzRkyBBnW6uVCEQAAOjSx5IEBV26+MRTgoIuzVsV48eP15AhQ3T77bertLRUK1asuOq43r17a9q0aZowYYLOnTunYcOG6dFHH9W+ffvsY/77v/9bYWFhSk1N1dGjR9WoUSMlJCToj3/8Y3XaqpUsxpUHGHFVJSUlslqtKi4uVnBwsMv2m5UlJSZKmZnuP6nak3MBQE127tw55eTkKDY2VvXr17dv515mtdO13k/pxn9/s0IEAMB/xMQQUMyqnrcLAAAA8DZWiGqKjQnSF3vdO0dOe0lZ7p0DAIBaiBUiAABgegQiAABgegQiAABgegQiAABgegQiAABgegQiAABQyS233KL58+fbH1ssFr377rser2PGjBm688473T4Pl90DAHDZGotn50uuPTeLyMvLU+PGjW9o7IwZM/Tuu+8qOzvbvUW5EIEIAIA6qry8XP7+/i7ZV0REhEv2U1NxyAwAgFqia9euevrpp/X000+rUaNGCgkJ0dSpU3X5tqS33HKLZs2apaFDh8pqtWrEiBGSpO3bt+u+++5TYGCgoqOjNXr0aH3//ff2/RYUFOiXv/ylAgMDFRsbq9WrV1ea+8pDZsePH9cjjzyiJk2aqEGDBurQoYN27dqllStXaubMmfrss89ksVhksVi0cuVKSVJxcbFGjhypsLAwBQcHq1u3bvrss88c5vnTn/6k8PBwNWzYUMOHD9e5c+dc/F28OgIRAAC1SFpamnx9fbVr1y698sormjdvnv7617/an3/ppZfUtm1bZWZmatq0adq3b5969+6thx9+WJ9//rnefPNNbdu2TU8//bT9NUOHDtWxY8f00Ucf6a233tLChQtVUFBwzRrOnDmjLl266JtvvtGGDRv02WefacKECaqoqN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Uv1K5dO/3pT3+yr1L9+te/Vp8+fXT//feradOmWrt2rSwWi95//33dd999GjZsmFq2bKlHHnlEx44dU3h4uCRpwIABeu655zRx4kQlJibqq6++0u9//3sXfeeuz2Jc/vACXFdJSYmsVquKi4sVHBzssv1mZUmJiVLmrAQlxO512X6vOldOeyVOzVJmppSQ4NapAKBGO3funHJychQbG6v69et7u5wb1rVrV915550Ot9TA9d/PG/39zQoRAAAwPQIRAAAwPa4yAwCglrjaJetwDVaIAACA6RGIAACmxXVFdYMr3kcCEQDAdC5fHl5eXu7lSuAKZ8+elST5+fk5vQ/OIQIAmI6vr6+CgoJ04sQJ+fn5qV491gdqI8MwdPbsWRUUFKhRo0bX/LTuG+HVQHThwgXNmDFDq1evVn5+viIjIzV06FBNnTrV/sNpGIZmzpypJUuWqKioSB0
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Distribution of the MOID and predicted MOID\n",
"num_bins=math.ceil(math.log2(len(y_test))+1) #Sturges rule\n",
"plt.hist(y_test,bins=num_bins,color='orange')\n",
"plt.hist(z,bins=num_bins,color='blue',histtype='step')\n",
"plt.xlabel('MOID')\n",
"plt.ylabel('count')\n",
"plt.legend(['true','predicted'],loc='upper right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "157d380e-95e7-4972-b17a-cf9d150a5a6d",
"metadata": {},
"outputs": [],
"source": [
"#Convert the problem into a classification problem: we are going to create an array containing 1 if the MOID is greater than 0.05, and 0 otherwise\n",
"#so the positive class is made of the non-hazardous objects\n",
"y_test_binary, z_binary = np.zeros_like(y_test),np.zeros_like(z)\n",
"for el in range(len(y_test)):\n",
" if (y_test[el]>0.05):\n",
" y_test_binary[el]=1\n",
" if (z[el]>0.05):\n",
" z_binary[el]=1"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "e3011655-b0b1-4250-9274-44a6aa109657",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True positives: 42143\n",
"True negatives: 8949\n",
"False positives: 541\n",
"False negatives: 743\n"
]
}
],
"source": [
"tp=np.count_nonzero((y_test_binary==1)&(z_binary==1))\n",
"tn=np.count_nonzero((y_test_binary==0)&(z_binary==0))\n",
"fp=np.count_nonzero((y_test_binary==0)&(z_binary==1))\n",
"fn=np.count_nonzero((y_test_binary==1)&(z_binary==0))\n",
"print(\"True positives:\", tp)\n",
"print(\"True negatives:\", tn)\n",
"print(\"False positives:\", fp)\n",
"print(\"False negatives:\", fn)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "7b018ea6-6ae3-437b-bc27-4ef39f2852c2",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.9754849549411945\n",
"Precision: 0.9873254615312529\n",
"Recall: 0.9826749988341184\n",
"False positive rate: 0.057007376185458376\n",
"F1-score: 0.9849947411475984\n"
]
}
],
"source": [
"acc=(tp+tn)/len(y_test) #accuracy\n",
"p=tp/(tp+fp) #precision\n",
"r=tp/(tp+fn) #recall\n",
"fpr=fp/(tn+fp) #false positive rate\n",
"f1=2*p*r/(p+r) #F1-score\n",
"print(\"Accuracy:\", acc)\n",
"print(\"Precision:\", p)\n",
"print(\"Recall:\", r)\n",
"print(\"False positive rate:\", fpr)\n",
"print(\"F1-score:\", f1)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "a08bbcaa-f926-476c-9505-41ec1b21c933",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.9962262045277288"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"roc_auc_score(y_test_binary,z)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "4d4e75c1-457b-4ff3-8c37-1fef5310f948",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbkAAAHFCAYAAABvtIeSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZl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BgyMjKio0eP5jmv9PR0qlGjBo0fP14YLv/+tm7dWqG9/LNq3Lixwvfp8ePHZGxsrPDZrF27lgDQH3/8oTCP+fPnEwA6efIkEf33dyb/PmQHgAICAoTnFhYW9O233+b6fooC767UUIsWLWBsbAxLS0t07twZ5cuXx4EDBwq8n7s0HT9q0KCBwhYrANjY2KB79+7YsmWL8Cv23bt3OHDgAAYPHiwsl8OHD6NcuXLo3r07MjMzhYeHhwccHR0VeqMNHjwYmZmZue62zU379u3RsWNHzJo1C4mJiSrbnD17Fu3bt0elSpUUhg8dOhTJyclKW0g9evRQWgYAhF1N9P9f9NkfOZ0+fRrXrl1TelSrVk1lfR06dIC1tTUMDQ1hbGyM6dOn482bN4iNjVVq//LlS3Tu3BlOTk7Yt28fxGKxMC48PBw9evSAjY2NMK/BgwcjKysL9+/fV5hP+fLllXZxBwcHw9LSUmkZ+Pn5KTy/d+8eXrx4gUGDBilsCVhYWKBPnz64cuUKkpOTlWrPS9OmTQEA/fr1wx9//IHnz5+rNZ2638dmzZpBKpViwIABOHDgQK49YHPTr18/lZ/p/Pnzldq+f/8e33//PapXrw4jIyMYGRnBwsICSUlJuHv3rsr5//LLL1i5ciXWrl2LLl26CMMzMzMxd+5c1KlTB2KxGEZGRhCLxXjw4IHKefXp00f
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"RocCurveDisplay.from_predictions(y_test_binary, z, name=\"Non-hazardous \\n vs \\n hazardous\")\n",
"plt.plot([0,1],[0,1],\"k--\",label=\"chance level (AUC=0.5)\")\n",
"plt.axis(\"square\")\n",
"plt.xlabel(\"False Positive Rate\")\n",
"plt.ylabel(\"True Positive Rate\")\n",
"plt.title(\"ROC Curve: Non-Hazardous vs Hazardous\")\n",
"plt.legend(loc='lower right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "53da79e4-4c29-4be8-8c0e-cdfc545ae975",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>spkid</th>\n",
" <th>pha</th>\n",
" <th>H</th>\n",
" <th>epoch_mjd</th>\n",
" <th>e</th>\n",
" <th>a</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>moid</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>20000433</td>\n",
" <td>N</td>\n",
" <td>10.41</td>\n",
" <td>60400</td>\n",
" <td>0.2227</td>\n",
" <td>1.458</td>\n",
" <td>10.83</td>\n",
" <td>304.28</td>\n",
" <td>178.90</td>\n",
" <td>334.73</td>\n",
" <td>0.1500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>20000719</td>\n",
" <td>N</td>\n",
" <td>15.59</td>\n",
" <td>60400</td>\n",
" <td>0.5469</td>\n",
" <td>2.636</td>\n",
" <td>11.58</td>\n",
" <td>183.85</td>\n",
" <td>156.22</td>\n",
" <td>102.37</td>\n",
" <td>0.2010</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>20000887</td>\n",
" <td>N</td>\n",
" <td>13.88</td>\n",
" <td>60400</td>\n",
" <td>0.5710</td>\n",
" <td>2.472</td>\n",
" <td>9.40</td>\n",
" <td>110.42</td>\n",
" <td>350.48</td>\n",
" <td>289.48</td>\n",
" <td>0.0803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>20001036</td>\n",
" <td>N</td>\n",
" <td>9.26</td>\n",
" <td>60400</td>\n",
" <td>0.5328</td>\n",
" <td>2.665</td>\n",
" <td>26.69</td>\n",
" <td>215.50</td>\n",
" <td>132.48</td>\n",
" <td>321.69</td>\n",
" <td>0.3450</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>20001221</td>\n",
" <td>N</td>\n",
" <td>17.38</td>\n",
" <td>60400</td>\n",
" <td>0.4352</td>\n",
" <td>1.920</td>\n",
" <td>11.88</td>\n",
" <td>171.31</td>\n",
" <td>26.68</td>\n",
" <td>197.64</td>\n",
" <td>0.1080</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 spkid pha H epoch_mjd e a i om \\\n",
"0 0 20000433 N 10.41 60400 0.2227 1.458 10.83 304.28 \n",
"1 1 20000719 N 15.59 60400 0.5469 2.636 11.58 183.85 \n",
"2 2 20000887 N 13.88 60400 0.5710 2.472 9.40 110.42 \n",
"3 3 20001036 N 9.26 60400 0.5328 2.665 26.69 215.50 \n",
"4 4 20001221 N 17.38 60400 0.4352 1.920 11.88 171.31 \n",
"\n",
" w ma moid \n",
"0 178.90 334.73 0.1500 \n",
"1 156.22 102.37 0.2010 \n",
"2 350.48 289.48 0.0803 \n",
"3 132.48 321.69 0.3450 \n",
"4 26.68 197.64 0.1080 "
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Now test the model on the real NEOs dataset\n",
"import pandas as pd\n",
"df=pd.read_csv(folder+'neos_dataframe.csv')\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "7dc77a36-e409-4de6-bc5c-092f3ec471be",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>spkid</th>\n",
" <th>pha</th>\n",
" <th>H</th>\n",
" <th>epoch_mjd</th>\n",
" <th>a</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>moid</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>20000433</td>\n",
" <td>N</td>\n",
" <td>10.41</td>\n",
" <td>60400</td>\n",
" <td>1.458</td>\n",
" <td>0.2227</td>\n",
" <td>10.83</td>\n",
" <td>304.28</td>\n",
" <td>178.90</td>\n",
" <td>334.73</td>\n",
" <td>0.1500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>20000719</td>\n",
" <td>N</td>\n",
" <td>15.59</td>\n",
" <td>60400</td>\n",
" <td>2.636</td>\n",
" <td>0.5469</td>\n",
" <td>11.58</td>\n",
" <td>183.85</td>\n",
" <td>156.22</td>\n",
" <td>102.37</td>\n",
" <td>0.2010</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>20000887</td>\n",
" <td>N</td>\n",
" <td>13.88</td>\n",
" <td>60400</td>\n",
" <td>2.472</td>\n",
" <td>0.5710</td>\n",
" <td>9.40</td>\n",
" <td>110.42</td>\n",
" <td>350.48</td>\n",
" <td>289.48</td>\n",
" <td>0.0803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>20001036</td>\n",
" <td>N</td>\n",
" <td>9.26</td>\n",
" <td>60400</td>\n",
" <td>2.665</td>\n",
" <td>0.5328</td>\n",
" <td>26.69</td>\n",
" <td>215.50</td>\n",
" <td>132.48</td>\n",
" <td>321.69</td>\n",
" <td>0.3450</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>20001221</td>\n",
" <td>N</td>\n",
" <td>17.38</td>\n",
" <td>60400</td>\n",
" <td>1.920</td>\n",
" <td>0.4352</td>\n",
" <td>11.88</td>\n",
" <td>171.31</td>\n",
" <td>26.68</td>\n",
" <td>197.64</td>\n",
" <td>0.1080</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" spkid pha H epoch_mjd a e i om w \\\n",
"0 20000433 N 10.41 60400 1.458 0.2227 10.83 304.28 178.90 \n",
"1 20000719 N 15.59 60400 2.636 0.5469 11.58 183.85 156.22 \n",
"2 20000887 N 13.88 60400 2.472 0.5710 9.40 110.42 350.48 \n",
"3 20001036 N 9.26 60400 2.665 0.5328 26.69 215.50 132.48 \n",
"4 20001221 N 17.38 60400 1.920 0.4352 11.88 171.31 26.68 \n",
"\n",
" ma moid \n",
"0 334.73 0.1500 \n",
"1 102.37 0.2010 \n",
"2 289.48 0.0803 \n",
"3 321.69 0.3450 \n",
"4 197.64 0.1080 "
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"desired_order=['spkid','pha','H','epoch_mjd','a','e','i','om','w','ma','moid']\n",
"df=df[desired_order]\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "772a4d3d-3134-4f2f-a8fe-a3cc0098f7f3",
"metadata": {},
"outputs": [],
"source": [
"X=df.iloc[:,4:9].to_numpy()\n",
"target=df.iloc[:,-1].to_numpy()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "0c6f6118-48fa-4260-8b97-e29918511d53",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1090/1090 [==============================] - 0s 256us/step - loss: 8.2916e-05 - mean_absolute_error: 0.0067 - r2_score: 0.9863\n"
]
},
{
"data": {
"text/plain": [
"[8.291556150652468e-05, 0.00671815313398838, 0.9862860441207886]"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(X,target)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "57c7cef4-dfb8-4887-ae2f-03b416b76f34",
"metadata": {},
"outputs": [],
"source": [
"predictions=model.predict(X)[:,0]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "e4ef3370-09d4-4108-a002-49aea3ba1d00",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"true: 0.15 , predicted: 0.14063376188278198 \n",
"\n",
"true: 0.201 , predicted: 0.20540137588977814 \n",
"\n",
"true: 0.0803 , predicted: 0.06878837943077087 \n",
"\n",
"true: 0.345 , predicted: 0.35209476947784424 \n",
"\n",
"true: 0.108 , predicted: 0.1077912226319313 \n",
"\n",
"true: 0.0339 , predicted: 0.02879190444946289 \n",
"\n",
"true: 0.135 , predicted: 0.12797904014587402 \n",
"\n",
"true: 0.0302 , predicted: 0.017508333548903465 \n",
"\n",
"true: 0.112 , predicted: 0.11151407659053802 \n",
"\n",
"true: 0.0506 , predicted: 0.05622444674372673 \n",
"\n"
]
}
],
"source": [
"n=10\n",
"for el in range(n):\n",
" print(f\"true: {target[el]} , predicted: {predictions[el]} \\n\")"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "0dcbf78b-b9af-46e4-bf4e-f1a68560aba1",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABoDUlEQVR4nO3dfVxUVf4H8M8VGAZQ8QEfEwHNB0hBhYnUTFPT1DTFUjMzH0E38ynXMN1QN9OyzXI3xVrUSlPbmPZXrVaSVoYtyiSKSmKlaIq6aKEpj3J+f1xnZJgBZ2Bm7jx83q/XvIa53Llz5s7ce79zzvecIwkhBIiI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rTJ5H99+/YVffv2NVn+9NNPi5CQkGq3efPmTVFWViaWL18umjZtKioqKu64zZpUVFSIsrIy8c033wgA4vDhw0ZlASA+/PBDo+cMHTpUdOrUyfB4/fr1AoD4v//7P6P1pk+fXu37r2zTpk0CgBg1apTR8vT0dAFAvPTSS0bvEYD46quvjNZduXKlqFevnjh48KDR8o8++kgAEDt37hRCCLFr1y4BQLz55ptG661YsUIAEElJSSblOnXqlBBC/i40bNhQ3H///Ub7vapnnnlGmDs8vv/+ewFA/O1vfzNafvbsWeHn5ycWLlwohBDit99+E2q1utr9cafPuKCgQKhUKvHCCy8YLR8zZoxo0aKFKCsrM/s8a75be/fuFQDE3r17jbZx6tQpk8+8c+fOonv37iav+8g
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(predictions[:100],'bo',markersize=4)\n",
"plt.plot(target[:100],'r*',markersize=4)\n",
"plt.legend(['predicted','true'],loc='upper left')\n",
"plt.title(\"Actual and predicted values for the real NEOs DataFrame\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "bdf99fb4-6104-44e2-9fff-8818b91d0e37",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAGwCAYAAAC0HlECAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABBRklEQVR4nO3dfVxUdf7//+fIxQgmozhyVWBWihRuCW6K7uZFhpIXt7LSIklXw1pLc9VvZReb7SdzNzPbzbXM9arE9LOV1WctUmu1zKtEKU1SK0z8BaIJg3gBhOf3h+vZRsAOOAODPO6329zinPOac15vUHn2PhdjMwzDEAAAAM6rWUM3AAAA0BgQmgAAACwgNAEAAFhAaAIAALCA0AQAAGABoQkAAMACQhMAAIAF/g3dwMXk9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h7r77bjVv3txtfXp6uvl1fHy8OnTooK5du2r79u1KSEiQVP2UnGEYbuut1JzLbrfLbrfXeiwAgMbpwAEpLk46caL+jhkcLOXkEJx8QaMITZ9++qn27NmjFStW/GJtQkKCAgICtG/fPiUkJCgiIkKHDh2qUnf48GFzdikiIkJbtmxx215UVKSKiooqM1AAgKbryJEzgWnp0jPhydtycqQRI84c12po6t27t6677jq9+OKLXu2tKWoUoWnBggVKTEzUtdde+4u1X331lSoqKsznMCQlJcnlcmnr1q26/vrrJUlbtmyRy+VSjx49zJrp06crPz/ffN/q1atlt9uVmJjopVEBABqruDjpPyczGh3DMFRZWSl//0YRAXxKg37HSktL9c0335jLubm5ys7OVmhoqGL+E6lLSkr0z3/+U7Nmzary/m+//VYZGRm6+eab5XQ6tXv3bk2ePFldunRRz549JUlxcXEaMGCA0tPTzUcRjB07VoMGDVJsbKwkKTk5WVdffbXS0tI0c+ZMHT16VFOmTFF6enqNd87Vt/o8h875cwBonEaNGqX169dr/fr1+utf/ypJWrRokX73u98pMzNTjz/+uL788kt9+OGHWrJkiYqLi/XOO++Y7584caKys7O1bt06SWcC1syZM/XKK68oPz9fHTt21JNPPqnbb7+9AUbX8Bo0NG3btk19+vQxl89eVD1y5EgtXrxYkrR8+XIZhqG77rqryvsDAwP10Ucf6a9//atKS0sVHR2tgQMH6qmnnnJ7cFVGRoYmTJig5ORkSWcebvnzZ0P5+flp1apVGjdunHr27On2cEtfUN/n0Dl/DgCN01//+lft3btX8fHx+tOf/iTpzBkYSXr44Yf1/PPP64orrnB7uPP5PPHEE3r77bf18ssvq0OHDvrkk080YsQItW3bVr169fLWMHxWg4am3r17yzCM89aMHTtWY8eOrXZbdHR0laeBVyc0NFRLly49b01MTIz+9a9//eK+GkJ9nkOvy/lzAIBvcDgcCgwMdHt+4ddffy1J+tOf/qSbbrrJ8r6OHz+uF154QR9//LGSkpIkSVdccYU2bNigefPmEZrg2xrzOXQAQMPq2rVrrep3796tU6dOVQla5eXl6tKliydbazQIT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Pn1aw4cP1+TJk3XNNdcoPz9f+fn5Gj58uAzD0MCBA1VQUKD3339fWVlZSkhI0I033qijR49Kkv73f/9XTz31lKZPn65t27YpMjJSc+fO9d4382c4PQcAwEUmOjpas2fPls1mU2xsrHbu3KnZs2ebs0p9+/bVlClTzPp77rlHqampmjhxoiSpQ4cO+tvf/qZevXrp5Zdf1oEDB/TBBx9o8+bN6tatmyRpwYIFiouLq7GHZcuW6fDhw/r8888VGhoqSbrqqqvM7Zdccon8/f3dTul9/PHH2rlzpwoLC2W32yVJzz//vN555x2
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Distribution of the MOID and predicted MOID\n",
"num_bins=math.ceil(math.log2(len(target))+1) #Sturges rule\n",
"plt.hist(target,bins=num_bins,color='orange')\n",
"plt.hist(predictions,bins=num_bins,color='blue',histtype='step')\n",
"plt.xlabel('MOID')\n",
"plt.ylabel('count')\n",
"plt.legend(['true','predicted'],loc='upper right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "28ac08eb-15bd-4fb1-9b35-8eca4e867004",
"metadata": {},
"outputs": [],
"source": [
"target_binary, predictions_binary = np.zeros_like(target),np.zeros_like(predictions)\n",
"for el in range(len(target)):\n",
" if (target[el]>0.05):\n",
" target_binary[el]=1\n",
" if (predictions[el]>0.05):\n",
" predictions_binary[el]=1"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "fd3e671c-150f-472f-9296-ef83cdce7a60",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True positives: 15859\n",
"True negatives: 17822\n",
"False positives: 469\n",
"False negatives: 714\n"
]
}
],
"source": [
"tp=np.count_nonzero((target_binary==1)&(predictions_binary==1))\n",
"tn=np.count_nonzero((target_binary==0)&(predictions_binary==0))\n",
"fp=np.count_nonzero((target_binary==0)&(predictions_binary==1))\n",
"fn=np.count_nonzero((target_binary==1)&(predictions_binary==0))\n",
"print(\"True positives:\", tp)\n",
"print(\"True negatives:\", tn)\n",
"print(\"False positives:\", fp)\n",
"print(\"False negatives:\", fn)"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "72508c9d-4168-42a8-9090-a46490711dec",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.9660681505277651\n",
"Precision: 0.9712763351298384\n",
"Recall: 0.956917878477041\n",
"False positive rate: 0.02564102564102564\n",
"F1-score: 0.9640436460897847\n"
]
}
],
"source": [
"acc=(tp+tn)/len(target) #accuracy\n",
"p=tp/(tp+fp) #precision\n",
"r=tp/(tp+fn) #recall\n",
"fpr=fp/(tn+fp) #false positive rate\n",
"f1=2*p*r/(p+r) #F1-score\n",
"print(\"Accuracy:\", acc)\n",
"print(\"Precision:\", p)\n",
"print(\"Recall:\", r)\n",
"print(\"False positive rate:\", fpr)\n",
"print(\"F1-score:\", f1)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "2435b2e3-7a2d-4be5-8361-84c709d3b0d8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.9951386031748715"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"roc_auc_score(target_binary,predictions)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "3d77f238-af62-475a-8822-685a12b321e2",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbkAAAHWCAYAAADq9venAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACEm0lEQVR4nO3dd1hT1xsH8G8YYYMKMlXALW7FAe4qDqyrWlGsA0dFa53Vaq2i1lE31jraOrCtu+KeuHEL4sQ6URwoogaQPd7fH/xyS0iABAKB8H6eJ4/m3HNv3tyE++bce+45IiIiMMYYY1pIR9MBMMYY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1ga2sr0xttyJAhSE9Pz/W0bW46duyIzp07Y968eYiPj1dY5/Tp0+jYsSMqV64sUz5s2DAkJibKtZB69uwptw8ACKea6P+/6LM/cjp58iSuX78u96hWrZrC+Dp16gQLCwvo6upCX18fs2fPxvv37xEdHS1X/82bN+jatSvs7Oywd+9eiMViYVlYWBh69uwJS0tLYVtDhgxBRkYGHj58KLOd8uXLy53iPnPmDMzMzOT2gbe3t8zzBw8e4PXr1xg8eLBMS8DU1BR9+/bFlStXkJiYKBd7Xpo1awYA6N+/P3bt2oVXr14ptZ6y38fmzZtDIpFg4MCB2L9/f649YHPTv39/hZ/p4sWL5ep++vQJ33//PapXrw49PT3o6enB1NQUCQkJuH//vsLt//zzz/j111+xfv16dOvWTShPT0/HwoUL4eLiArFYDD09PYjFYjx69Ejhtvr27Sv
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"RocCurveDisplay.from_predictions(target_binary, predictions, name=\"Non-hazardous \\n vs \\n hazardous\")\n",
"plt.plot([0,1],[0,1],\"k--\",label=\"chance level (AUC=0.5)\")\n",
"plt.axis(\"square\")\n",
"plt.xlabel(\"False Positive Rate\")\n",
"plt.ylabel(\"True Positive Rate\")\n",
"plt.title(\"ROC Curve: Non-Hazardous vs Hazardous \\n for the real NEOs DataFrame\")\n",
"plt.legend(loc='lower right')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "a800c44d-4d34-4284-b023-33b5fa177f63",
"metadata": {},
"outputs": [],
"source": [
"#See the asteroids with the highest absolute error:\n",
"abs_errors=np.zeros_like(target)\n",
"for el in range(len(target)):\n",
" abs_errors[el]=np.absolute(target[el]-predictions[el])"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "2cd2924e-9aa3-4c54-ac6e-8c32a26c2f91",
"metadata": {},
"outputs": [],
"source": [
"ind=np.argpartition(abs_errors,-10)[-10:] #indices of the 10 largest values in abs_errors"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "b9d3dfb8-881d-4fcf-96e6-52aaa7c8fa90",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_319274/3456925052.py:2: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" top10_df['predicted_moid']=predictions[ind]\n",
"/tmp/ipykernel_319274/3456925052.py:3: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" top10_df['abs_error']=abs_errors[ind]\n"
]
}
],
"source": [
"top10_df=df.iloc[ind,:] #extract the rows corresponding to the indices in ind\n",
"top10_df['predicted_moid']=predictions[ind]\n",
"top10_df['abs_error']=abs_errors[ind]"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "027dce2c-0ef3-490e-9513-cc7932bd29e1",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>spkid</th>\n",
" <th>pha</th>\n",
" <th>H</th>\n",
" <th>epoch_mjd</th>\n",
" <th>a</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>moid</th>\n",
" <th>predicted_moid</th>\n",
" <th>abs_error</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>33682</th>\n",
" <td>54414533</td>\n",
" <td>Y</td>\n",
" <td>19.51</td>\n",
" <td>60400</td>\n",
" <td>4.6340</td>\n",
" <td>0.7999</td>\n",
" <td>13.91</td>\n",
" <td>67.26</td>\n",
" <td>136.58</td>\n",
" <td>335.88</td>\n",
" <td>0.024900</td>\n",
" <td>0.091175</td>\n",
" <td>0.066275</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24321</th>\n",
" <td>54087802</td>\n",
" <td>N</td>\n",
" <td>18.58</td>\n",
" <td>60400</td>\n",
" <td>2.1290</td>\n",
" <td>0.9332</td>\n",
" <td>55.90</td>\n",
" <td>238.69</td>\n",
" <td>18.88</td>\n",
" <td>79.02</td>\n",
" <td>0.282000</td>\n",
" <td>0.344930</td>\n",
" <td>0.062930</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2439</th>\n",
" <td>20495021</td>\n",
" <td>N</td>\n",
" <td>22.70</td>\n",
" <td>60400</td>\n",
" <td>1.2710</td>\n",
" <td>0.0331</td>\n",
" <td>4.05</td>\n",
" <td>0.89</td>\n",
" <td>96.75</td>\n",
" <td>59.20</td>\n",
" <td>0.258000</td>\n",
" <td>0.198207</td>\n",
" <td>0.059793</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10166</th>\n",
" <td>3640993</td>\n",
" <td>N</td>\n",
" <td>17.16</td>\n",
" <td>60400</td>\n",
" <td>4.4470</td>\n",
" <td>0.8338</td>\n",
" <td>29.38</td>\n",
" <td>129.67</td>\n",
" <td>357.31</td>\n",
" <td>59.30</td>\n",
" <td>0.245000</td>\n",
" <td>0.186045</td>\n",
" <td>0.058955</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8206</th>\n",
" <td>3557637</td>\n",
" <td>N</td>\n",
" <td>23.51</td>\n",
" <td>55605</td>\n",
" <td>4.8160</td>\n",
" <td>0.7701</td>\n",
" <td>17.30</td>\n",
" <td>333.33</td>\n",
" <td>213.55</td>\n",
" <td>356.06</td>\n",
" <td>0.162000</td>\n",
" <td>0.220725</td>\n",
" <td>0.058725</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33851</th>\n",
" <td>54416579</td>\n",
" <td>N</td>\n",
" <td>21.50</td>\n",
" <td>60400</td>\n",
" <td>4.6440</td>\n",
" <td>0.7610</td>\n",
" <td>25.48</td>\n",
" <td>269.26</td>\n",
" <td>160.46</td>\n",
" <td>12.08</td>\n",
" <td>0.148000</td>\n",
" <td>0.202440</td>\n",
" <td>0.054440</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16409</th>\n",
" <td>3778084</td>\n",
" <td>N</td>\n",
" <td>24.50</td>\n",
" <td>60400</td>\n",
" <td>0.8945</td>\n",
" <td>0.1376</td>\n",
" <td>20.03</td>\n",
" <td>298.28</td>\n",
" <td>186.15</td>\n",
" <td>141.05</td>\n",
" <td>0.000653</td>\n",
" <td>0.053918</td>\n",
" <td>0.053265</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18119</th>\n",
" <td>3803895</td>\n",
" <td>N</td>\n",
" <td>22.14</td>\n",
" <td>60400</td>\n",
" <td>0.8102</td>\n",
" <td>0.5883</td>\n",
" <td>22.06</td>\n",
" <td>14.38</td>\n",
" <td>354.84</td>\n",
" <td>277.10</td>\n",
" <td>0.181000</td>\n",
" <td>0.129120</td>\n",
" <td>0.051880</td>\n",
" </tr>\n",
" <tr>\n",
" <th>789</th>\n",
" <td>20164294</td>\n",
" <td>N</td>\n",
" <td>20.45</td>\n",
" <td>60400</td>\n",
" <td>0.6175</td>\n",
" <td>0.4546</td>\n",
" <td>2.95</td>\n",
" <td>211.16</td>\n",
" <td>5.42</td>\n",
" <td>88.23</td>\n",
" <td>0.094100</td>\n",
" <td>0.042884</td>\n",
" <td>0.051216</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19446</th>\n",
" <td>3837721</td>\n",
" <td>N</td>\n",
" <td>25.50</td>\n",
" <td>60400</td>\n",
" <td>0.7452</td>\n",
" <td>0.3518</td>\n",
" <td>0.32</td>\n",
" <td>182.18</td>\n",
" <td>98.90</td>\n",
" <td>239.07</td>\n",
" <td>0.004890</td>\n",
" <td>0.055066</td>\n",
" <td>0.050176</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" spkid pha H epoch_mjd a e i om w \\\n",
"33682 54414533 Y 19.51 60400 4.6340 0.7999 13.91 67.26 136.58 \n",
"24321 54087802 N 18.58 60400 2.1290 0.9332 55.90 238.69 18.88 \n",
"2439 20495021 N 22.70 60400 1.2710 0.0331 4.05 0.89 96.75 \n",
"10166 3640993 N 17.16 60400 4.4470 0.8338 29.38 129.67 357.31 \n",
"8206 3557637 N 23.51 55605 4.8160 0.7701 17.30 333.33 213.55 \n",
"33851 54416579 N 21.50 60400 4.6440 0.7610 25.48 269.26 160.46 \n",
"16409 3778084 N 24.50 60400 0.8945 0.1376 20.03 298.28 186.15 \n",
"18119 3803895 N 22.14 60400 0.8102 0.5883 22.06 14.38 354.84 \n",
"789 20164294 N 20.45 60400 0.6175 0.4546 2.95 211.16 5.42 \n",
"19446 3837721 N 25.50 60400 0.7452 0.3518 0.32 182.18 98.90 \n",
"\n",
" ma moid predicted_moid abs_error \n",
"33682 335.88 0.024900 0.091175 0.066275 \n",
"24321 79.02 0.282000 0.344930 0.062930 \n",
"2439 59.20 0.258000 0.198207 0.059793 \n",
"10166 59.30 0.245000 0.186045 0.058955 \n",
"8206 356.06 0.162000 0.220725 0.058725 \n",
"33851 12.08 0.148000 0.202440 0.054440 \n",
"16409 141.05 0.000653 0.053918 0.053265 \n",
"18119 277.10 0.181000 0.129120 0.051880 \n",
"789 88.23 0.094100 0.042884 0.051216 \n",
"19446 239.07 0.004890 0.055066 0.050176 "
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"top10_df.sort_values(by=['abs_error'],ascending=False)"
]
},
{
"cell_type": "code",
"execution_count": 38,
"id": "d818261d-dc84-4475-a002-0a133077d973",
"metadata": {},
"outputs": [],
"source": [
"#Now the idea is to change the threshold 0.05, setting it for example to threshold=0.06, and see how the true positives etc. change\n",
"threshold=0.06\n",
"pred_binary_new=np.zeros_like(target)\n",
"for el in range(len(target)):\n",
" if (predictions[el]>threshold): #I will monitor with classical methods all the asteroids with predicted MOID <=0.06\n",
" pred_binary_new[el]=1"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "f9144c1d-8e7c-4dd4-b158-e1613310bcb5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number of asteroids to be tested with classical methods, for that value of the threshols: 20023\n",
"Number of asteroids with MOID<=0.05: 18291\n"
]
}
],
"source": [
"print(\"Number of asteroids to be tested with classical methods, for that value of the threshols:\", np.count_nonzero(predictions<=threshold))\n",
"print(\"Number of asteroids with MOID<=0.05:\",np.count_nonzero(target<=0.05))"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "83b77a9d-302b-4d43-9e17-08bf893c9342",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True positives: 14765\n",
"True negatives: 18215\n",
"False positives: 76\n",
"False negatives: 1808\n"
]
}
],
"source": [
"tp=np.count_nonzero((target_binary==1)&(pred_binary_new==1))\n",
"tn=np.count_nonzero((target_binary==0)&(pred_binary_new==0))\n",
"fp=np.count_nonzero((target_binary==0)&(pred_binary_new==1))\n",
"fn=np.count_nonzero((target_binary==1)&(pred_binary_new==0))\n",
"print(\"True positives:\", tp)\n",
"print(\"True negatives:\", tn)\n",
"print(\"False positives:\", fp)\n",
"print(\"False negatives:\", fn)"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "886f4902-9dc2-47a7-95ad-7033a4f96445",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.9459614502065168\n",
"Precision: 0.9948790512768682\n",
"Recall: 0.8909068967597901\n",
"False positive rate: 0.004155048931168334\n",
"F1-score: 0.9400267396702107\n"
]
}
],
"source": [
"acc=(tp+tn)/len(target) #accuracy\n",
"p=tp/(tp+fp) #precision\n",
"r=tp/(tp+fn) #recall\n",
"fpr=fp/(tn+fp) #false positive rate\n",
"f1=2*p*r/(p+r) #F1-score\n",
"print(\"Accuracy:\", acc)\n",
"print(\"Precision:\", p)\n",
"print(\"Recall:\", r)\n",
"print(\"False positive rate:\", fpr) #this modification reduces drastically the FPR\n",
"print(\"F1-score:\", f1)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "e9982d71-957c-4667-9a64-c766e56f3e5f",
"metadata": {},
"outputs": [],
"source": [
"ind_new=(target_binary==0)&(pred_binary_new==1)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "6f820801-fe0e-423c-a9ee-7273afbb1265",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_319274/4044024848.py:2: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" df_new['predicted_moid']=predictions[ind_new]\n",
"/tmp/ipykernel_319274/4044024848.py:3: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" df_new['abs_error']=abs_errors[ind_new]\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>spkid</th>\n",
" <th>pha</th>\n",
" <th>H</th>\n",
" <th>epoch_mjd</th>\n",
" <th>a</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>moid</th>\n",
" <th>predicted_moid</th>\n",
" <th>abs_error</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>677</th>\n",
" <td>20162116</td>\n",
" <td>Y</td>\n",
" <td>19.54</td>\n",
" <td>60400</td>\n",
" <td>1.9160</td>\n",
" <td>0.5584</td>\n",
" <td>7.11</td>\n",
" <td>114.18</td>\n",
" <td>331.43</td>\n",
" <td>193.35</td>\n",
" <td>0.0467</td>\n",
" <td>0.060036</td>\n",
" <td>0.013336</td>\n",
" </tr>\n",
" <tr>\n",
" <th>890</th>\n",
" <td>20202683</td>\n",
" <td>Y</td>\n",
" <td>19.78</td>\n",
" <td>60400</td>\n",
" <td>0.6371</td>\n",
" <td>0.5624</td>\n",
" <td>3.44</td>\n",
" <td>193.26</td>\n",
" <td>56.42</td>\n",
" <td>229.73</td>\n",
" <td>0.0439</td>\n",
" <td>0.079752</td>\n",
" <td>0.035852</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2034</th>\n",
" <td>20452376</td>\n",
" <td>Y</td>\n",
" <td>19.97</td>\n",
" <td>60400</td>\n",
" <td>1.7600</td>\n",
" <td>0.4937</td>\n",
" <td>16.55</td>\n",
" <td>82.37</td>\n",
" <td>331.71</td>\n",
" <td>206.05</td>\n",
" <td>0.0472</td>\n",
" <td>0.062537</td>\n",
" <td>0.015337</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2407</th>\n",
" <td>20488789</td>\n",
" <td>Y</td>\n",
" <td>19.13</td>\n",
" <td>60400</td>\n",
" <td>1.4510</td>\n",
" <td>0.6886</td>\n",
" <td>38.23</td>\n",
" <td>94.05</td>\n",
" <td>104.03</td>\n",
" <td>336.11</td>\n",
" <td>0.0414</td>\n",
" <td>0.062715</td>\n",
" <td>0.021315</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2658</th>\n",
" <td>20516454</td>\n",
" <td>N</td>\n",
" <td>18.65</td>\n",
" <td>60400</td>\n",
" <td>2.6630</td>\n",
" <td>0.7639</td>\n",
" <td>29.33</td>\n",
" <td>190.47</td>\n",
" <td>105.69</td>\n",
" <td>114.58</td>\n",
" <td>0.0500</td>\n",
" <td>0.065425</td>\n",
" <td>0.015425</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32328</th>\n",
" <td>54374822</td>\n",
" <td>N</td>\n",
" <td>23.96</td>\n",
" <td>60400</td>\n",
" <td>0.9413</td>\n",
" <td>0.2846</td>\n",
" <td>21.07</td>\n",
" <td>283.04</td>\n",
" <td>134.07</td>\n",
" <td>181.90</td>\n",
" <td>0.0496</td>\n",
" <td>0.062216</td>\n",
" <td>0.012616</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33630</th>\n",
" <td>54406861</td>\n",
" <td>N</td>\n",
" <td>22.52</td>\n",
" <td>60400</td>\n",
" <td>0.8561</td>\n",
" <td>0.4503</td>\n",
" <td>33.15</td>\n",
" <td>228.58</td>\n",
" <td>39.37</td>\n",
" <td>277.60</td>\n",
" <td>0.0437</td>\n",
" <td>0.063635</td>\n",
" <td>0.019935</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33636</th>\n",
" <td>54407112</td>\n",
" <td>N</td>\n",
" <td>26.29</td>\n",
" <td>60400</td>\n",
" <td>0.8843</td>\n",
" <td>0.1561</td>\n",
" <td>7.24</td>\n",
" <td>65.41</td>\n",
" <td>190.19</td>\n",
" <td>311.98</td>\n",
" <td>0.0308</td>\n",
" <td>0.061191</td>\n",
" <td>0.030391</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33682</th>\n",
" <td>54414533</td>\n",
" <td>Y</td>\n",
" <td>19.51</td>\n",
" <td>60400</td>\n",
" <td>4.6340</td>\n",
" <td>0.7999</td>\n",
" <td>13.91</td>\n",
" <td>67.26</td>\n",
" <td>136.58</td>\n",
" <td>335.88</td>\n",
" <td>0.0249</td>\n",
" <td>0.091175</td>\n",
" <td>0.066275</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34822</th>\n",
" <td>54439420</td>\n",
" <td>N</td>\n",
" <td>25.16</td>\n",
" <td>60400</td>\n",
" <td>0.9180</td>\n",
" <td>0.1544</td>\n",
" <td>9.66</td>\n",
" <td>50.30</td>\n",
" <td>355.84</td>\n",
" <td>137.57</td>\n",
" <td>0.0483</td>\n",
" <td>0.065098</td>\n",
" <td>0.016798</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>76 rows × 13 columns</p>\n",
"</div>"
],
"text/plain": [
" spkid pha H epoch_mjd a e i om w \\\n",
"677 20162116 Y 19.54 60400 1.9160 0.5584 7.11 114.18 331.43 \n",
"890 20202683 Y 19.78 60400 0.6371 0.5624 3.44 193.26 56.42 \n",
"2034 20452376 Y 19.97 60400 1.7600 0.4937 16.55 82.37 331.71 \n",
"2407 20488789 Y 19.13 60400 1.4510 0.6886 38.23 94.05 104.03 \n",
"2658 20516454 N 18.65 60400 2.6630 0.7639 29.33 190.47 105.69 \n",
"... ... .. ... ... ... ... ... ... ... \n",
"32328 54374822 N 23.96 60400 0.9413 0.2846 21.07 283.04 134.07 \n",
"33630 54406861 N 22.52 60400 0.8561 0.4503 33.15 228.58 39.37 \n",
"33636 54407112 N 26.29 60400 0.8843 0.1561 7.24 65.41 190.19 \n",
"33682 54414533 Y 19.51 60400 4.6340 0.7999 13.91 67.26 136.58 \n",
"34822 54439420 N 25.16 60400 0.9180 0.1544 9.66 50.30 355.84 \n",
"\n",
" ma moid predicted_moid abs_error \n",
"677 193.35 0.0467 0.060036 0.013336 \n",
"890 229.73 0.0439 0.079752 0.035852 \n",
"2034 206.05 0.0472 0.062537 0.015337 \n",
"2407 336.11 0.0414 0.062715 0.021315 \n",
"2658 114.58 0.0500 0.065425 0.015425 \n",
"... ... ... ... ... \n",
"32328 181.90 0.0496 0.062216 0.012616 \n",
"33630 277.60 0.0437 0.063635 0.019935 \n",
"33636 311.98 0.0308 0.061191 0.030391 \n",
"33682 335.88 0.0249 0.091175 0.066275 \n",
"34822 137.57 0.0483 0.065098 0.016798 \n",
"\n",
"[76 rows x 13 columns]"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_new=df.iloc[ind_new,:]\n",
"df_new['predicted_moid']=predictions[ind_new]\n",
"df_new['abs_error']=abs_errors[ind_new]\n",
"df_new"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "4bdec185-f6a8-4d7c-ac93-c93b106e605d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>spkid</th>\n",
" <th>pha</th>\n",
" <th>H</th>\n",
" <th>epoch_mjd</th>\n",
" <th>a</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>moid</th>\n",
" <th>predicted_moid</th>\n",
" <th>abs_error</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>33682</th>\n",
" <td>54414533</td>\n",
" <td>Y</td>\n",
" <td>19.51</td>\n",
" <td>60400</td>\n",
" <td>4.6340</td>\n",
" <td>0.7999</td>\n",
" <td>13.91</td>\n",
" <td>67.26</td>\n",
" <td>136.58</td>\n",
" <td>335.88</td>\n",
" <td>0.0249</td>\n",
" <td>0.091175</td>\n",
" <td>0.066275</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6647</th>\n",
" <td>3444376</td>\n",
" <td>N</td>\n",
" <td>25.10</td>\n",
" <td>60400</td>\n",
" <td>1.0210</td>\n",
" <td>0.1399</td>\n",
" <td>1.02</td>\n",
" <td>24.73</td>\n",
" <td>195.03</td>\n",
" <td>179.96</td>\n",
" <td>0.0163</td>\n",
" <td>0.063510</td>\n",
" <td>0.047210</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28936</th>\n",
" <td>54278256</td>\n",
" <td>N</td>\n",
" <td>23.31</td>\n",
" <td>59706</td>\n",
" <td>2.8080</td>\n",
" <td>0.9576</td>\n",
" <td>42.86</td>\n",
" <td>226.93</td>\n",
" <td>213.04</td>\n",
" <td>8.65</td>\n",
" <td>0.0414</td>\n",
" <td>0.088165</td>\n",
" <td>0.046765</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23452</th>\n",
" <td>54051248</td>\n",
" <td>N</td>\n",
" <td>24.20</td>\n",
" <td>60400</td>\n",
" <td>1.0430</td>\n",
" <td>0.2337</td>\n",
" <td>1.16</td>\n",
" <td>216.70</td>\n",
" <td>2.99</td>\n",
" <td>223.88</td>\n",
" <td>0.0198</td>\n",
" <td>0.065217</td>\n",
" <td>0.045417</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31198</th>\n",
" <td>54340154</td>\n",
" <td>N</td>\n",
" <td>23.67</td>\n",
" <td>60400</td>\n",
" <td>0.9775</td>\n",
" <td>0.2061</td>\n",
" <td>1.54</td>\n",
" <td>187.80</td>\n",
" <td>173.43</td>\n",
" <td>183.23</td>\n",
" <td>0.0239</td>\n",
" <td>0.068303</td>\n",
" <td>0.044403</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4407</th>\n",
" <td>3182169</td>\n",
" <td>N</td>\n",
" <td>23.74</td>\n",
" <td>60400</td>\n",
" <td>1.0850</td>\n",
" <td>0.1756</td>\n",
" <td>1.50</td>\n",
" <td>143.81</td>\n",
" <td>1.97</td>\n",
" <td>275.99</td>\n",
" <td>0.0232</td>\n",
" <td>0.067033</td>\n",
" <td>0.043833</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19542</th>\n",
" <td>3837918</td>\n",
" <td>N</td>\n",
" <td>24.10</td>\n",
" <td>60400</td>\n",
" <td>0.9777</td>\n",
" <td>0.1767</td>\n",
" <td>2.54</td>\n",
" <td>96.51</td>\n",
" <td>163.83</td>\n",
" <td>10.43</td>\n",
" <td>0.0378</td>\n",
" <td>0.081507</td>\n",
" <td>0.043707</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25983</th>\n",
" <td>54147140</td>\n",
" <td>N</td>\n",
" <td>28.28</td>\n",
" <td>60400</td>\n",
" <td>0.8896</td>\n",
" <td>0.1564</td>\n",
" <td>5.82</td>\n",
" <td>234.62</td>\n",
" <td>184.32</td>\n",
" <td>328.81</td>\n",
" <td>0.0171</td>\n",
" <td>0.060061</td>\n",
" <td>0.042961</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14165</th>\n",
" <td>3748472</td>\n",
" <td>N</td>\n",
" <td>26.90</td>\n",
" <td>60400</td>\n",
" <td>1.0060</td>\n",
" <td>0.1655</td>\n",
" <td>2.12</td>\n",
" <td>223.95</td>\n",
" <td>198.79</td>\n",
" <td>92.53</td>\n",
" <td>0.0336</td>\n",
" <td>0.075980</td>\n",
" <td>0.042380</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23260</th>\n",
" <td>54049796</td>\n",
" <td>N</td>\n",
" <td>26.90</td>\n",
" <td>60400</td>\n",
" <td>0.9006</td>\n",
" <td>0.1853</td>\n",
" <td>20.03</td>\n",
" <td>303.50</td>\n",
" <td>165.03</td>\n",
" <td>311.17</td>\n",
" <td>0.0433</td>\n",
" <td>0.084399</td>\n",
" <td>0.041099</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" spkid pha H epoch_mjd a e i om w \\\n",
"33682 54414533 Y 19.51 60400 4.6340 0.7999 13.91 67.26 136.58 \n",
"6647 3444376 N 25.10 60400 1.0210 0.1399 1.02 24.73 195.03 \n",
"28936 54278256 N 23.31 59706 2.8080 0.9576 42.86 226.93 213.04 \n",
"23452 54051248 N 24.20 60400 1.0430 0.2337 1.16 216.70 2.99 \n",
"31198 54340154 N 23.67 60400 0.9775 0.2061 1.54 187.80 173.43 \n",
"4407 3182169 N 23.74 60400 1.0850 0.1756 1.50 143.81 1.97 \n",
"19542 3837918 N 24.10 60400 0.9777 0.1767 2.54 96.51 163.83 \n",
"25983 54147140 N 28.28 60400 0.8896 0.1564 5.82 234.62 184.32 \n",
"14165 3748472 N 26.90 60400 1.0060 0.1655 2.12 223.95 198.79 \n",
"23260 54049796 N 26.90 60400 0.9006 0.1853 20.03 303.50 165.03 \n",
"\n",
" ma moid predicted_moid abs_error \n",
"33682 335.88 0.0249 0.091175 0.066275 \n",
"6647 179.96 0.0163 0.063510 0.047210 \n",
"28936 8.65 0.0414 0.088165 0.046765 \n",
"23452 223.88 0.0198 0.065217 0.045417 \n",
"31198 183.23 0.0239 0.068303 0.044403 \n",
"4407 275.99 0.0232 0.067033 0.043833 \n",
"19542 10.43 0.0378 0.081507 0.043707 \n",
"25983 328.81 0.0171 0.060061 0.042961 \n",
"14165 92.53 0.0336 0.075980 0.042380 \n",
"23260 311.17 0.0433 0.084399 0.041099 "
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_new.sort_values(by=['abs_error'],ascending=False).head(10)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
}
},
"nbformat": 4,
"nbformat_minor": 5
}