Skip to content

Commit

Permalink
docs examples updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Dec 8, 2023
1 parent 455840e commit fd123c9
Show file tree
Hide file tree
Showing 4 changed files with 128,769 additions and 176 deletions.
128,580 changes: 128,541 additions & 39 deletions docs/source/examples/MultiTaskTest.ipynb

Large diffs are not rendered by default.

92 changes: 47 additions & 45 deletions docs/source/examples/NonEuclideanInputSpaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,21 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 1,
"id": "61c3f3bd",
"metadata": {},
"outputs": [],
"source": [
"#install the newest version of fvgp\n",
"#!pip install fvgp==4.0.11"
"#!pip install fvgp==4.0.13"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 2,
"id": "b5399565",
"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,50 +39,53 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 4,
"id": "b91e69d3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"differential_evolution step 1: f(x)= 9.91727\n",
"differential_evolution step 2: f(x)= 9.06802\n",
"differential_evolution step 3: f(x)= 9.06802\n",
"differential_evolution step 4: f(x)= 9.06802\n",
"differential_evolution step 5: f(x)= 8.4285\n",
"differential_evolution step 6: f(x)= 8.05457\n",
"differential_evolution step 7: f(x)= 8.05457\n",
"differential_evolution step 8: f(x)= 8.05457\n",
"differential_evolution step 9: f(x)= 8.05457\n",
"differential_evolution step 10: f(x)= 8.05457\n",
"differential_evolution step 11: f(x)= 8.05457\n",
"differential_evolution step 12: f(x)= 8.05457\n",
"differential_evolution step 13: f(x)= 8.05457\n",
"differential_evolution step 14: f(x)= 8.05457\n",
"differential_evolution step 15: f(x)= 8.05171\n",
"differential_evolution step 16: f(x)= 8.05171\n",
"differential_evolution step 17: f(x)= 8.04794\n",
"differential_evolution step 18: f(x)= 8.04555\n",
"differential_evolution step 1: f(x)= 9.45943\n",
"differential_evolution step 2: f(x)= 9.04232\n",
"differential_evolution step 3: f(x)= 8.52913\n",
"differential_evolution step 4: f(x)= 8.20242\n",
"differential_evolution step 5: f(x)= 8.06388\n",
"differential_evolution step 6: f(x)= 8.05498\n",
"differential_evolution step 7: f(x)= 8.05063\n",
"differential_evolution step 8: f(x)= 8.05063\n",
"differential_evolution step 9: f(x)= 8.05063\n",
"differential_evolution step 10: f(x)= 8.04662\n",
"differential_evolution step 11: f(x)= 8.04662\n",
"differential_evolution step 12: f(x)= 8.04496\n",
"differential_evolution step 13: f(x)= 8.04496\n",
"differential_evolution step 14: f(x)= 8.04496\n",
"differential_evolution step 15: f(x)= 8.04491\n",
"differential_evolution step 16: f(x)= 8.04491\n",
"differential_evolution step 17: f(x)= 8.04489\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",
"differential_evolution step 23: f(x)= 8.04489\n",
"differential_evolution step 24: f(x)= 8.04489\n",
"differential_evolution step 25: f(x)= 8.04489\n",
"differential_evolution step 26: f(x)= 8.04489\n",
"differential_evolution step 27: f(x)= 8.04489\n",
"hyperparameters: [1.4350853 0.12085441]\n",
"hyperparameters: [1.43455918 0.10760601]\n",
"prediction : [2.74]\n",
"uncertainty: [1.19795046]\n"
"uncertainty: [1.19773084]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/marcus/Coding/fvGP/fvgp/gp.py:290: 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_1003689/1300562773.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"
]
}
],
"source": [
"#making the x_data a set will allow us to put any objects or structures into it.\n",
"x_data = {('hello'),('world'),('this'),('is'),('fvgp')}\n",
"x_data = [('hello'),('world'),('this'),('is'),('fvgp')]\n",
"y_data = np.array([2.,1.9,1.8,3.0,5.])\n",
"\n",
"\n",
Expand Down Expand Up @@ -131,13 +125,21 @@
"print(\"prediction : \",my_gp.posterior_mean({'full'})[\"f(x)\"])\n",
"print(\"uncertainty: \",np.sqrt(my_gp.posterior_covariance({'full'})[\"v(x)\"]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f67d948f-c643-487d-ab5b-baf3d53f7b60",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "fvgp_dev",
"language": "python",
"name": "python3"
"name": "fvgp_dev"
},
"language_info": {
"codemirror_mode": {
Expand Down
153 changes: 104 additions & 49 deletions docs/source/examples/SingleTaskTest.ipynb

Large diffs are not rendered by default.

120 changes: 77 additions & 43 deletions docs/source/examples/gp2ScaleTest.ipynb

Large diffs are not rendered by default.

0 comments on commit fd123c9

Please sign in to comment.