|
30 | 30 | }, |
31 | 31 | { |
32 | 32 | "cell_type": "code", |
33 | | - "execution_count": 29, |
| 33 | + "execution_count": 14, |
34 | 34 | "metadata": { |
35 | | - "id": "-wKB9H9ZaASf" |
| 35 | + "colab": { |
| 36 | + "base_uri": "https://localhost:8080/" |
| 37 | + }, |
| 38 | + "id": "-wKB9H9ZaASf", |
| 39 | + "outputId": "a5ffc820-2e40-41e8-b82f-ea0245a02fea" |
36 | 40 | }, |
37 | | - "outputs": [], |
| 41 | + "outputs": [ |
| 42 | + { |
| 43 | + "name": "stdout", |
| 44 | + "output_type": "stream", |
| 45 | + "text": [ |
| 46 | + "Proceed (Y/n)? y\n", |
| 47 | + "Proceed (Y/n)? y\n" |
| 48 | + ] |
| 49 | + } |
| 50 | + ], |
38 | 51 | "source": [ |
39 | 52 | "# Try uninstall then reinstall, should Colab crashes\n", |
40 | | - "# %pip uninstall --quiet gtsam-develop\n", |
41 | | - "# %pip uninstall --quiet gtbook\n", |
42 | | - "%pip install --quiet gtsam-develop\n", |
43 | | - "%pip install --quiet gtbook" |
| 53 | + "try:\n", |
| 54 | + " %pip uninstall --quiet gtsam-develop\n", |
| 55 | + " %pip uninstall --quiet gtbook\n", |
| 56 | + "except:\n", |
| 57 | + " pass\n", |
| 58 | + "\n", |
| 59 | + "try:\n", |
| 60 | + " import google.colab\n", |
| 61 | + " %pip install --quiet gtsam-develop\n", |
| 62 | + " %pip install --quiet gtbook\n", |
| 63 | + "except ImportError:\n", |
| 64 | + " pass # Not in Colab\n" |
44 | 65 | ] |
45 | 66 | }, |
46 | 67 | { |
47 | 68 | "cell_type": "code", |
48 | | - "execution_count": 30, |
| 69 | + "execution_count": 15, |
49 | 70 | "metadata": { |
50 | 71 | "id": "hUK913WGZvB1" |
51 | 72 | }, |
|
128 | 149 | }, |
129 | 150 | { |
130 | 151 | "cell_type": "code", |
131 | | - "execution_count": 31, |
| 152 | + "execution_count": 16, |
132 | 153 | "metadata": { |
133 | 154 | "id": "iQRHn0qFdYXL" |
134 | 155 | }, |
|
257 | 278 | }, |
258 | 279 | { |
259 | 280 | "cell_type": "code", |
260 | | - "execution_count": 32, |
| 281 | + "execution_count": 17, |
261 | 282 | "metadata": { |
262 | 283 | "id": "R6YXu9dcTkWG" |
263 | 284 | }, |
|
309 | 330 | }, |
310 | 331 | { |
311 | 332 | "cell_type": "code", |
312 | | - "execution_count": 33, |
| 333 | + "execution_count": 18, |
313 | 334 | "metadata": { |
314 | 335 | "colab": { |
315 | 336 | "base_uri": "https://localhost:8080/", |
316 | 337 | "height": 460 |
317 | 338 | }, |
318 | 339 | "id": "Pg5n_cfVd5V7", |
319 | | - "outputId": "fbb9a36b-207c-41f3-fc7b-e8e624316470" |
| 340 | + "outputId": "8959467e-c2d3-4762-d278-a1102e4e4076" |
320 | 341 | }, |
321 | 342 | "outputs": [ |
322 | 343 | { |
|
328 | 349 | " [0.14365837, 0.04085496]])" |
329 | 350 | ] |
330 | 351 | }, |
331 | | - "execution_count": 33, |
| 352 | + "execution_count": 18, |
332 | 353 | "metadata": {}, |
333 | 354 | "output_type": "execute_result" |
334 | 355 | }, |
|
396 | 417 | }, |
397 | 418 | { |
398 | 419 | "cell_type": "code", |
399 | | - "execution_count": 34, |
| 420 | + "execution_count": 19, |
400 | 421 | "metadata": { |
401 | 422 | "colab": { |
402 | 423 | "base_uri": "https://localhost:8080/", |
403 | 424 | "height": 103 |
404 | 425 | }, |
405 | 426 | "id": "ggr3ukXoMw06", |
406 | | - "outputId": "298167de-0dd5-4326-c42f-dcc2fcfb04e3" |
| 427 | + "outputId": "00d4fc60-6e17-48b8-aa62-859886626ae4" |
407 | 428 | }, |
408 | 429 | "outputs": [ |
409 | 430 | { |
|
616 | 637 | "</svg>\n" |
617 | 638 | ], |
618 | 639 | "text/plain": [ |
619 | | - "<graphviz.sources.Source at 0x79fa3f7459d0>" |
| 640 | + "<graphviz.sources.Source at 0x785e48175790>" |
620 | 641 | ] |
621 | 642 | }, |
622 | | - "execution_count": 34, |
| 643 | + "execution_count": 19, |
623 | 644 | "metadata": {}, |
624 | 645 | "output_type": "execute_result" |
625 | 646 | } |
|
718 | 739 | }, |
719 | 740 | { |
720 | 741 | "cell_type": "code", |
721 | | - "execution_count": 35, |
| 742 | + "execution_count": 20, |
722 | 743 | "metadata": { |
723 | 744 | "colab": { |
724 | 745 | "base_uri": "https://localhost:8080/" |
725 | 746 | }, |
726 | 747 | "id": "FZ1zz1ozM0RP", |
727 | | - "outputId": "5c8118b7-4e66-4fbc-fc6c-cb8c0d2916c5" |
| 748 | + "outputId": "d5bdde07-13e7-48e7-de9c-1f0f05ba21f1" |
728 | 749 | }, |
729 | 750 | "outputs": [ |
730 | 751 | { |
|
747 | 768 | }, |
748 | 769 | { |
749 | 770 | "cell_type": "code", |
750 | | - "execution_count": 36, |
| 771 | + "execution_count": 21, |
751 | 772 | "metadata": { |
752 | 773 | "colab": { |
753 | 774 | "base_uri": "https://localhost:8080/", |
754 | 775 | "height": 176 |
755 | 776 | }, |
756 | 777 | "id": "8ZT2qtwyM7o_", |
757 | | - "outputId": "cc21b368-449a-46fd-e47f-b9dc0b4a3e41" |
| 778 | + "outputId": "64ed7e96-a7e5-453d-e005-462bfe583ff6" |
758 | 779 | }, |
759 | 780 | "outputs": [ |
760 | 781 | { |
|
871 | 892 | "</svg>\n" |
872 | 893 | ], |
873 | 894 | "text/plain": [ |
874 | | - "<gtbook.display.show at 0x79fa3f74d610>" |
| 895 | + "<gtbook.display.show at 0x785e276f0c50>" |
875 | 896 | ] |
876 | 897 | }, |
877 | | - "execution_count": 36, |
| 898 | + "execution_count": 21, |
878 | 899 | "metadata": {}, |
879 | 900 | "output_type": "execute_result" |
880 | 901 | } |
|
886 | 907 | }, |
887 | 908 | { |
888 | 909 | "cell_type": "code", |
889 | | - "execution_count": 37, |
| 910 | + "execution_count": 22, |
890 | 911 | "metadata": { |
891 | 912 | "colab": { |
892 | 913 | "base_uri": "https://localhost:8080/", |
893 | 914 | "height": 447 |
894 | 915 | }, |
895 | 916 | "id": "0MyYkdtkYdus", |
896 | | - "outputId": "7cbf295f-46a1-4976-9180-2c0af8af38b1" |
| 917 | + "outputId": "7f5703d8-c619-4116-b300-aae958b5150c" |
897 | 918 | }, |
898 | 919 | "outputs": [ |
899 | 920 | { |
900 | 921 | "data": { |
901 | 922 | "text/plain": [ |
902 | | - "<matplotlib.image.AxesImage at 0x79fa656bc850>" |
| 923 | + "<matplotlib.image.AxesImage at 0x785e276bec50>" |
903 | 924 | ] |
904 | 925 | }, |
905 | | - "execution_count": 37, |
| 926 | + "execution_count": 22, |
906 | 927 | "metadata": {}, |
907 | 928 | "output_type": "execute_result" |
908 | 929 | }, |
|
924 | 945 | }, |
925 | 946 | { |
926 | 947 | "cell_type": "code", |
927 | | - "execution_count": 38, |
| 948 | + "execution_count": 23, |
928 | 949 | "metadata": { |
929 | 950 | "colab": { |
930 | 951 | "base_uri": "https://localhost:8080/", |
931 | 952 | "height": 211 |
932 | 953 | }, |
933 | 954 | "id": "qcekbRZweMlN", |
934 | | - "outputId": "b803fe99-5d4c-46aa-a79a-04ede28ef989" |
| 955 | + "outputId": "20eb32ea-2a59-455a-ca6c-b2c6c4662951" |
935 | 956 | }, |
936 | 957 | "outputs": [ |
937 | 958 | { |
|
1092 | 1113 | "</svg>\n" |
1093 | 1114 | ], |
1094 | 1115 | "text/plain": [ |
1095 | | - "<gtbook.display.show at 0x79fa3f374fd0>" |
| 1116 | + "<gtbook.display.show at 0x785e261e29d0>" |
1096 | 1117 | ] |
1097 | 1118 | }, |
1098 | | - "execution_count": 38, |
| 1119 | + "execution_count": 23, |
1099 | 1120 | "metadata": {}, |
1100 | 1121 | "output_type": "execute_result" |
1101 | 1122 | } |
1102 | 1123 | ], |
1103 | 1124 | "source": [ |
1104 | 1125 | "# The resulting Bayesian graph under a different ordering\n", |
1105 | | - "# The dependency would change, like we have described before\n", |
| 1126 | + "# The resulting dependency would change, like we have described before\n", |
1106 | 1127 | "\n", |
1107 | 1128 | "# New ordering\n", |
1108 | 1129 | "N = 4\n", |
|
1164 | 1185 | }, |
1165 | 1186 | { |
1166 | 1187 | "cell_type": "code", |
1167 | | - "execution_count": 39, |
| 1188 | + "execution_count": 24, |
1168 | 1189 | "metadata": { |
1169 | 1190 | "colab": { |
1170 | 1191 | "base_uri": "https://localhost:8080/", |
1171 | 1192 | "height": 563 |
1172 | 1193 | }, |
1173 | 1194 | "id": "bZt3HQ5xCVoN", |
1174 | | - "outputId": "9e870736-4741-4e72-9d74-9e13c3eb797f" |
| 1195 | + "outputId": "927f1b13-3a5b-4d19-b517-fdb7c1332237" |
1175 | 1196 | }, |
1176 | 1197 | "outputs": [ |
1177 | 1198 | { |
|
0 commit comments