|
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "cell_type": "code", |
16 | | - "execution_count": 1, |
| 16 | + "execution_count": 2, |
17 | 17 | "id": "61c3f3bd", |
18 | 18 | "metadata": {}, |
19 | 19 | "outputs": [], |
20 | 20 | "source": [ |
21 | 21 | "# Install the newest version of gpcam\n", |
22 | | - "#!pip install gpcam==8.3.5" |
| 22 | + "#!pip install gpcam==8.4.0" |
23 | 23 | ] |
24 | 24 | }, |
25 | 25 | { |
26 | 26 | "cell_type": "code", |
27 | | - "execution_count": 2, |
| 27 | + "execution_count": 3, |
28 | 28 | "id": "b5399565", |
29 | 29 | "metadata": {}, |
30 | 30 | "outputs": [], |
|
39 | 39 | }, |
40 | 40 | { |
41 | 41 | "cell_type": "code", |
42 | | - "execution_count": 3, |
| 42 | + "execution_count": 4, |
43 | 43 | "id": "b91e69d3", |
44 | 44 | "metadata": {}, |
45 | 45 | "outputs": [ |
46 | 46 | { |
47 | 47 | "name": "stderr", |
48 | 48 | "output_type": "stream", |
49 | 49 | "text": [ |
50 | | - "/home/marcus/VirtualEnvironments/gpcam_dev/lib/python3.11/site-packages/fvgp/gp.py:310: UserWarning: No noise function or measurement noise provided. Noise variances will be set to (0.01 * mean(|y_data|))^2.\n", |
| 50 | + "/home/marcus/Coding/fvGP/fvgp/gp.py:406: UserWarning: No noise function or measurement noise provided. Noise variances will be set to (0.01 * mean(|y_data|))^2.\n", |
51 | 51 | " self.likelihood = GPlikelihood(self.data,\n" |
52 | 52 | ] |
53 | 53 | }, |
54 | 54 | { |
55 | 55 | "name": "stdout", |
56 | 56 | "output_type": "stream", |
57 | 57 | "text": [ |
58 | | - "hyperparameters: [49.31361296 26.90240104]\n", |
59 | | - "prediction : 2.0046357760678624\n", |
60 | | - "uncertainty: [0.97016186]\n" |
| 58 | + "hyperparameters: [38.94724232 36.39665454]\n", |
| 59 | + "prediction : 1.9934264485792332\n", |
| 60 | + "uncertainty: [0.64431805]\n" |
61 | 61 | ] |
62 | 62 | } |
63 | 63 | ], |
|
105 | 105 | }, |
106 | 106 | { |
107 | 107 | "cell_type": "code", |
108 | | - "execution_count": 4, |
| 108 | + "execution_count": 5, |
109 | 109 | "id": "a5644ec5", |
110 | 110 | "metadata": {}, |
111 | 111 | "outputs": [ |
|
116 | 116 | " ['who'],\n", |
117 | 117 | " ['be'],\n", |
118 | 118 | " ['it']], dtype='<U5'),\n", |
119 | | - " 'f_a(x)': array([0.82710967, 0.8218738 , 0.65115158, 0.43813236]),\n", |
| 119 | + " 'f_a(x)': array([0.55032781, 0.54008504, 0.42359206, 0.29020021]),\n", |
120 | 120 | " 'opt_obj': None}" |
121 | 121 | ] |
122 | 122 | }, |
123 | | - "execution_count": 4, |
| 123 | + "execution_count": 5, |
124 | 124 | "metadata": {}, |
125 | 125 | "output_type": "execute_result" |
126 | 126 | } |
|
140 | 140 | }, |
141 | 141 | { |
142 | 142 | "cell_type": "code", |
143 | | - "execution_count": 5, |
| 143 | + "execution_count": 6, |
144 | 144 | "id": "f78b2e6b-68be-47f0-99db-82382eeb7944", |
145 | 145 | "metadata": {}, |
146 | 146 | "outputs": [ |
|
166 | 166 | }, |
167 | 167 | { |
168 | 168 | "cell_type": "code", |
169 | | - "execution_count": 6, |
| 169 | + "execution_count": 7, |
170 | 170 | "id": "401a8d86-6205-4944-b9ed-e0397172b03f", |
171 | 171 | "metadata": {}, |
172 | 172 | "outputs": [ |
|
197 | 197 | }, |
198 | 198 | { |
199 | 199 | "cell_type": "code", |
200 | | - "execution_count": 7, |
| 200 | + "execution_count": 8, |
201 | 201 | "id": "19bccdab-1444-4dc4-bb44-dd88340f541e", |
202 | 202 | "metadata": {}, |
203 | 203 | "outputs": [], |
|
235 | 235 | }, |
236 | 236 | { |
237 | 237 | "cell_type": "code", |
238 | | - "execution_count": 8, |
| 238 | + "execution_count": 9, |
239 | 239 | "id": "a8b3c342-6829-42f7-bf9f-90cf3d9bf069", |
240 | 240 | "metadata": {}, |
241 | 241 | "outputs": [ |
|
249 | 249 | { |
250 | 250 | "data": { |
251 | 251 | "text/plain": [ |
252 | | - "array([ 2.54827723, 15.05228436])" |
| 252 | + "array([0.12880405, 9.12339126])" |
253 | 253 | ] |
254 | 254 | }, |
255 | | - "execution_count": 8, |
| 255 | + "execution_count": 9, |
256 | 256 | "metadata": {}, |
257 | 257 | "output_type": "execute_result" |
258 | 258 | } |
|
261 | 261 | "my_gp2 = fvGPOptimizer(x_data,y_data,init_hyperparameters=np.ones((2)),\n", |
262 | 262 | " kernel_function=kernel\n", |
263 | 263 | " )\n", |
264 | | - "print(\"Global Training in progress\")\n", |
| 264 | + "print(\"MCMC Training in progress\")\n", |
265 | 265 | "#use the next two lines if kernel `mkernel` is used\n", |
266 | 266 | "#if not a default deep kernel will be used that will set initi hyperparameters and bounds\n", |
267 | 267 | "#hps_bounds = np.array([[0.001,10000.],[1.,1000.]])\n", |
|
273 | 273 | }, |
274 | 274 | { |
275 | 275 | "cell_type": "code", |
276 | | - "execution_count": 9, |
| 276 | + "execution_count": 10, |
277 | 277 | "id": "b94b089a-332b-4c31-9535-2adb8ecd6f7a", |
278 | 278 | "metadata": {}, |
279 | 279 | "outputs": [ |
280 | 280 | { |
281 | 281 | "data": { |
282 | 282 | "text/plain": [ |
283 | 283 | "{'x': ['dwed', 'dwe'],\n", |
284 | | - " 'm(x)': array([[0.25466475, 0.25466475, 0.25466475, 0.25466475],\n", |
285 | | - " [0.29003775, 0.29003775, 0.29003775, 0.29003775]]),\n", |
286 | | - " 'm(x)_flat': array([0.25466475, 0.29003775, 0.25466475, 0.29003775, 0.25466475,\n", |
287 | | - " 0.29003775, 0.25466475, 0.29003775]),\n", |
| 284 | + " 'm(x)': array([[0.53874768, 0.53874768, 0.53874768, 0.53874768],\n", |
| 285 | + " [0.57401672, 0.57401672, 0.57401672, 0.57401672]]),\n", |
| 286 | + " 'm(x)_flat': array([0.53874768, 0.57401672, 0.53874768, 0.57401672, 0.53874768,\n", |
| 287 | + " 0.57401672, 0.53874768, 0.57401672]),\n", |
288 | 288 | " 'x_pred': [['dwed', np.int64(0)],\n", |
289 | 289 | " ['dwe', np.int64(0)],\n", |
290 | 290 | " ['dwed', np.int64(1)],\n", |
|
295 | 295 | " ['dwe', np.int64(3)]]}" |
296 | 296 | ] |
297 | 297 | }, |
298 | | - "execution_count": 9, |
| 298 | + "execution_count": 10, |
299 | 299 | "metadata": {}, |
300 | 300 | "output_type": "execute_result" |
301 | 301 | } |
|
307 | 307 | }, |
308 | 308 | { |
309 | 309 | "cell_type": "code", |
310 | | - "execution_count": 10, |
| 310 | + "execution_count": 11, |
311 | 311 | "id": "0ca94f3f-452f-4173-a37b-22fae5ed9f19", |
312 | 312 | "metadata": {}, |
313 | 313 | "outputs": [ |
|
318 | 318 | " ['who'],\n", |
319 | 319 | " ['it'],\n", |
320 | 320 | " ['be']], dtype='<U5'),\n", |
321 | | - " 'f_a(x)': array([1.46161733, 0.72355182, 0.72355182, 0.28535747]),\n", |
| 321 | + " 'f_a(x)': array([0.17396565, 0.0962287 , 0.0962287 , 0.05897216]),\n", |
322 | 322 | " 'opt_obj': None}" |
323 | 323 | ] |
324 | 324 | }, |
325 | | - "execution_count": 10, |
| 325 | + "execution_count": 11, |
326 | 326 | "metadata": {}, |
327 | 327 | "output_type": "execute_result" |
328 | 328 | } |
|
364 | 364 | "name": "python", |
365 | 365 | "nbconvert_exporter": "python", |
366 | 366 | "pygments_lexer": "ipython3", |
367 | | - "version": "3.11.14" |
| 367 | + "version": "3.11.15" |
368 | 368 | } |
369 | 369 | }, |
370 | 370 | "nbformat": 4, |
|
0 commit comments