|
581 | 581 | {
|
582 | 582 | "data": {
|
583 | 583 | "application/vnd.jupyter.widget-view+json": {
|
584 |
| - "model_id": "2709d4897c90432eabebbcf3aa60113c", |
| 584 | + "model_id": "c65bc79da49448efb42e0bfd882986e4", |
585 | 585 | "version_major": 2,
|
586 | 586 | "version_minor": 0
|
587 | 587 | },
|
|
758 | 758 | {
|
759 | 759 | "data": {
|
760 | 760 | "application/vnd.jupyter.widget-view+json": {
|
761 |
| - "model_id": "29c7da8c293a43ddb6e34bd840e9971e", |
| 761 | + "model_id": "67b1c6758fff4724b590d76d758d0de5", |
762 | 762 | "version_major": 2,
|
763 | 763 | "version_minor": 0
|
764 | 764 | },
|
|
1250 | 1250 | {
|
1251 | 1251 | "data": {
|
1252 | 1252 | "application/vnd.jupyter.widget-view+json": {
|
1253 |
| - "model_id": "f47a87a1ec27474ea864c92a52ce4ac9", |
| 1253 | + "model_id": "30b640471e4c4f91a079e8f32994f7f3", |
1254 | 1254 | "version_major": 2,
|
1255 | 1255 | "version_minor": 0
|
1256 | 1256 | },
|
|
1303 | 1303 | {
|
1304 | 1304 | "data": {
|
1305 | 1305 | "application/vnd.jupyter.widget-view+json": {
|
1306 |
| - "model_id": "15dde650d59e4ffe88e2163d1220860f", |
| 1306 | + "model_id": "32ba45c576874b9d965aa34b6cbb2002", |
1307 | 1307 | "version_major": 2,
|
1308 | 1308 | "version_minor": 0
|
1309 | 1309 | },
|
|
1527 | 1527 | " print()\n",
|
1528 | 1528 | " print('final position is', robot.pos)\n",
|
1529 | 1529 | " index = np.argmax(posterior)\n",
|
1530 |
| - " print('''Estimated position is {} with '''\n", |
1531 |
| - " '''confidence {:.4f}%:'''.format(\n", |
1532 |
| - " index, posterior[index]*100))" |
| 1530 | + " conf = posterior[index]*100\n", |
| 1531 | + " print(f'Estimated position is {index} with confidence {conf:.4f}')" |
1533 | 1532 | ]
|
1534 | 1533 | },
|
1535 | 1534 | {
|
|
1558 | 1557 | " estimated position is 6 with confidence 100.0000%:\n",
|
1559 | 1558 | "\n",
|
1560 | 1559 | "final position is 6\n",
|
1561 |
| - "Estimated position is 6 with confidence 100.0000%:\n" |
| 1560 | + "Estimated position is 6 with confidence 100.0000\n" |
1562 | 1561 | ]
|
1563 | 1562 | },
|
1564 | 1563 | {
|
|
1607 | 1606 | " estimated position is 8 with confidence 49.3174%:\n",
|
1608 | 1607 | "\n",
|
1609 | 1608 | "final position is 7\n",
|
1610 |
| - "Estimated position is 8 with confidence 49.3174%:\n" |
| 1609 | + "Estimated position is 8 with confidence 49.3174\n" |
1611 | 1610 | ]
|
1612 | 1611 | },
|
1613 | 1612 | {
|
|
0 commit comments