Skip to content

Commit

Permalink
new examples and avoiding to do Cholesky and inv
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Mar 15, 2024
1 parent 5ae0c65 commit 8efcb31
Show file tree
Hide file tree
Showing 9 changed files with 120,449 additions and 120,970 deletions.
120,170 changes: 60,054 additions & 60,116 deletions docs/source/examples/MultiTaskTest.ipynb

Large diffs are not rendered by default.

92 changes: 45 additions & 47 deletions docs/source/examples/NonEuclideanInputSpaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "2377d373",
"id": "b0fc8cee",
"metadata": {},
"source": [
"# GPs on Non-Euclidean Input Spaces\n",
Expand All @@ -13,30 +13,21 @@
},
{
"cell_type": "code",
"execution_count": 5,
"id": "61c3f3bd",
"execution_count": 1,
"id": "772ad2d7",
"metadata": {},
"outputs": [],
"source": [
"#install the newest version of fvgp\n",
"#!pip install fvgp==4.1.1"
"#!pip install fvgp==4.1.3"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b5399565",
"execution_count": 2,
"id": "61769a98",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -48,47 +39,54 @@
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b91e69d3",
"execution_count": 3,
"id": "3a737686",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_1174962/2027899493.py:33: UserWarning: No noise function or measurement noise provided. Noise variances will be set to 1% of mean(y_data).\n",
"/tmp/ipykernel_205512/2027899493.py:33: UserWarning: You have provided callables for kernel, mean, or noise functions but no \n",
" hyperparameter_bounds. That means they have to provided to the training.\n",
" my_gp = GP(1, x_data,y_data,init_hyperparameters=np.ones((2)), gp_kernel_function=kernel, info = True)\n",
"/home/marcus/Coding/fvGP/fvgp/gp.py:282: UserWarning: You have not provided hyperparameter bounds but a kernel function. \n",
" Make sure you provide hyperparameter bounds to the training.\n",
" warnings.warn(\"You have not provided hyperparameter bounds but a kernel function. \\n \\\n",
"/tmp/ipykernel_205512/2027899493.py:33: UserWarning: No noise function or measurement noise provided. Noise variances will be set to 1% of mean(y_data).\n",
" my_gp = GP(1, x_data,y_data,init_hyperparameters=np.ones((2)), gp_kernel_function=kernel, info = True)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"differential_evolution step 1: f(x)= 8.43858\n",
"differential_evolution step 2: f(x)= 8.43858\n",
"differential_evolution step 3: f(x)= 8.43858\n",
"differential_evolution step 4: f(x)= 8.43858\n",
"differential_evolution step 5: f(x)= 8.31636\n",
"differential_evolution step 6: f(x)= 8.31636\n",
"differential_evolution step 7: f(x)= 8.31636\n",
"differential_evolution step 8: f(x)= 8.31636\n",
"differential_evolution step 9: f(x)= 8.31636\n",
"differential_evolution step 10: f(x)= 8.24918\n",
"differential_evolution step 11: f(x)= 8.06702\n",
"differential_evolution step 12: f(x)= 8.06702\n",
"differential_evolution step 13: f(x)= 8.05368\n",
"differential_evolution step 14: f(x)= 8.04585\n",
"differential_evolution step 15: f(x)= 8.04566\n",
"differential_evolution step 16: f(x)= 8.0449\n",
"differential_evolution step 17: f(x)= 8.0449\n",
"differential_evolution step 18: f(x)= 8.04489\n",
"differential_evolution step 19: f(x)= 8.04489\n",
"differential_evolution step 20: f(x)= 8.04489\n",
"differential_evolution step 21: f(x)= 8.04489\n",
"differential_evolution step 22: f(x)= 8.04489\n",
"hyperparameters: [1.4347513 0.15607455]\n",
"prediction : [2.74]\n",
"uncertainty: [1.19781104]\n"
"differential_evolution step 1: f(x)= 8.180824605114541\n",
"differential_evolution step 2: f(x)= 8.180824605114541\n",
"differential_evolution step 3: f(x)= 8.180824605114541\n",
"differential_evolution step 4: f(x)= 8.180824605114541\n",
"differential_evolution step 5: f(x)= 8.180824605114541\n",
"differential_evolution step 6: f(x)= 8.180824605114541\n",
"differential_evolution step 7: f(x)= 8.180824605114541\n",
"differential_evolution step 8: f(x)= 8.180824605114541\n",
"differential_evolution step 9: f(x)= 8.126139484895859\n",
"differential_evolution step 10: f(x)= 8.069385774770495\n",
"differential_evolution step 11: f(x)= 8.069385774770495\n",
"differential_evolution step 12: f(x)= 8.069385774770495\n",
"differential_evolution step 13: f(x)= 8.069385774770495\n",
"differential_evolution step 14: f(x)= 8.049263910716169\n",
"differential_evolution step 15: f(x)= 8.044894877585497\n",
"differential_evolution step 16: f(x)= 8.044894877585497\n",
"differential_evolution step 17: f(x)= 8.044894224343642\n",
"differential_evolution step 18: f(x)= 8.04489135095021\n",
"differential_evolution step 19: f(x)= 8.04489135095021\n",
"differential_evolution step 20: f(x)= 8.04489135095021\n",
"differential_evolution step 21: f(x)= 8.04489135095021\n",
"differential_evolution step 22: f(x)= 8.04489135095021\n",
"differential_evolution step 23: f(x)= 8.04489135095021\n",
"hyperparameters: [1.43651416 0.35032983]\n",
"prediction : [2.74000846]\n",
"uncertainty: [1.19854669]\n"
]
}
],
Expand Down Expand Up @@ -138,17 +136,17 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f67d948f-c643-487d-ab5b-baf3d53f7b60",
"id": "72a4dca3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "fvgp_dev",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "fvgp_dev"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
324 changes: 57 additions & 267 deletions docs/source/examples/SingleTaskTest.ipynb

Large diffs are not rendered by default.

115 changes: 63 additions & 52 deletions docs/source/examples/gp2ScaleTest.ipynb

Large diffs are not rendered by default.

120,170 changes: 60,054 additions & 60,116 deletions examples/MultiTaskTest.ipynb

Large diffs are not rendered by default.

92 changes: 45 additions & 47 deletions examples/NonEuclideanInputSpaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "2377d373",
"id": "b0fc8cee",
"metadata": {},
"source": [
"# GPs on Non-Euclidean Input Spaces\n",
Expand All @@ -13,30 +13,21 @@
},
{
"cell_type": "code",
"execution_count": 5,
"id": "61c3f3bd",
"execution_count": 1,
"id": "772ad2d7",
"metadata": {},
"outputs": [],
"source": [
"#install the newest version of fvgp\n",
"#!pip install fvgp==4.1.1"
"#!pip install fvgp==4.1.3"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b5399565",
"execution_count": 2,
"id": "61769a98",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -48,47 +39,54 @@
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b91e69d3",
"execution_count": 3,
"id": "3a737686",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_1174962/2027899493.py:33: UserWarning: No noise function or measurement noise provided. Noise variances will be set to 1% of mean(y_data).\n",
"/tmp/ipykernel_205512/2027899493.py:33: UserWarning: You have provided callables for kernel, mean, or noise functions but no \n",
" hyperparameter_bounds. That means they have to provided to the training.\n",
" my_gp = GP(1, x_data,y_data,init_hyperparameters=np.ones((2)), gp_kernel_function=kernel, info = True)\n",
"/home/marcus/Coding/fvGP/fvgp/gp.py:282: UserWarning: You have not provided hyperparameter bounds but a kernel function. \n",
" Make sure you provide hyperparameter bounds to the training.\n",
" warnings.warn(\"You have not provided hyperparameter bounds but a kernel function. \\n \\\n",
"/tmp/ipykernel_205512/2027899493.py:33: UserWarning: No noise function or measurement noise provided. Noise variances will be set to 1% of mean(y_data).\n",
" my_gp = GP(1, x_data,y_data,init_hyperparameters=np.ones((2)), gp_kernel_function=kernel, info = True)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"differential_evolution step 1: f(x)= 8.43858\n",
"differential_evolution step 2: f(x)= 8.43858\n",
"differential_evolution step 3: f(x)= 8.43858\n",
"differential_evolution step 4: f(x)= 8.43858\n",
"differential_evolution step 5: f(x)= 8.31636\n",
"differential_evolution step 6: f(x)= 8.31636\n",
"differential_evolution step 7: f(x)= 8.31636\n",
"differential_evolution step 8: f(x)= 8.31636\n",
"differential_evolution step 9: f(x)= 8.31636\n",
"differential_evolution step 10: f(x)= 8.24918\n",
"differential_evolution step 11: f(x)= 8.06702\n",
"differential_evolution step 12: f(x)= 8.06702\n",
"differential_evolution step 13: f(x)= 8.05368\n",
"differential_evolution step 14: f(x)= 8.04585\n",
"differential_evolution step 15: f(x)= 8.04566\n",
"differential_evolution step 16: f(x)= 8.0449\n",
"differential_evolution step 17: f(x)= 8.0449\n",
"differential_evolution step 18: f(x)= 8.04489\n",
"differential_evolution step 19: f(x)= 8.04489\n",
"differential_evolution step 20: f(x)= 8.04489\n",
"differential_evolution step 21: f(x)= 8.04489\n",
"differential_evolution step 22: f(x)= 8.04489\n",
"hyperparameters: [1.4347513 0.15607455]\n",
"prediction : [2.74]\n",
"uncertainty: [1.19781104]\n"
"differential_evolution step 1: f(x)= 8.180824605114541\n",
"differential_evolution step 2: f(x)= 8.180824605114541\n",
"differential_evolution step 3: f(x)= 8.180824605114541\n",
"differential_evolution step 4: f(x)= 8.180824605114541\n",
"differential_evolution step 5: f(x)= 8.180824605114541\n",
"differential_evolution step 6: f(x)= 8.180824605114541\n",
"differential_evolution step 7: f(x)= 8.180824605114541\n",
"differential_evolution step 8: f(x)= 8.180824605114541\n",
"differential_evolution step 9: f(x)= 8.126139484895859\n",
"differential_evolution step 10: f(x)= 8.069385774770495\n",
"differential_evolution step 11: f(x)= 8.069385774770495\n",
"differential_evolution step 12: f(x)= 8.069385774770495\n",
"differential_evolution step 13: f(x)= 8.069385774770495\n",
"differential_evolution step 14: f(x)= 8.049263910716169\n",
"differential_evolution step 15: f(x)= 8.044894877585497\n",
"differential_evolution step 16: f(x)= 8.044894877585497\n",
"differential_evolution step 17: f(x)= 8.044894224343642\n",
"differential_evolution step 18: f(x)= 8.04489135095021\n",
"differential_evolution step 19: f(x)= 8.04489135095021\n",
"differential_evolution step 20: f(x)= 8.04489135095021\n",
"differential_evolution step 21: f(x)= 8.04489135095021\n",
"differential_evolution step 22: f(x)= 8.04489135095021\n",
"differential_evolution step 23: f(x)= 8.04489135095021\n",
"hyperparameters: [1.43651416 0.35032983]\n",
"prediction : [2.74000846]\n",
"uncertainty: [1.19854669]\n"
]
}
],
Expand Down Expand Up @@ -138,17 +136,17 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f67d948f-c643-487d-ab5b-baf3d53f7b60",
"id": "72a4dca3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "fvgp_dev",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "fvgp_dev"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
324 changes: 57 additions & 267 deletions examples/SingleTaskTest.ipynb

Large diffs are not rendered by default.

0 comments on commit 8efcb31

Please sign in to comment.