Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
ziatdinovmax committed Jan 19, 2024
1 parent 5e78a87 commit c5e2aed
Showing 1 changed file with 80 additions and 17 deletions.
97 changes: 80 additions & 17 deletions examples/MeasuredNoiseGP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyOVUbkB/E3aKxDTkuP/V95t",
"authorship_tag": "ABX9TyOBjhysLk/t2uY42yIrNT/s",
"include_colab_link": true
},
"kernelspec": {
Expand Down Expand Up @@ -44,6 +44,24 @@
"id": "-RHuwrdgT8mj"
}
},
{
"cell_type": "markdown",
"source": [
"This notebook illustrates the usage of ```MeasuredNoiseGP``` model that extends the ```ExactGP``` model by allowing the inclusion of measured noise in the GP framework. Unlike standard GP models where noise is typically inferred, this model uses noise values obtained from repeated measurements at the same input points."
],
"metadata": {
"id": "huRGMA1M6Dnm"
}
},
{
"cell_type": "markdown",
"source": [
"Install GPax:"
],
"metadata": {
"id": "h8e-D8_X7AnN"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -56,7 +74,7 @@
"id": "MKsO0n1wZeie",
"outputId": "51166d1a-b77f-418e-9850-22591c7901da"
},
"execution_count": 2,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand All @@ -72,6 +90,15 @@
}
]
},
{
"cell_type": "markdown",
"source": [
"Imports:"
],
"metadata": {
"id": "AJyxXVNP7CwJ"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -85,12 +112,21 @@
"metadata": {
"id": "5AHwdSJ3aIAx"
},
"execution_count": 3,
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Generate synthetic data:"
],
"metadata": {
"id": "Ai7EDFoZ7D5Y"
}
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -145,6 +181,15 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"source": [
"Initialize and train ```MeasuredNoiseGP``` model."
],
"metadata": {
"id": "Np3reuVd7Ifc"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -164,7 +209,7 @@
"id": "nM_EOnBuaFFS",
"outputId": "a1e05141-b039-4556-d25d-ac70688397b7"
},
"execution_count": 134,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand All @@ -187,6 +232,15 @@
}
]
},
{
"cell_type": "markdown",
"source": [
"Make a prediction on the denser grid (in real measurements, this will be a full discrete parameter space):"
],
"metadata": {
"id": "fQINffh-7OPI"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -199,9 +253,18 @@
"metadata": {
"id": "7wQ166vichmK"
},
"execution_count": 135,
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Plot the prediction:"
],
"metadata": {
"id": "7z-pYTma7ggH"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -226,7 +289,7 @@
"id": "wemHR_IKgLxX",
"outputId": "920bb3fd-3882-4ea4-e018-e20b08cc8c7c"
},
"execution_count": 136,
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
Expand All @@ -250,6 +313,15 @@
}
]
},
{
"cell_type": "markdown",
"source": [
"Plot the predicted noise for ```X_test```:"
],
"metadata": {
"id": "gHGPQaGa7i7S"
}
},
{
"cell_type": "code",
"source": [
Expand All @@ -266,7 +338,7 @@
"id": "ha0Wl4YVmU2B",
"outputId": "e53083ee-05c9-4dc9-c671-ef1c0356678d"
},
"execution_count": 137,
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
Expand All @@ -289,15 +361,6 @@
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "_UN4tgdGozPo"
},
"execution_count": 8,
"outputs": []
}
]
}

0 comments on commit c5e2aed

Please sign in to comment.