Skip to content

Commit b3b33e9

Browse files
committed
tutorial 1 & 2 Jupyter Notebook files
1 parent 58b8fed commit b3b33e9

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

tutorials/tutorial-1.ipynb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
" - an approximation method to extrapolate the parametric solution for new parameters, in this tutorial we will use a radial basis function (RBF) interpolation."
3232
]
3333
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"!pip install git+https://github.com/mathLab/EZyRB.git\n",
41+
"!pip install -U datasets huggingface_hub fsspec"
42+
]
43+
},
3444
{
3545
"cell_type": "code",
3646
"execution_count": null,
@@ -40,7 +50,6 @@
4050
"import numpy as np\n",
4151
"import matplotlib.tri as mtri\n",
4252
"import matplotlib.pyplot as plt\n",
43-
"!pip install -U datasets huggingface_hub fsspec\n",
4453
"from ezyrb import POD, RBF, Database\n",
4554
"from ezyrb import ReducedOrderModel as ROM\n",
4655
"%matplotlib inline"
@@ -69,6 +78,7 @@
6978
}
7079
],
7180
"source": [
81+
"from datasets import load_dataset\n",
7282
"data_path = \"kshitij-pandey/termal_dataset\"\n",
7383
"snapshots_hf = load_dataset(data_path, \"snapshots\", split=\"train\")\n",
7484
"param_hf = load_dataset(data_path, \"params\", split=\"train\")\n",
@@ -317,7 +327,7 @@
317327
},
318328
{
319329
"cell_type": "code",
320-
"execution_count": 15,
330+
"execution_count": null,
321331
"metadata": {
322332
"scrolled": true
323333
},
@@ -338,7 +348,7 @@
338348
}
339349
],
340350
"source": [
341-
"for pt, error in zip(rom.database.parameters, rom.loo_error()):\n",
351+
"for pt, error in zip(rom.database.parameters_matrix, rom.loo_error()):\n",
342352
" print(pt, error)"
343353
]
344354
},

tutorials/tutorial-2.ipynb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,21 @@
3333
{
3434
"cell_type": "code",
3535
"execution_count": null,
36-
"id": "2b772df3",
36+
"id": "05f26f2c",
3737
"metadata": {},
3838
"outputs": [],
3939
"source": [
4040
"!pip install -U datasets huggingface_hub fsspec\n",
41+
"!pip install git+https://github.com/mathLab/EZyRB.git"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": null,
47+
"id": "2b772df3",
48+
"metadata": {},
49+
"outputs": [],
50+
"source": [
4151
"from datasets import load_dataset\n",
4252
"data_path = \"kshitij-pandey/navier_stokes_datasets\"\n",
4353
"snapshots_hf = load_dataset(data_path, \"snapshots_split\", split=\"train\")\n",

0 commit comments

Comments
 (0)