5 Комити f2ced484b6 ... 0cdc965e59

Аутор SHA1 Порука Датум
  phillip.rothenbeck 0cdc965e59 add paper solution пре 1 година
  phillip.rothenbeck 13b580f3cd add paper data пре 1 година
  phillip.rothenbeck f468c2c78b fix to new functioning пре 1 година
  phillip.rothenbeck b5e9e225f3 reformat пре 1 година
  phillip.rothenbeck c7fc587487 do only I gif and reformet пре 1 година
4 измењених фајлова са 718 додато и 107 уклоњено
  1. 323 11
      data.ipynb
  2. 1 1
      germany_dinn_sir.ipynb
  3. 268 0
      paper_sir_dinn.ipynb
  4. 126 95
      src/dinn.py

+ 323 - 11
data.ipynb

@@ -2,7 +2,7 @@
  "cells": [
  "cells": [
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 2,
+   "execution_count": 1,
    "metadata": {},
    "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
@@ -10,14 +10,14 @@
     "import numpy as np\n",
     "import numpy as np\n",
     "\n",
     "\n",
     "from src.preprocessing.synthetic_data import SIR, I\n",
     "from src.preprocessing.synthetic_data import SIR, I\n",
-    "from src.preprocessing.transform_data import transform_data\n",
+    "from src.preprocessing.transform_data import transform_data, transform_jh_germany_data, transform_paper_data\n",
     "\n",
     "\n",
     "from src.plotter import Plotter"
     "from src.plotter import Plotter"
    ]
    ]
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 3,
+   "execution_count": 2,
    "metadata": {},
    "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
@@ -26,7 +26,16 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "transform_paper_data()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
    "metadata": {},
    "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
@@ -50,7 +59,7 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 4,
    "metadata": {},
    "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
@@ -81,7 +90,7 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 5,
    "metadata": {},
    "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
@@ -93,7 +102,7 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 7,
+   "execution_count": 6,
    "metadata": {},
    "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
@@ -105,7 +114,7 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": 8,
+   "execution_count": 7,
    "metadata": {},
    "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
@@ -162,10 +171,313 @@
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 8,
    "metadata": {},
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "outputs": [
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:48: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  infections[i] = date_df['Confirmed'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:49: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  deaths[i] = date_df['Deaths'].fillna(0).astype(int)\n",
+      "/home/rothenbeck/Covid_19_DINN/src/preprocessing/transform_data.py:50: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n",
+      "  recoveries[i] = date_df['Recovered'].fillna(0).astype(int)\n"
+     ]
+    }
+   ],
+   "source": [
+    "transform_jh_germany_data(plotter, model=\"SIR\")"
+   ]
   }
   }
  ],
  ],
  "metadata": {
  "metadata": {

+ 1 - 1
germany_dinn_sir.ipynb

@@ -420,7 +420,7 @@
     "    dataset = PandemicDataset(dataset_name, ['S', 'I', 'R'], 83100000, *covid_data)\n",
     "    dataset = PandemicDataset(dataset_name, ['S', 'I', 'R'], 83100000, *covid_data)\n",
     "    problem = SIRProblem(dataset)\n",
     "    problem = SIRProblem(dataset)\n",
     "    dinn = DINN(3, dataset, ['alpha', 'beta'], problem, plotter)\n",
     "    dinn = DINN(3, dataset, ['alpha', 'beta'], problem, plotter)\n",
-    "    dinn.configure_training(1e-3, 10000, scheduler_name='PolynomialLR', verbose=True)\n",
+    "    dinn.configure_training(1e-3, 10000, scheduler_name=Scheduler.POLYNOMIAL, verbose=True)\n",
     "    dinn.train(create_animation=True, animation_sample_rate=100, verbose=True)\n",
     "    dinn.train(create_animation=True, animation_sample_rate=100, verbose=True)\n",
     "    dinn.plot_training_graphs()"
     "    dinn.plot_training_graphs()"
    ]
    ]

+ 268 - 0
paper_sir_dinn.ipynb

@@ -0,0 +1,268 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import numpy as np\n",
+    "import torch\n",
+    "\n",
+    "from src.dataset import PandemicDataset, Norms\n",
+    "from src.problem import SIRAlphaProblem\n",
+    "from src.dinn import DINN, Scheduler, Activation, Optimizer\n",
+    "from src.plotter import Plotter\n",
+    "# torch.manual_seed(18361969907809597111)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Load Data"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "covid_data = np.genfromtxt(f'./datasets/SIR_Paper_Germany_14.csv', delimiter=',')\n",
+    "dataset = PandemicDataset(\"SIR_Paper_Germany_14\", \n",
+    "                          ['S', 'I', 'R'], \n",
+    "                          70000000, \n",
+    "                          *covid_data, \n",
+    "                          norm_name=Norms.MIN_MAX) \n",
+    "\n",
+    "ALPHA = 0.07"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Configure"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "Learning Rate:\t0.001\n",
+      "Optimizer:\tADAM\n",
+      "Scheduler:\tPOLYNOMIAL\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "plotter = Plotter()\n",
+    "\n",
+    "problem = SIRAlphaProblem(dataset, ALPHA)\n",
+    "dinn = DINN(3, \n",
+    "            dataset, \n",
+    "            ['beta'], \n",
+    "            problem, \n",
+    "            plotter,\n",
+    "            hidden_size=64, \n",
+    "            hidden_layers=12, \n",
+    "            activation_layer=torch.nn.Tanh(),\n",
+    "            activation_output=Activation.POWER)\n",
+    "dinn.configure_training(1e-3, \n",
+    "                        15000, \n",
+    "                        scheduler_class=Scheduler.POLYNOMIAL, \n",
+    "                        optimizer_class=Optimizer.ADAM,\n",
+    "                        lambda_obs=1e1, \n",
+    "                        verbose=True)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "torch seed: 4462685050789905541\n"
+     ]
+    },
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "Epoch 0 | LR 0.0009999333333333333\n",
+      "physics loss:\t\t4.160715663590364e-05\n",
+      "observation loss:\t9.556413235291215\n",
+      "loss:\t\t\t9.55645484244785\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.6011705994606018\n",
+      "#################################\n",
+      "\n",
+      "Epoch 1000 | LR 0.0009332666666666524\n",
+      "physics loss:\t\t0.0009664472242609449\n",
+      "observation loss:\t0.0017112362767341596\n",
+      "loss:\t\t\t0.0026776835009951045\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.2550368905067444\n",
+      "#################################\n",
+      "\n",
+      "Epoch 2000 | LR 0.0008665999999999833\n",
+      "physics loss:\t\t0.001247615250807723\n",
+      "observation loss:\t0.0040488860826972005\n",
+      "loss:\t\t\t0.005296501333504924\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.253487229347229\n",
+      "#################################\n",
+      "\n",
+      "Epoch 3000 | LR 0.000799933333333315\n",
+      "physics loss:\t\t0.00044841892062854347\n",
+      "observation loss:\t0.012716515333301339\n",
+      "loss:\t\t\t0.013164934253929882\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.25267982482910156\n",
+      "#################################\n",
+      "\n",
+      "Epoch 4000 | LR 0.000733266666666649\n",
+      "physics loss:\t\t0.001045761999967263\n",
+      "observation loss:\t0.00025607909237615716\n",
+      "loss:\t\t\t0.00130184109234342\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.24764902889728546\n",
+      "#################################\n",
+      "\n",
+      "Epoch 5000 | LR 0.0006665999999999824\n",
+      "physics loss:\t\t0.0014444880255704616\n",
+      "observation loss:\t0.00014856713535789037\n",
+      "loss:\t\t\t0.001593055160928352\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.2412654012441635\n",
+      "#################################\n",
+      "\n",
+      "Epoch 6000 | LR 0.0005999333333333129\n",
+      "physics loss:\t\t0.001605141155981103\n",
+      "observation loss:\t0.00013662428319793931\n",
+      "loss:\t\t\t0.0017417654391790425\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.23936264216899872\n",
+      "#################################\n",
+      "\n",
+      "Epoch 7000 | LR 0.0005332666666666435\n",
+      "physics loss:\t\t0.00190968670757966\n",
+      "observation loss:\t0.00012329566674995849\n",
+      "loss:\t\t\t0.0020329823743296185\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.23441843688488007\n",
+      "#################################\n",
+      "\n",
+      "Epoch 8000 | LR 0.0004665999999999755\n",
+      "physics loss:\t\t0.0019683097313949755\n",
+      "observation loss:\t0.00011957883463252119\n",
+      "loss:\t\t\t0.0020878885660274966\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.2345646470785141\n",
+      "#################################\n",
+      "\n",
+      "Epoch 9000 | LR 0.0003999333333333152\n",
+      "physics loss:\t\t0.0023533661719838616\n",
+      "observation loss:\t0.00011510529573689898\n",
+      "loss:\t\t\t0.0024684714677207604\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.22906526923179626\n",
+      "#################################\n",
+      "\n",
+      "Epoch 10000 | LR 0.00033326666666665735\n",
+      "physics loss:\t\t0.0025831233331882735\n",
+      "observation loss:\t0.00011076522614630127\n",
+      "loss:\t\t\t0.002693888559334575\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.22521229088306427\n",
+      "#################################\n",
+      "\n",
+      "Epoch 11000 | LR 0.00026659999999999987\n",
+      "physics loss:\t\t0.002667692420961139\n",
+      "observation loss:\t0.00010629412421269853\n",
+      "loss:\t\t\t0.0027739865451738375\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.22304710745811462\n",
+      "#################################\n",
+      "\n",
+      "Epoch 12000 | LR 0.0001999333333333354\n",
+      "physics loss:\t\t0.002831200195029232\n",
+      "observation loss:\t0.00015541454626586456\n",
+      "loss:\t\t\t0.0029866147412950968\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.2231626659631729\n",
+      "#################################\n",
+      "\n",
+      "Epoch 13000 | LR 0.0001332666666666689\n",
+      "physics loss:\t\t0.002496475121496725\n",
+      "observation loss:\t9.74420291549779e-05\n",
+      "loss:\t\t\t0.002593917150651703\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.22342386841773987\n",
+      "#################################\n",
+      "\n",
+      "Epoch 14000 | LR 6.660000000000055e-05\n",
+      "physics loss:\t\t0.0024228574550409178\n",
+      "observation loss:\t9.359204257759588e-05\n",
+      "loss:\t\t\t0.0025164494976185137\n",
+      "---------------------------------\n",
+      "beta:\t\t\t0.2237681895494461\n",
+      "#################################\n"
+     ]
+    }
+   ],
+   "source": [
+    "dinn.train(create_animation=True, \n",
+    "           plot_I_prediction=True, \n",
+    "           verbose=True) "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "dinn.plot_training_graphs()"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "PINN",
+   "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.11.7"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

+ 126 - 95
src/dinn.py

@@ -8,38 +8,43 @@ from .dataset import PandemicDataset
 from .problem import PandemicProblem
 from .problem import PandemicProblem
 from .plotter import Plotter
 from .plotter import Plotter
 
 
+
 class Optimizer(Enum):
 class Optimizer(Enum):
-    ADAM=0
+    ADAM = 0
+
 
 
 class Scheduler(Enum):
 class Scheduler(Enum):
-    CYCLIC=0
-    CONSTANT=1
-    LINEAR=2
-    POLYNOMIAL=3
+    CYCLIC = 0
+    CONSTANT = 1
+    LINEAR = 2
+    POLYNOMIAL = 3
+
 
 
 class Activation(Enum):
 class Activation(Enum):
-    LINEAR=0
-    POWER=1
+    LINEAR = 0
+    POWER = 1
+
 
 
 def linear(x):
 def linear(x):
     return x
     return x
-        
+
+
 def power(x):
 def power(x):
     return torch.float_power(x, 2)
     return torch.float_power(x, 2)
 
 
 
 
 class DINN:
 class DINN:
     class NN(torch.nn.Module):
     class NN(torch.nn.Module):
-        def __init__(self, 
+        def __init__(self,
                      output_size: int,
                      output_size: int,
                      input_size: int,
                      input_size: int,
                      hidden_size: int,
                      hidden_size: int,
-                     hidden_layers: int, 
+                     hidden_layers: int,
                      activation_layer,
                      activation_layer,
                      t_init,
                      t_init,
                      t_final,
                      t_final,
                      output_activation_function=Activation.LINEAR,
                      output_activation_function=Activation.LINEAR,
-                     use_glorot_initialization = False,
+                     use_glorot_initialization=False,
                      use_t_scaled=True) -> None:
                      use_t_scaled=True) -> None:
             """Neural Network
             """Neural Network
 
 
@@ -60,8 +65,10 @@ class DINN:
                 print('Set output activation to default: linear')
                 print('Set output activation to default: linear')
                 self.out_activation = self.linear
                 self.out_activation = self.linear
 
 
-            self.input = torch.nn.Sequential(torch.nn.Linear(input_size, hidden_size), activation_layer)
-            self.hidden = torch.nn.Sequential(*[torch.nn.Sequential(torch.nn.Linear(hidden_size, hidden_size), activation_layer) for _ in range(hidden_layers)])
+            self.input = torch.nn.Sequential(torch.nn.Linear(
+                input_size, hidden_size), activation_layer)
+            self.hidden = torch.nn.Sequential(*[torch.nn.Sequential(torch.nn.Linear(
+                hidden_size, hidden_size), activation_layer) for _ in range(hidden_layers)])
             self.output = torch.nn.Linear(hidden_size, output_size)
             self.output = torch.nn.Linear(hidden_size, output_size)
 
 
             if use_glorot_initialization:
             if use_glorot_initialization:
@@ -69,7 +76,7 @@ class DINN:
                 for i in range(hidden_layers):
                 for i in range(hidden_layers):
                     torch.nn.init.xavier_uniform_(self.hidden[i][0].weight)
                     torch.nn.init.xavier_uniform_(self.hidden[i][0].weight)
                 torch.nn.init.xavier_uniform_(self.output.weight)
                 torch.nn.init.xavier_uniform_(self.output.weight)
-            
+
             self.__t_init = t_init
             self.__t_init = t_init
             self.__t_final = t_final
             self.__t_final = t_final
             self.__use_t_scaled = use_t_scaled
             self.__use_t_scaled = use_t_scaled
@@ -77,14 +84,15 @@ class DINN:
         def forward(self, t):
         def forward(self, t):
             # normalize input
             # normalize input
             if self.__use_t_scaled:
             if self.__use_t_scaled:
-                t_forward = (t - self.__t_init) / (self.__t_final - self.__t_init)
+                t_forward = (t - self.__t_init) / \
+                    (self.__t_final - self.__t_init)
             else:
             else:
                 t_forward = t
                 t_forward = t
             x = self.input(t_forward)
             x = self.input(t_forward)
             x = self.hidden(x)
             x = self.hidden(x)
             x = self.output(x)
             x = self.output(x)
             return self.out_activation(x)
             return self.out_activation(x)
-    
+
     def __init__(self,
     def __init__(self,
                  output_size: int,
                  output_size: int,
                  data: PandemicDataset,
                  data: PandemicDataset,
@@ -93,12 +101,12 @@ class DINN:
                  plotter: Plotter,
                  plotter: Plotter,
                  state_variables=[],
                  state_variables=[],
                  parameter_regulator=torch.tanh,
                  parameter_regulator=torch.tanh,
-                 input_size=1, 
-                 hidden_size=20, 
-                 hidden_layers=7, 
+                 input_size=1,
+                 hidden_size=20,
+                 hidden_layers=7,
                  activation_layer=torch.nn.ReLU(),
                  activation_layer=torch.nn.ReLU(),
                  activation_output=Activation.LINEAR,
                  activation_output=Activation.LINEAR,
-                 use_glorot_initialization = False) -> None:
+                 use_glorot_initialization=False) -> None:
         """Desease Informed Neural Network. Uses the PandemicProblem, DINN.NN and PandemicDataset to solve Inverse Problems and find the 
         """Desease Informed Neural Network. Uses the PandemicProblem, DINN.NN and PandemicDataset to solve Inverse Problems and find the 
         parameters of a specific mathematical model.
         parameters of a specific mathematical model.
 
 
@@ -115,17 +123,18 @@ class DINN:
             hidden_layers (int, optional): Number of the hidden layers for the NN. Defaults to 7.
             hidden_layers (int, optional): Number of the hidden layers for the NN. Defaults to 7.
             activation_layer (optional): Class of the activation function. Defaults to torch.nn.ReLU().
             activation_layer (optional): Class of the activation function. Defaults to torch.nn.ReLU().
         """
         """
-        assert len(state_variables) + data.number_groups == output_size, f'The number of groups plus the number of state variable must result in the output size\nGroups:\t{data.number_groups}\nState variables:\t{len(state_variables)}\noutput_size: {output_size}\n'
+        assert len(state_variables) + \
+            data.number_groups == output_size, f'The number of groups plus the number of state variable must result in the output size\nGroups:\t{data.number_groups}\nState variables:\t{len(state_variables)}\noutput_size: {output_size}\n'
         self.device = torch.device(data.device_name)
         self.device = torch.device(data.device_name)
         self.device_name = data.device_name
         self.device_name = data.device_name
         self.plotter = plotter
         self.plotter = plotter
 
 
-        self.model = DINN.NN(output_size, 
-                             input_size, 
-                             hidden_size, 
-                             hidden_layers, 
+        self.model = DINN.NN(output_size,
+                             input_size,
+                             hidden_size,
+                             hidden_layers,
                              activation_layer,
                              activation_layer,
-                             data.t_init, 
+                             data.t_init,
                              data.t_final,
                              data.t_final,
                              activation_output,
                              activation_output,
                              use_glorot_initialization=use_glorot_initialization,
                              use_glorot_initialization=use_glorot_initialization,
@@ -138,7 +147,8 @@ class DINN:
 
 
         self.parameters_tilda = {}
         self.parameters_tilda = {}
         for parameter in parameter_list:
         for parameter in parameter_list:
-            self.parameters_tilda.update({parameter : torch.nn.Parameter(torch.rand(1, requires_grad=True, device=self.device_name))})
+            self.parameters_tilda.update({parameter: torch.nn.Parameter(
+                torch.rand(1, requires_grad=True, device=self.device_name))})
 
 
         # new model has to be configured and then trained
         # new model has to be configured and then trained
         self.__is_configured = False
         self.__is_configured = False
@@ -164,7 +174,7 @@ class DINN:
             torch.Parameter: Regulated parameter object of the search parameter.
             torch.Parameter: Regulated parameter object of the search parameter.
         """
         """
         return self.parameter_regulator(self.parameters_tilda[parameter_name])
         return self.parameter_regulator(self.parameters_tilda[parameter_name])
-    
+
     def get_parameters_tilda(self):
     def get_parameters_tilda(self):
         """Function to get the original value (not forced into any range).
         """Function to get the original value (not forced into any range).
 
 
@@ -181,19 +191,18 @@ class DINN:
         """
         """
         return [self.parameter_regulator(parameter) for parameter in self.get_parameters_tilda()]
         return [self.parameter_regulator(parameter) for parameter in self.get_parameters_tilda()]
 
 
-    
     def get_output(self, index):
     def get_output(self, index):
         output = self.model(self.data.t_batch)
         output = self.model(self.data.t_batch)
         return output[:, index]
         return output[:, index]
-    
-    def configure_training(self, 
-                           lr:float, 
-                           epochs:int, 
-                           optimizer_class=Optimizer.ADAM, 
-                           scheduler_class=Scheduler.CYCLIC, 
-                           scheduler_factor = 1, 
-                           lambda_obs = 1,
-                           lambda_physics = 1,
+
+    def configure_training(self,
+                           lr: float,
+                           epochs: int,
+                           optimizer_class=Optimizer.ADAM,
+                           scheduler_class=Scheduler.CYCLIC,
+                           scheduler_factor=1,
+                           lambda_obs=1,
+                           lambda_physics=1,
                            verbose=False):
                            verbose=False):
         """This method sets the optimizer, scheduler, learning rate and number of epochs for the following training process.
         """This method sets the optimizer, scheduler, learning rate and number of epochs for the following training process.
 
 
@@ -204,7 +213,8 @@ class DINN:
             scheduler_name (str, optional): Name of the scheduler class that is supposed to be used. Defaults to 'CyclicLR'.
             scheduler_name (str, optional): Name of the scheduler class that is supposed to be used. Defaults to 'CyclicLR'.
             verbose (bool, optional): Controles if the configuration process, is to be verbosed. Defaults to False.
             verbose (bool, optional): Controles if the configuration process, is to be verbosed. Defaults to False.
         """
         """
-        parameter_list = list(self.model.parameters()) + list(self.parameters_tilda.values())
+        parameter_list = list(self.model.parameters()) + \
+            list(self.parameters_tilda.values())
         self.epochs = epochs
         self.epochs = epochs
         self.lambda_obs = lambda_obs
         self.lambda_obs = lambda_obs
         self.lambda_physics = lambda_physics
         self.lambda_physics = lambda_physics
@@ -215,34 +225,41 @@ class DINN:
                 self.optimizer = torch.optim.Adam(parameter_list, lr=lr)
                 self.optimizer = torch.optim.Adam(parameter_list, lr=lr)
                 if verbose:
                 if verbose:
                     print('---------------------------------')
                     print('---------------------------------')
-                    print(f' Entered unknown optimizer name: {optimizer_class.name}\n Defaulted to ADAM.')
+                    print(
+                        f' Entered unknown optimizer name: {optimizer_class.name}\n Defaulted to ADAM.')
                     print('---------------------------------')
                     print('---------------------------------')
                 optimizer_class = Optimizer.ADAM
                 optimizer_class = Optimizer.ADAM
 
 
         match scheduler_class:
         match scheduler_class:
             case Scheduler.CYCLIC:
             case Scheduler.CYCLIC:
-                self.scheduler = torch.optim.lr_scheduler.CyclicLR(self.optimizer, base_lr=lr * 10, max_lr=lr * 1e3, step_size_up=1000, mode="exp_range", gamma=0.85, cycle_momentum=False)
+                self.scheduler = torch.optim.lr_scheduler.CyclicLR(
+                    self.optimizer, base_lr=lr * 10, max_lr=lr * 1e3, step_size_up=1000, mode="exp_range", gamma=0.85, cycle_momentum=False)
             case Scheduler.CONSTANT:
             case Scheduler.CONSTANT:
-                self.scheduler = torch.optim.lr_scheduler.ConstantLR(self.optimizer, factor=1, total_iters=4)
+                self.scheduler = torch.optim.lr_scheduler.ConstantLR(
+                    self.optimizer, factor=1, total_iters=4)
             case Scheduler.LINEAR:
             case Scheduler.LINEAR:
-                self.scheduler = torch.optim.lr_scheduler.LinearLR(self.optimizer, start_factor=lr, total_iters=epochs/scheduler_factor)
+                self.scheduler = torch.optim.lr_scheduler.LinearLR(
+                    self.optimizer, start_factor=lr, total_iters=epochs / scheduler_factor)
             case Scheduler.POLYNOMIAL:
             case Scheduler.POLYNOMIAL:
-                self.scheduler = torch.optim.lr_scheduler.PolynomialLR(self.optimizer, total_iters=epochs/scheduler_factor, power=1.0)
+                self.scheduler = torch.optim.lr_scheduler.PolynomialLR(
+                    self.optimizer, total_iters=epochs / scheduler_factor, power=1.0)
             case _:
             case _:
-                self.scheduler = torch.optim.lr_scheduler.CyclicLR(self.optimizer, base_lr=lr * 10, max_lr=lr * 1e3, step_size_up=1000, mode="exp_range", gamma=0.85, cycle_momentum=False)
+                self.scheduler = torch.optim.lr_scheduler.CyclicLR(
+                    self.optimizer, base_lr=lr * 10, max_lr=lr * 1e3, step_size_up=1000, mode="exp_range", gamma=0.85, cycle_momentum=False)
                 if verbose:
                 if verbose:
                     print('---------------------------------')
                     print('---------------------------------')
-                    print(f' Entered unknown scheduler name: {scheduler_class.name}\n Defaulted to CYCLIC.')
+                    print(
+                        f' Entered unknown scheduler name: {scheduler_class.name}\n Defaulted to CYCLIC.')
                     print('---------------------------------')
                     print('---------------------------------')
                 scheduler_class = Scheduler.CYCLIC
                 scheduler_class = Scheduler.CYCLIC
 
 
         if verbose:
         if verbose:
-            print(f'\nLearning Rate:\t{lr}\nOptimizer:\t{optimizer_class.name}\nScheduler:\t{scheduler_class.name}\n')
+            print(
+                f'\nLearning Rate:\t{lr}\nOptimizer:\t{optimizer_class.name}\nScheduler:\t{scheduler_class.name}\n')
 
 
         self.__is_configured = True
         self.__is_configured = True
 
 
-    
-    def train(self, 
+    def train(self,
               create_animation=False,
               create_animation=False,
               animation_sample_rate=500,
               animation_sample_rate=500,
               verbose=False,
               verbose=False,
@@ -258,7 +275,7 @@ class DINN:
         assert self.__is_configured, 'The model has to be configured before training through the use of self.configure training.'
         assert self.__is_configured, 'The model has to be configured before training through the use of self.configure training.'
         if verbose:
         if verbose:
             print(f'torch seed: {torch.seed()}')
             print(f'torch seed: {torch.seed()}')
-        
+
         # arrays to hold values for plotting
         # arrays to hold values for plotting
         self.losses = np.zeros(self.epochs)
         self.losses = np.zeros(self.epochs)
         self.obs_losses = np.zeros(self.epochs)
         self.obs_losses = np.zeros(self.epochs)
@@ -268,7 +285,8 @@ class DINN:
         for epoch in range(self.epochs):
         for epoch in range(self.epochs):
             # get the prediction and the fitting residuals
             # get the prediction and the fitting residuals
             prediction = self.model(self.data.t_batch)
             prediction = self.model(self.data.t_batch)
-            residuals = self.problem.residual(prediction, *self.get_regulated_param_list())
+            residuals = self.problem.residual(
+                prediction, *self.get_regulated_param_list())
             self.optimizer.zero_grad()
             self.optimizer.zero_grad()
 
 
             # calculate loss from the differential system
             # calculate loss from the differential system
@@ -280,9 +298,10 @@ class DINN:
             # calculate loss from the dataset
             # calculate loss from the dataset
             loss_obs = 0
             loss_obs = 0
             for i, group in enumerate(self.data.group_names):
             for i, group in enumerate(self.data.group_names):
-                loss_obs += torch.mean(torch.square(self.data.get_norm(group) - prediction[:, i]))
+                loss_obs += torch.mean(torch.square(
+                    self.data.get_norm(group) - prediction[:, i]))
             loss_obs *= self.lambda_obs
             loss_obs *= self.lambda_obs
-            
+
             if do_split_training:
             if do_split_training:
                 if epoch < start_split:
                 if epoch < start_split:
                     loss = loss_obs
                     loss = loss_obs
@@ -300,41 +319,45 @@ class DINN:
             self.obs_losses[epoch] = loss_obs.item()
             self.obs_losses[epoch] = loss_obs.item()
             self.physics_losses[epoch] = loss_physics.item()
             self.physics_losses[epoch] = loss_physics.item()
             for i, parameter in enumerate(self.parameters_tilda.items()):
             for i, parameter in enumerate(self.parameters_tilda.items()):
-                self.parameters[i][epoch] = self.get_regulated_param(parameter[0]).item()
+                self.parameters[i][epoch] = self.get_regulated_param(
+                    parameter[0]).item()
 
 
             # do snapshot for prediction animation
             # do snapshot for prediction animation
             if epoch % animation_sample_rate == 0 and create_animation:
             if epoch % animation_sample_rate == 0 and create_animation:
                 # prediction
                 # prediction
                 prediction = self.model(self.data.t_batch)
                 prediction = self.model(self.data.t_batch)
-                t = torch.arange(0, self.data.t_raw[-1].item(), (self.data.t_raw[-1] / self.data.t_raw.shape[0]).item())
-                groups = self.data.get_denormalized_data([prediction[:, i] for i in range(self.data.number_groups)])
-
-                plot_labels = [name + '_pred' for name in self.data.group_names] + [name + '_true' for name in self.data.group_names]
-                background_list = [0 for _ in self.data.group_names] + [1 for _ in self.data.group_names]
-                self.plotter.plot(t, 
-                                  list(groups) + list(self.data.data), 
+                t = torch.arange(
+                    0, self.data.t_raw[-1].item(), (self.data.t_raw[-1] / self.data.t_raw.shape[0]).item())
+                groups = self.data.get_denormalized_data(
+                    [prediction[:, i] for i in range(self.data.number_groups)])
+
+                plot_labels = ['I_pred', 'I_true']
+                background_list = [0, 1]
+                self.plotter.plot(t,
+                                  [groups[1]] + [self.data.data[1]],
                                   plot_labels,
                                   plot_labels,
-                                  'frame',
+                                  'Frame',
                                   f'epoch {epoch}',
                                   f'epoch {epoch}',
                                   figure_shape=(12, 6),
                                   figure_shape=(12, 6),
                                   is_frame=True,
                                   is_frame=True,
                                   is_background=background_list,
                                   is_background=background_list,
                                   lw=3,
                                   lw=3,
                                   legend_loc='upper right',
                                   legend_loc='upper right',
-                                  ylim=(0, self.data.N), 
                                   xlabel='time / days',
                                   xlabel='time / days',
                                   ylabel='amount of people')
                                   ylabel='amount of people')
 
 
             # print training advancements
             # print training advancements
-            if epoch % 1000 == 0 and verbose:          
-                print(f'\nEpoch {epoch} | LR {self.scheduler.get_last_lr()[0]}')
+            if epoch % 1000 == 0 and verbose:
+                print(
+                    f'\nEpoch {epoch} | LR {self.scheduler.get_last_lr()[0]}')
                 print(f'physics loss:\t\t{loss_physics.item()}')
                 print(f'physics loss:\t\t{loss_physics.item()}')
                 print(f'observation loss:\t{loss_obs.item()}')
                 print(f'observation loss:\t{loss_obs.item()}')
                 print(f'loss:\t\t\t{loss.item()}')
                 print(f'loss:\t\t\t{loss.item()}')
                 print('---------------------------------')
                 print('---------------------------------')
                 if len(self.parameters_tilda.items()) != 0:
                 if len(self.parameters_tilda.items()) != 0:
                     for parameter in self.parameters_tilda.items():
                     for parameter in self.parameters_tilda.items():
-                        print(f'{parameter[0]}:\t\t\t{self.parameter_regulator(parameter[1]).item()}')
+                        print(
+                            f'{parameter[0]}:\t\t\t{self.parameter_regulator(parameter[1]).item()}')
                     print('#################################')
                     print('#################################')
 
 
         # create prediction animation
         # create prediction animation
@@ -354,33 +377,37 @@ class DINN:
         epochs = np.arange(0, self.epochs, 1)
         epochs = np.arange(0, self.epochs, 1)
 
 
         # plot loss
         # plot loss
-        self.plotter.plot(epochs, [self.losses, self.obs_losses, self.physics_losses], ['loss', 'observation loss', 'physics loss'], self.data.name + '_loss', 'Loss', (6, 6), y_log_scale=True, plot_legend=True, xlabel='epochs')
-        
+        self.plotter.plot(epochs, [self.losses, self.obs_losses, self.physics_losses], ['loss', 'observation loss',
+                          'physics loss'], self.data.name + '_loss', 'Loss', (6, 6), y_log_scale=True, plot_legend=True, xlabel='epochs')
+
         # plot parameters
         # plot parameters
         for i, parameter in enumerate(self.parameters):
         for i, parameter in enumerate(self.parameters):
             if len(ground_truth) > i:
             if len(ground_truth) > i:
-                self.plotter.plot(epochs, 
-                                  [parameter, 
-                                   np.ones_like(epochs) * ground_truth[i]], 
-                                   ['prediction', 'ground truth'], 
-                                   self.data.name + '_' + list(self.parameters_tilda.items())[i][0], 
-                                   list(self.parameters_tilda.items())[i][0], 
-                                   (6,6), 
-                                   is_background=[0, 1], 
-                                   xlabel='epochs')
+                self.plotter.plot(epochs,
+                                  [parameter,
+                                   np.ones_like(epochs) * ground_truth[i]],
+                                  ['prediction', 'ground truth'],
+                                  self.data.name + '_' +
+                                  list(self.parameters_tilda.items())[i][0],
+                                  list(self.parameters_tilda.items())[i][0],
+                                  (6, 6),
+                                  is_background=[0, 1],
+                                  xlabel='epochs')
             else:
             else:
-                self.plotter.plot(epochs, 
-                                  [parameter], 
-                                  ['prediction'], 
-                                  self.data.name + '_' + list(self.parameters_tilda.items())[i][0], 
-                                  list(self.parameters_tilda.items())[i][0], (6,6), 
-                                  xlabel='epochs', 
+                self.plotter.plot(epochs,
+                                  [parameter],
+                                  ['prediction'],
+                                  self.data.name + '_' +
+                                  list(self.parameters_tilda.items())[i][0],
+                                  list(self.parameters_tilda.items())[
+                                      i][0], (6, 6),
+                                  xlabel='epochs',
                                   plot_legend=False)
                                   plot_legend=False)
-                
-    def save_training_process(self, title, save_predictions = True):
-        losses = {'loss' : self.losses,
-                  'obs_loss' : self.obs_losses,
-                  'physics_loss' : self.physics_losses}
+
+    def save_training_process(self, title, save_predictions=True):
+        losses = {'loss': self.losses,
+                  'obs_loss': self.obs_losses,
+                  'physics_loss': self.physics_losses}
         for loss in losses.keys():
         for loss in losses.keys():
             with open(f'./results/training_metrics/{title}_{loss}.csv', 'w', newline='') as csvfile:
             with open(f'./results/training_metrics/{title}_{loss}.csv', 'w', newline='') as csvfile:
                 writer = csv.writer(csvfile, delimiter=',')
                 writer = csv.writer(csvfile, delimiter=',')
@@ -393,9 +420,11 @@ class DINN:
         if save_predictions:
         if save_predictions:
             prediction = self.model(self.data.t_batch)
             prediction = self.model(self.data.t_batch)
             for i, group in enumerate(self.data.group_names):
             for i, group in enumerate(self.data.group_names):
-                t = torch.linspace(0, self.data.t_raw[-1].item(), self.data.t_raw.shape[0]).detach().cpu().numpy()
+                t = torch.linspace(
+                    0, self.data.t_raw[-1].item(), self.data.t_raw.shape[0]).detach().cpu().numpy()
                 true = self.data.get_group(group).detach().cpu().numpy()
                 true = self.data.get_group(group).detach().cpu().numpy()
-                pred = self.data.get_denormalized_data([prediction[:, i]])[0].detach().cpu().numpy()
+                pred = self.data.get_denormalized_data([prediction[:, i]])[
+                    0].detach().cpu().numpy()
                 print(t.shape, true.shape)
                 print(t.shape, true.shape)
                 with open(f'./results/I_predictions/{title}_I_prediction.csv', 'w', newline='') as csvfile:
                 with open(f'./results/I_predictions/{title}_I_prediction.csv', 'w', newline='') as csvfile:
                     writer = csv.writer(csvfile, delimiter=',')
                     writer = csv.writer(csvfile, delimiter=',')
@@ -405,13 +434,15 @@ class DINN:
 
 
     def plot_state_variables(self):
     def plot_state_variables(self):
         prediction = self.model(self.data.t_batch)
         prediction = self.model(self.data.t_batch)
-        for i in range(self.data.number_groups, self.data.number_groups+self.number_state_variables):
-            t = torch.linspace(0, self.data.t_raw[-1].item(), self.data.t_raw.shape[0])
+        for i in range(self.data.number_groups, self.data.number_groups + self.number_state_variables):
+            t = torch.linspace(
+                0, self.data.t_raw[-1].item(), self.data.t_raw.shape[0])
             self.plotter.plot(t,
             self.plotter.plot(t,
                               [prediction[:, i]],
                               [prediction[:, i]],
-                              [self.__state_variables[i-self.data.number_groups]],
+                              [self.__state_variables[i - self.data.number_groups]],
                               f'{self.data.name}_{self.__state_variables[i-self.data.number_groups]}',
                               f'{self.data.name}_{self.__state_variables[i-self.data.number_groups]}',
-                              self.__state_variables[i-self.data.number_groups],
+                              self.__state_variables[i -
+                                                     self.data.number_groups],
                               figure_shape=(12, 6),
                               figure_shape=(12, 6),
                               plot_legend=True,
                               plot_legend=True,
-                              xlabel='time / days')
+                              xlabel='time / days')