Skip to content

Commit

Permalink
Update all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Dec 10, 2023
1 parent 2f7fe56 commit 60aea73
Show file tree
Hide file tree
Showing 16 changed files with 2,321 additions and 7,594 deletions.
643 changes: 153 additions & 490 deletions examples/00_Quick_Start.ipynb

Large diffs are not rendered by default.

161 changes: 82 additions & 79 deletions examples/01_Data_Loading.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"outputs": [],
"source": [
"import mogptk\n",
"import pandas as pd"
"import torch\n",
"import pandas as pd\n",
"\n",
"torch.manual_seed(1);"
]
},
{
Expand Down Expand Up @@ -358,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.744444Z",
Expand All @@ -367,7 +370,7 @@
},
"outputs": [],
"source": [
"df['Date'] = pd.to_datetime(df['Date'])\n",
"df['Date'] = pd.to_datetime(df['Date'], format='%d/%m/%Y')\n",
"df['Time'] = pd.to_datetime(df['Time'], format='%H.%M.%S')"
]
},
Expand All @@ -380,7 +383,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.786150Z",
Expand All @@ -392,11 +395,11 @@
"data": {
"text/plain": [
" Date CO(GT)\n",
"0 12694.0 2.6\n",
"1 12694.0 2.0\n",
"2 12694.0 2.2\n",
"3 12694.0 2.2\n",
"4 12694.0 1.6\n",
"0 12487.0 2.6\n",
"1 12487.0 2.0\n",
"2 12487.0 2.2\n",
"3 12487.0 2.2\n",
"4 12487.0 1.6\n",
"... ... ...\n",
"9352 12877.0 3.1\n",
"9353 12877.0 2.4\n",
Expand All @@ -406,11 +409,11 @@
"\n",
"[9357 rows x 2 columns]\n",
" Date PT08.S1(CO)\n",
"0 12694.0 1360.0\n",
"1 12694.0 1292.0\n",
"2 12694.0 1402.0\n",
"3 12694.0 1376.0\n",
"4 12694.0 1272.0\n",
"0 12487.0 1360.0\n",
"1 12487.0 1292.0\n",
"2 12487.0 1402.0\n",
"3 12487.0 1376.0\n",
"4 12487.0 1272.0\n",
"... ... ...\n",
"9352 12877.0 1314.0\n",
"9353 12877.0 1163.0\n",
Expand All @@ -421,7 +424,7 @@
"[9357 rows x 2 columns]"
]
},
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -441,7 +444,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.838140Z",
Expand All @@ -453,11 +456,11 @@
"data": {
"text/plain": [
" Date CO(GT)\n",
"0 12694.0 2.6\n",
"1 12694.0 2.0\n",
"2 12694.0 2.2\n",
"3 12694.0 2.2\n",
"4 12694.0 1.6\n",
"0 12487.0 2.6\n",
"1 12487.0 2.0\n",
"2 12487.0 2.2\n",
"3 12487.0 2.2\n",
"4 12487.0 1.6\n",
"... ... ...\n",
"9352 12877.0 3.1\n",
"9353 12877.0 2.4\n",
Expand All @@ -467,11 +470,11 @@
"\n",
"[9357 rows x 2 columns]\n",
" Date PT08.S1(CO)\n",
"0 12694.0 1360.0\n",
"1 12694.0 1292.0\n",
"2 12694.0 1402.0\n",
"3 12694.0 1376.0\n",
"4 12694.0 1272.0\n",
"0 12487.0 1360.0\n",
"1 12487.0 1292.0\n",
"2 12487.0 1402.0\n",
"3 12487.0 1376.0\n",
"4 12487.0 1272.0\n",
"... ... ...\n",
"9352 12877.0 1314.0\n",
"9353 12877.0 1163.0\n",
Expand All @@ -481,11 +484,11 @@
"\n",
"[9357 rows x 2 columns]\n",
" Date Time NMHC(GT)\n",
"0 12694.0 -613590.0 150.0\n",
"1 12694.0 -613589.0 112.0\n",
"2 12694.0 -613588.0 88.0\n",
"3 12694.0 -613587.0 80.0\n",
"4 12694.0 -613586.0 51.0\n",
"0 12487.0 -613590.0 150.0\n",
"1 12487.0 -613589.0 112.0\n",
"2 12487.0 -613588.0 88.0\n",
"3 12487.0 -613587.0 80.0\n",
"4 12487.0 -613586.0 51.0\n",
"... ... ... ...\n",
"9352 12877.0 -613598.0 -200.0\n",
"9353 12877.0 -613597.0 -200.0\n",
Expand All @@ -496,7 +499,7 @@
"[9357 rows x 3 columns]"
]
},
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -507,7 +510,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.849106Z",
Expand All @@ -521,7 +524,7 @@
"3"
]
},
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -533,7 +536,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.857285Z",
Expand All @@ -547,7 +550,7 @@
"[1, 1, 2]"
]
},
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -559,7 +562,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.869584Z",
Expand All @@ -573,7 +576,7 @@
"['CO(GT)', 'PT08.S1(CO)', 'NMHC(GT)']"
]
},
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -592,7 +595,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.895150Z",
Expand All @@ -604,11 +607,11 @@
"data": {
"text/plain": [
" Date CO(GT)\n",
"0 12694.0 2.6\n",
"1 12694.0 2.0\n",
"2 12694.0 2.2\n",
"3 12694.0 2.2\n",
"4 12694.0 1.6\n",
"0 12487.0 2.6\n",
"1 12487.0 2.0\n",
"2 12487.0 2.2\n",
"3 12487.0 2.2\n",
"4 12487.0 1.6\n",
"... ... ...\n",
"9352 12877.0 3.1\n",
"9353 12877.0 2.4\n",
Expand All @@ -619,7 +622,7 @@
"[9357 rows x 2 columns]"
]
},
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -630,7 +633,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.913449Z",
Expand All @@ -642,11 +645,11 @@
"data": {
"text/plain": [
" Date CO(GT)\n",
"0 12694.0 2.6\n",
"1 12694.0 2.0\n",
"2 12694.0 2.2\n",
"3 12694.0 2.2\n",
"4 12694.0 1.6\n",
"0 12487.0 2.6\n",
"1 12487.0 2.0\n",
"2 12487.0 2.2\n",
"3 12487.0 2.2\n",
"4 12487.0 1.6\n",
"... ... ...\n",
"9352 12877.0 3.1\n",
"9353 12877.0 2.4\n",
Expand All @@ -657,7 +660,7 @@
"[9357 rows x 2 columns]"
]
},
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -675,7 +678,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.928142Z",
Expand All @@ -686,33 +689,33 @@
{
"data": {
"text/plain": [
"([Serie([[12694.],\n",
" [12694.],\n",
" [12694.],\n",
"([array([[12487.],\n",
" [12487.],\n",
" [12487.],\n",
" ...,\n",
" [12877.],\n",
" [12877.],\n",
" [12877.]]),\n",
" Serie([[12694.],\n",
" [12694.],\n",
" [12694.],\n",
" array([[12487.],\n",
" [12487.],\n",
" [12487.],\n",
" ...,\n",
" [12877.],\n",
" [12877.],\n",
" [12877.]]),\n",
" Serie([[ 12694., -613590.],\n",
" [ 12694., -613589.],\n",
" [ 12694., -613588.],\n",
" array([[ 12487., -613590.],\n",
" [ 12487., -613589.],\n",
" [ 12487., -613588.],\n",
" ...,\n",
" [ 12877., -613596.],\n",
" [ 12877., -613595.],\n",
" [ 12877., -613594.]])],\n",
" [Serie([2.6, 2. , 2.2, ..., 2.4, 2.1, 2.2]),\n",
" Serie([1360., 1292., 1402., ..., 1142., 1003., 1071.]),\n",
" Serie([ 150., 112., 88., ..., -200., -200., -200.])])"
" [array([2.6, 2. , 2.2, ..., 2.4, 2.1, 2.2]),\n",
" array([1360., 1292., 1402., ..., 1142., 1003., 1071.]),\n",
" array([ 150., 112., 88., ..., -200., -200., -200.])])"
]
},
"execution_count": 16,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -730,7 +733,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 18,
"metadata": {
"ExecuteTime": {
"end_time": "2022-05-21T12:28:02.944129Z",
Expand All @@ -741,23 +744,23 @@
{
"data": {
"text/plain": [
"([Serie([[12694.],\n",
" [12694.],\n",
" [12694.],\n",
"([array([[12487.],\n",
" [12487.],\n",
" [12487.],\n",
" ...,\n",
" [12877.],\n",
" [12877.],\n",
" [12877.]]),\n",
" Serie([[12694.],\n",
" [12694.],\n",
" [12694.],\n",
" array([[12487.],\n",
" [12487.],\n",
" [12487.],\n",
" ...,\n",
" [12877.],\n",
" [12877.],\n",
" [12877.]]),\n",
" Serie([[ 12694., -613590.],\n",
" [ 12694., -613589.],\n",
" [ 12694., -613588.],\n",
" array([[ 12487., -613590.],\n",
" [ 12487., -613589.],\n",
" [ 12487., -613588.],\n",
" ...,\n",
" [ 12877., -613596.],\n",
" [ 12877., -613595.],\n",
Expand All @@ -767,7 +770,7 @@
" array([ 150., 112., 88., ..., -200., -200., -200.])])"
]
},
"execution_count": 17,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -800,9 +803,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit 60aea73

Please sign in to comment.