Skip to content

Instantly share code, notes, and snippets.

@colehaus
Created July 17, 2022 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colehaus/c99b19145351e8f519da08c8aa11919c to your computer and use it in GitHub Desktop.
Save colehaus/c99b19145351e8f519da08c8aa11919c to your computer and use it in GitHub Desktop.
gratuitous-scan.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "gratuitous-scan.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyOPimCoDCLOZ7/j20ZYM4je",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"0f666c13001e44958e68d74ff8a6b311": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_e15d346d41fc43ad98016c4b0f41e439",
"IPY_MODEL_fb60736666f74a11a84c7e4c6a51a378",
"IPY_MODEL_27f27b9d4f754095bf87d3ffa4069c20"
],
"layout": "IPY_MODEL_4240136eb0fd4987a0eb5d305bc45011"
}
},
"e15d346d41fc43ad98016c4b0f41e439": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_dde55b8b6b0245e580d785988fb7b7ef",
"placeholder": "​",
"style": "IPY_MODEL_b41a47a548d14a3ba6304cb9b865ab49",
"value": "Running chain 0: 100%"
}
},
"fb60736666f74a11a84c7e4c6a51a378": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_cdaa349f064143029d83bcd01646e681",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_264a2bb0320648249924c6cbf9e9e5d8",
"value": 50250
}
},
"27f27b9d4f754095bf87d3ffa4069c20": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_18b4387ec5f745c0b4cf06eec641ac0b",
"placeholder": "​",
"style": "IPY_MODEL_e78f2e5a3ce04e18ab20eb81b66fd8af",
"value": " 50250/50250 [00:37<00:00, 2376.02it/s]"
}
},
"4240136eb0fd4987a0eb5d305bc45011": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"dde55b8b6b0245e580d785988fb7b7ef": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b41a47a548d14a3ba6304cb9b865ab49": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"cdaa349f064143029d83bcd01646e681": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"264a2bb0320648249924c6cbf9e9e5d8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"18b4387ec5f745c0b4cf06eec641ac0b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e78f2e5a3ce04e18ab20eb81b66fd8af": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"01882118d0d1418bae49dff5757e4e8b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_cc59332f35c34555af586c3bcc700fa1",
"IPY_MODEL_906304a33f004ba49bea39ece5286ab4",
"IPY_MODEL_90040a88cfd24faa889e077b255291b9"
],
"layout": "IPY_MODEL_210c126192624948b6374d10fa536e31"
}
},
"cc59332f35c34555af586c3bcc700fa1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_a12161d5c7194a5394f4cbe5562967d5",
"placeholder": "​",
"style": "IPY_MODEL_24aa34328cc2481a9b56d9b26bb65324",
"value": "Running chain 1: 100%"
}
},
"906304a33f004ba49bea39ece5286ab4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_931f5bab8a224d7aaf259afcf9e44f9b",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_20390d898b7247d097f4d4d984a1a391",
"value": 50250
}
},
"90040a88cfd24faa889e077b255291b9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_a9c4184d283f4a579569dffb68e60c3a",
"placeholder": "​",
"style": "IPY_MODEL_b0fa2c93fd07409a8149c17297584c8d",
"value": " 50250/50250 [00:37<00:00, 2358.00it/s]"
}
},
"210c126192624948b6374d10fa536e31": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a12161d5c7194a5394f4cbe5562967d5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"24aa34328cc2481a9b56d9b26bb65324": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"931f5bab8a224d7aaf259afcf9e44f9b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"20390d898b7247d097f4d4d984a1a391": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"a9c4184d283f4a579569dffb68e60c3a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b0fa2c93fd07409a8149c17297584c8d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9fe30a86de6c478d9b03c73a3ee90657": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_1fc8bb954bde4ea9a4f757e3cd5a7b42",
"IPY_MODEL_7af4b7be58024b4fb5361d5bc6c2eae3",
"IPY_MODEL_26b54921eef645d694e6af0f46a44cd0"
],
"layout": "IPY_MODEL_69d745d0e0554d488f4a8b82bf3d8778"
}
},
"1fc8bb954bde4ea9a4f757e3cd5a7b42": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_fd1034658f7545b68197efd8adedf96b",
"placeholder": "​",
"style": "IPY_MODEL_b0610b8d02a84ac788db8c37523522cd",
"value": "Running chain 0: 100%"
}
},
"7af4b7be58024b4fb5361d5bc6c2eae3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_21088fa51560456f851f6e9fb3cfff02",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_22d386ba81b348c9abea522f332518ec",
"value": 50250
}
},
"26b54921eef645d694e6af0f46a44cd0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_4eb3f3fae0e54002a4155dd455426d0b",
"placeholder": "​",
"style": "IPY_MODEL_9bce083b3d5c4571a27e6bf60c990d15",
"value": " 50250/50250 [01:03<00:00, 1116.64it/s]"
}
},
"69d745d0e0554d488f4a8b82bf3d8778": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"fd1034658f7545b68197efd8adedf96b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b0610b8d02a84ac788db8c37523522cd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"21088fa51560456f851f6e9fb3cfff02": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"22d386ba81b348c9abea522f332518ec": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"4eb3f3fae0e54002a4155dd455426d0b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9bce083b3d5c4571a27e6bf60c990d15": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ce6108d6d63245f2bb8ce9f5a456c3ec": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_1872da40649a4b9da6f724fc1a64af72",
"IPY_MODEL_3fb300c2df8444b79bcb7997c0bf16a8",
"IPY_MODEL_0b78a3214dc841d181d6d721761b203e"
],
"layout": "IPY_MODEL_b8c0865e561d4f2883ace4211ac80ff3"
}
},
"1872da40649a4b9da6f724fc1a64af72": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8b21981eb98045189d97cbdc3c5d0a21",
"placeholder": "​",
"style": "IPY_MODEL_4802efef30634670b62945001e568ce0",
"value": "Running chain 1: 100%"
}
},
"3fb300c2df8444b79bcb7997c0bf16a8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_55f7344081db4e3d8007930c79e6d7a7",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_7e50b9c33e5d453cb980f10bc2bef622",
"value": 50250
}
},
"0b78a3214dc841d181d6d721761b203e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1d84ec4bbb3d42a793ed059f8db6ed23",
"placeholder": "​",
"style": "IPY_MODEL_00c4c891b3b243b9bdfd3628adc497a3",
"value": " 50250/50250 [01:03<00:00, 1299.21it/s]"
}
},
"b8c0865e561d4f2883ace4211ac80ff3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"8b21981eb98045189d97cbdc3c5d0a21": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4802efef30634670b62945001e568ce0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"55f7344081db4e3d8007930c79e6d7a7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"7e50b9c33e5d453cb980f10bc2bef622": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"1d84ec4bbb3d42a793ed059f8db6ed23": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"00c4c891b3b243b9bdfd3628adc497a3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"d9e373fe1b7645ba903a855b48a3c6dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_f1c1d470aa1f412faab2f4a9f2fffc44",
"IPY_MODEL_372d7831e8014da185bd30af7ec011a9",
"IPY_MODEL_945a2137b6ef4ae0bb3f767a725d66ff"
],
"layout": "IPY_MODEL_6a2b825d8d3c45bb99ede29ce7bd952a"
}
},
"f1c1d470aa1f412faab2f4a9f2fffc44": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_297a02346aea4419b8d1e1c8a69eaeff",
"placeholder": "​",
"style": "IPY_MODEL_69a5f70bbf754070a88ee0b615bb7be7",
"value": "Running chain 0: 100%"
}
},
"372d7831e8014da185bd30af7ec011a9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_851657ffe37b4ff0805637090c779f03",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_f0c78892b78a4b8180188711a5225cbe",
"value": 50250
}
},
"945a2137b6ef4ae0bb3f767a725d66ff": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_a0a23a4e288c489bb2549049d2de117d",
"placeholder": "​",
"style": "IPY_MODEL_3217101cd7fb4433ae7914baa30c1a4c",
"value": " 50250/50250 [01:49<00:00, 558.49it/s]"
}
},
"6a2b825d8d3c45bb99ede29ce7bd952a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"297a02346aea4419b8d1e1c8a69eaeff": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"69a5f70bbf754070a88ee0b615bb7be7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"851657ffe37b4ff0805637090c779f03": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f0c78892b78a4b8180188711a5225cbe": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"a0a23a4e288c489bb2549049d2de117d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"3217101cd7fb4433ae7914baa30c1a4c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"552b44a5684c4c24a1f8a8ce11e1c332": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ba13ffbeb83047f98d0bd7042f7c4236",
"IPY_MODEL_eb56867bf15b4590b46d7afec9eab16b",
"IPY_MODEL_56768c77be0d4aaf9cabb3e1decf6a52"
],
"layout": "IPY_MODEL_0fd7d547fe0c43ed8937efab6cb26c86"
}
},
"ba13ffbeb83047f98d0bd7042f7c4236": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8adff4defdf5474e88d6a850ec3e0137",
"placeholder": "​",
"style": "IPY_MODEL_d98879d853bb4c58be32d697391e1945",
"value": "Running chain 1: 100%"
}
},
"eb56867bf15b4590b46d7afec9eab16b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_f4d24983a89941fc833c13a43a35356c",
"max": 50250,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_365cf7e45fad482e81b7e576125ead1d",
"value": 50250
}
},
"56768c77be0d4aaf9cabb3e1decf6a52": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_24ff25ee7e8440ff9da0499f5b8056e8",
"placeholder": "​",
"style": "IPY_MODEL_89782042718a46918a78f27ba2706a4e",
"value": " 50250/50250 [01:49<00:00, 635.49it/s]"
}
},
"0fd7d547fe0c43ed8937efab6cb26c86": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"8adff4defdf5474e88d6a850ec3e0137": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"d98879d853bb4c58be32d697391e1945": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"f4d24983a89941fc833c13a43a35356c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"365cf7e45fad482e81b7e576125ead1d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"24ff25ee7e8440ff9da0499f5b8056e8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"89782042718a46918a78f27ba2706a4e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/colehaus/c99b19145351e8f519da08c8aa11919c/gratuitous-scan.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hmmwXtURrkA9",
"outputId": "c336ad0f-803b-4920-f1ed-cefe16c30597"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Requirement already satisfied: numpyro in /usr/local/lib/python3.7/dist-packages (0.10.0)\n",
"Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from numpyro) (4.64.0)\n",
"Requirement already satisfied: multipledispatch in /usr/local/lib/python3.7/dist-packages (from numpyro) (0.6.0)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from numpyro) (1.21.6)\n",
"Requirement already satisfied: jaxlib>=0.1.65 in /usr/local/lib/python3.7/dist-packages (from numpyro) (0.3.14+cuda11.cudnn805)\n",
"Requirement already satisfied: jax>=0.2.13 in /usr/local/lib/python3.7/dist-packages (from numpyro) (0.3.14)\n",
"Requirement already satisfied: scipy>=1.5 in /usr/local/lib/python3.7/dist-packages (from jax>=0.2.13->numpyro) (1.7.3)\n",
"Requirement already satisfied: opt-einsum in /usr/local/lib/python3.7/dist-packages (from jax>=0.2.13->numpyro) (3.3.0)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from jax>=0.2.13->numpyro) (4.1.1)\n",
"Requirement already satisfied: etils[epath] in /usr/local/lib/python3.7/dist-packages (from jax>=0.2.13->numpyro) (0.6.0)\n",
"Requirement already satisfied: absl-py in /usr/local/lib/python3.7/dist-packages (from jax>=0.2.13->numpyro) (1.1.0)\n",
"Requirement already satisfied: flatbuffers<3.0,>=1.12 in /usr/local/lib/python3.7/dist-packages (from jaxlib>=0.1.65->numpyro) (2.0)\n",
"Requirement already satisfied: zipp in /usr/local/lib/python3.7/dist-packages (from etils[epath]->jax>=0.2.13->numpyro) (3.8.0)\n",
"Requirement already satisfied: importlib_resources in /usr/local/lib/python3.7/dist-packages (from etils[epath]->jax>=0.2.13->numpyro) (5.8.0)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from multipledispatch->numpyro) (1.15.0)\n"
]
}
],
"source": [
"%pip install numpyro"
]
},
{
"cell_type": "code",
"source": [
"import jax.numpy as jnp\n",
"from jax.random import PRNGKey, multivariate_normal\n",
"import numpyro as ny\n",
"import numpyro.distributions as dist\n",
"from numpyro.contrib.control_flow import scan\n",
"from numpyro.handlers import reparam\n",
"from numpyro.infer import MCMC, NUTS\n",
"from numpyro.infer.reparam import TransformReparam\n",
"\n",
"ny.util.set_host_device_count(2) "
],
"metadata": {
"id": "HtUeXlNZwBj_"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def static( observed):\n",
"\n",
" length, width = observed.shape\n",
"\n",
" correlation_chol = ny.sample(\"correlation_chol\", dist.LKJCholesky(width, concentration=1))\n",
" variances = ny.sample(\"variances\", dist.HalfCauchy(scale=1).expand((width,)))\n",
" cov_chol = ny.deterministic(\"cov_chol\", jnp.sqrt(variances)[..., None] * correlation_chol)\n",
"\n",
" tau = ny.sample(\"tau\", dist.HalfNormal(scale=1))\n",
" with reparam(config={\"loc\": TransformReparam()}):\n",
" loc = ny.sample(\n",
" \"loc\",\n",
" dist.TransformedDistribution(\n",
" dist.Normal(loc=0, scale=1).expand((width,)),\n",
" dist.transforms.LowerCholeskyAffine(loc=jnp.zeros(width), scale_tril=cov_chol * tau),\n",
" ),\n",
" )\n",
"\n",
" with ny.plate(\"data\", length):\n",
" ny.sample(\"observed\", dist.MultivariateNormal(loc=loc, scale_tril=cov_chol), obs=observed)"
],
"metadata": {
"id": "32fLC4ZkuM6v"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def static_scan( observed):\n",
"\n",
" length, width = observed.shape\n",
"\n",
" correlation_chol = ny.sample(\"correlation_chol\", dist.LKJCholesky(width, concentration=1))\n",
" variances = ny.sample(\"variances\", dist.HalfCauchy(scale=1).expand((width,)))\n",
" cov_chol = ny.deterministic(\"cov_chol\", jnp.sqrt(variances)[..., None] * correlation_chol)\n",
"\n",
" tau = ny.sample(\"tau\", dist.HalfNormal(scale=1))\n",
" with reparam(config={\"loc\": TransformReparam()}):\n",
" loc = ny.sample(\n",
" \"loc\",\n",
" dist.TransformedDistribution(\n",
" dist.Normal(loc=0, scale=1).expand((width,)),\n",
" dist.transforms.LowerCholeskyAffine(loc=jnp.zeros(width), scale_tril=cov_chol * tau),\n",
" ),\n",
" )\n",
"\n",
" def inner(state, pos):\n",
" ny.sample(\"observed\", dist.MultivariateNormal(loc=loc, scale_tril=cov_chol))\n",
" return None, None\n",
"\n",
" with ny.handlers.condition(data={\"observed\": observed[1:]}):\n",
" scan(inner, None, jnp.arange(1, length))\n"
],
"metadata": {
"id": "8vMfqAjTSKRQ"
},
"execution_count": 10,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def exogenous(observed, exog):\n",
" length, n_endog = observed.shape\n",
" _, n_exog = exog.shape\n",
"\n",
" correlation_chol = ny.sample(\"correlation_chol\", dist.LKJCholesky(n_endog, concentration=1))\n",
" variances = ny.sample(\"variances\", dist.HalfCauchy(scale=1).expand((n_endog,)))\n",
" cov_chol = ny.deterministic(\"cov_chol\", jnp.sqrt(variances)[..., None] * correlation_chol)\n",
"\n",
" tau = ny.sample(\"tau\", dist.HalfNormal(scale=1))\n",
" with reparam(config={\"loc\": TransformReparam()}):\n",
" loc = ny.sample(\n",
" \"loc\",\n",
" dist.TransformedDistribution(\n",
" dist.Normal(loc=0, scale=1).expand((n_endog,)),\n",
" dist.transforms.LowerCholeskyAffine(loc=jnp.zeros(n_endog), scale_tril=cov_chol * tau),\n",
" ),\n",
" )\n",
"\n",
" loc_coeff = ny.sample(\"loc_coeff\", dist.Normal(loc=0, scale=1).expand((n_endog, n_exog)))\n",
"\n",
" def inner(state, pos):\n",
" loc_delta = loc_coeff @ exog[pos - 1, :]\n",
" ny.sample(\"observed\", dist.MultivariateNormal(loc=loc + loc_delta, scale_tril=cov_chol))\n",
" return None, None\n",
"\n",
" with ny.handlers.condition(data={\"observed\": observed[1:]}):\n",
" scan(inner, None, jnp.arange(1, length))"
],
"metadata": {
"id": "ScfL_MVEzqBh"
},
"execution_count": 4,
"outputs": []
},
{
"cell_type": "code",
"source": [
"mcmc = MCMC(NUTS(static), num_warmup=250, num_samples=50000, num_chains=2) # High `num_samples` just to demonstrate perf difference\n",
"endog_data = multivariate_normal(key=PRNGKey(1), mean=jnp.array([1, 0.5, 1, -0.5, 0]), cov=jnp.eye(5), shape=(120,))\n",
"mcmc.run(PRNGKey(0), observed=endog_data)\n",
"mcmc.print_summary()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 776,
"referenced_widgets": [
"0f666c13001e44958e68d74ff8a6b311",
"e15d346d41fc43ad98016c4b0f41e439",
"fb60736666f74a11a84c7e4c6a51a378",
"27f27b9d4f754095bf87d3ffa4069c20",
"4240136eb0fd4987a0eb5d305bc45011",
"dde55b8b6b0245e580d785988fb7b7ef",
"b41a47a548d14a3ba6304cb9b865ab49",
"cdaa349f064143029d83bcd01646e681",
"264a2bb0320648249924c6cbf9e9e5d8",
"18b4387ec5f745c0b4cf06eec641ac0b",
"e78f2e5a3ce04e18ab20eb81b66fd8af",
"01882118d0d1418bae49dff5757e4e8b",
"cc59332f35c34555af586c3bcc700fa1",
"906304a33f004ba49bea39ece5286ab4",
"90040a88cfd24faa889e077b255291b9",
"210c126192624948b6374d10fa536e31",
"a12161d5c7194a5394f4cbe5562967d5",
"24aa34328cc2481a9b56d9b26bb65324",
"931f5bab8a224d7aaf259afcf9e44f9b",
"20390d898b7247d097f4d4d984a1a391",
"a9c4184d283f4a579569dffb68e60c3a",
"b0fa2c93fd07409a8149c17297584c8d"
]
},
"id": "9cdFv2xf3BuV",
"outputId": "92525985-d2cf-4027-8819-f6a650ef897a"
},
"execution_count": 5,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "0f666c13001e44958e68d74ff8a6b311"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "01882118d0d1418bae49dff5757e4e8b"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
" mean std median 5.0% 95.0% n_eff r_hat\n",
"correlation_chol[0,0] 1.00 0.00 1.00 1.00 1.00 nan nan\n",
"correlation_chol[0,1] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,0] 0.01 0.09 0.01 -0.13 0.16 132688.91 1.00\n",
"correlation_chol[1,1] 1.00 0.01 1.00 0.99 1.00 49857.53 1.00\n",
"correlation_chol[1,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,0] 0.00 0.09 0.00 -0.15 0.15 145667.84 1.00\n",
"correlation_chol[2,1] -0.09 0.09 -0.09 -0.24 0.05 112816.95 1.00\n",
"correlation_chol[2,2] 0.99 0.01 0.99 0.97 1.00 66479.88 1.00\n",
"correlation_chol[2,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[3,0] 0.10 0.09 0.10 -0.05 0.24 91457.29 1.00\n",
"correlation_chol[3,1] -0.09 0.09 -0.09 -0.23 0.06 101338.81 1.00\n",
"correlation_chol[3,2] 0.19 0.08 0.20 0.05 0.33 88363.75 1.00\n",
"correlation_chol[3,3] 0.96 0.02 0.96 0.93 0.99 77838.84 1.00\n",
"correlation_chol[3,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[4,0] 0.08 0.09 0.08 -0.07 0.22 110601.90 1.00\n",
"correlation_chol[4,1] -0.13 0.09 -0.13 -0.28 0.01 141550.48 1.00\n",
"correlation_chol[4,2] -0.07 0.09 -0.08 -0.21 0.07 97761.47 1.00\n",
"correlation_chol[4,3] 0.05 0.09 0.05 -0.10 0.19 131837.85 1.00\n",
"correlation_chol[4,4] 0.97 0.02 0.97 0.94 1.00 79866.43 1.00\n",
" loc_base[0] 1.11 0.35 1.07 0.54 1.66 27916.26 1.00\n",
" loc_base[1] 0.66 0.25 0.63 0.26 1.04 34202.01 1.00\n",
" loc_base[2] 1.36 0.43 1.32 0.65 2.00 28406.80 1.00\n",
" loc_base[3] -0.90 0.33 -0.86 -1.41 -0.38 31388.35 1.00\n",
" loc_base[4] 0.27 0.24 0.25 -0.10 0.66 51306.46 1.00\n",
" tau 0.92 0.31 0.86 0.48 1.37 24795.77 1.00\n",
" variances[0] 1.00 0.13 0.99 0.78 1.20 140266.95 1.00\n",
" variances[1] 1.04 0.14 1.03 0.82 1.26 150614.58 1.00\n",
" variances[2] 1.03 0.14 1.02 0.81 1.24 128852.80 1.00\n",
" variances[3] 1.21 0.16 1.20 0.95 1.47 122822.08 1.00\n",
" variances[4] 1.03 0.14 1.02 0.81 1.24 140231.95 1.00\n",
"\n",
"Number of divergences: 4\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"mcmc = MCMC(NUTS(static_scan), num_warmup=250, num_samples=50000, num_chains=2) # High `num_samples` just to demonstrate perf difference\n",
"endog_data = multivariate_normal(key=PRNGKey(1), mean=jnp.array([1, 0.5, 1, -0.5, 0]), cov=jnp.eye(5), shape=(120,))\n",
"mcmc.run(PRNGKey(0), observed=endog_data)\n",
"mcmc.print_summary()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 776,
"referenced_widgets": [
"9fe30a86de6c478d9b03c73a3ee90657",
"1fc8bb954bde4ea9a4f757e3cd5a7b42",
"7af4b7be58024b4fb5361d5bc6c2eae3",
"26b54921eef645d694e6af0f46a44cd0",
"69d745d0e0554d488f4a8b82bf3d8778",
"fd1034658f7545b68197efd8adedf96b",
"b0610b8d02a84ac788db8c37523522cd",
"21088fa51560456f851f6e9fb3cfff02",
"22d386ba81b348c9abea522f332518ec",
"4eb3f3fae0e54002a4155dd455426d0b",
"9bce083b3d5c4571a27e6bf60c990d15",
"ce6108d6d63245f2bb8ce9f5a456c3ec",
"1872da40649a4b9da6f724fc1a64af72",
"3fb300c2df8444b79bcb7997c0bf16a8",
"0b78a3214dc841d181d6d721761b203e",
"b8c0865e561d4f2883ace4211ac80ff3",
"8b21981eb98045189d97cbdc3c5d0a21",
"4802efef30634670b62945001e568ce0",
"55f7344081db4e3d8007930c79e6d7a7",
"7e50b9c33e5d453cb980f10bc2bef622",
"1d84ec4bbb3d42a793ed059f8db6ed23",
"00c4c891b3b243b9bdfd3628adc497a3"
]
},
"id": "TIUsm9GdSrMf",
"outputId": "c8736e7a-ebe9-493d-c73f-b233882b9c71"
},
"execution_count": 11,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "9fe30a86de6c478d9b03c73a3ee90657"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ce6108d6d63245f2bb8ce9f5a456c3ec"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
" mean std median 5.0% 95.0% n_eff r_hat\n",
"correlation_chol[0,0] 1.00 0.00 1.00 1.00 1.00 nan nan\n",
"correlation_chol[0,1] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,0] 0.02 0.09 0.02 -0.14 0.16 101719.49 1.00\n",
"correlation_chol[1,1] 1.00 0.01 1.00 0.99 1.00 49982.27 1.00\n",
"correlation_chol[1,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,0] 0.01 0.09 0.01 -0.15 0.15 116839.29 1.00\n",
"correlation_chol[2,1] -0.10 0.09 -0.10 -0.24 0.05 116812.61 1.00\n",
"correlation_chol[2,2] 0.99 0.01 0.99 0.97 1.00 72048.67 1.00\n",
"correlation_chol[2,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[3,0] 0.10 0.09 0.10 -0.05 0.24 102477.82 1.00\n",
"correlation_chol[3,1] -0.09 0.09 -0.09 -0.23 0.06 122687.92 1.00\n",
"correlation_chol[3,2] 0.19 0.09 0.19 0.05 0.33 107356.28 1.00\n",
"correlation_chol[3,3] 0.96 0.02 0.96 0.93 1.00 84089.20 1.00\n",
"correlation_chol[3,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[4,0] 0.08 0.09 0.08 -0.07 0.23 97998.05 1.00\n",
"correlation_chol[4,1] -0.14 0.09 -0.14 -0.28 0.01 148750.37 1.00\n",
"correlation_chol[4,2] -0.08 0.09 -0.08 -0.23 0.06 95099.61 1.00\n",
"correlation_chol[4,3] 0.05 0.09 0.05 -0.09 0.19 86641.99 1.00\n",
"correlation_chol[4,4] 0.97 0.02 0.97 0.94 1.00 82807.46 1.00\n",
" loc_base[0] 1.11 0.35 1.08 0.55 1.66 30162.55 1.00\n",
" loc_base[1] 0.65 0.25 0.62 0.27 1.04 36094.76 1.00\n",
" loc_base[2] 1.36 0.43 1.32 0.68 2.03 31268.27 1.00\n",
" loc_base[3] -0.90 0.33 -0.86 -1.41 -0.38 37193.72 1.00\n",
" loc_base[4] 0.27 0.24 0.25 -0.10 0.67 48955.15 1.00\n",
" tau 0.92 0.30 0.86 0.48 1.36 30351.25 1.00\n",
" variances[0] 1.00 0.13 0.99 0.78 1.21 112352.85 1.00\n",
" variances[1] 1.04 0.14 1.03 0.82 1.26 150205.56 1.00\n",
" variances[2] 1.03 0.14 1.01 0.80 1.24 129288.45 1.00\n",
" variances[3] 1.22 0.16 1.21 0.96 1.48 127424.31 1.00\n",
" variances[4] 1.04 0.14 1.02 0.81 1.25 125327.39 1.00\n",
"\n",
"Number of divergences: 1\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"mcmc = MCMC(NUTS(exogenous), num_warmup=250, num_samples=50000, num_chains=2) # High `num_samples` just to demonstrate perf difference\n",
"endog_data = multivariate_normal(key=PRNGKey(1), mean=jnp.array([1, 0.5, 1, -0.5, 0]), cov=jnp.eye(5), shape=(120,))\n",
"exog_data = jnp.abs(multivariate_normal(key=PRNGKey(2), mean=jnp.array([1, 0.5, 0]), cov=jnp.eye(3), shape=(120,)))\n",
"mcmc.run(PRNGKey(0), observed=endog_data, exog=exog_data)\n",
"mcmc.print_summary()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"d9e373fe1b7645ba903a855b48a3c6dc",
"f1c1d470aa1f412faab2f4a9f2fffc44",
"372d7831e8014da185bd30af7ec011a9",
"945a2137b6ef4ae0bb3f767a725d66ff",
"6a2b825d8d3c45bb99ede29ce7bd952a",
"297a02346aea4419b8d1e1c8a69eaeff",
"69a5f70bbf754070a88ee0b615bb7be7",
"851657ffe37b4ff0805637090c779f03",
"f0c78892b78a4b8180188711a5225cbe",
"a0a23a4e288c489bb2549049d2de117d",
"3217101cd7fb4433ae7914baa30c1a4c",
"552b44a5684c4c24a1f8a8ce11e1c332",
"ba13ffbeb83047f98d0bd7042f7c4236",
"eb56867bf15b4590b46d7afec9eab16b",
"56768c77be0d4aaf9cabb3e1decf6a52",
"0fd7d547fe0c43ed8937efab6cb26c86",
"8adff4defdf5474e88d6a850ec3e0137",
"d98879d853bb4c58be32d697391e1945",
"f4d24983a89941fc833c13a43a35356c",
"365cf7e45fad482e81b7e576125ead1d",
"24ff25ee7e8440ff9da0499f5b8056e8",
"89782042718a46918a78f27ba2706a4e"
]
},
"id": "2HuJ3vI16rvb",
"outputId": "1dc3ee28-5bfd-49fb-a545-a40b40686e79"
},
"execution_count": 6,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "d9e373fe1b7645ba903a855b48a3c6dc"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/50250 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "552b44a5684c4c24a1f8a8ce11e1c332"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
" mean std median 5.0% 95.0% n_eff r_hat\n",
"correlation_chol[0,0] 1.00 0.00 1.00 1.00 1.00 nan nan\n",
"correlation_chol[0,1] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[0,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,0] 0.04 0.09 0.04 -0.10 0.20 113664.51 1.00\n",
"correlation_chol[1,1] 1.00 0.01 1.00 0.99 1.00 58133.51 1.00\n",
"correlation_chol[1,2] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[1,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,0] -0.00 0.09 -0.01 -0.16 0.14 109417.55 1.00\n",
"correlation_chol[2,1] -0.07 0.09 -0.07 -0.22 0.07 94763.41 1.00\n",
"correlation_chol[2,2] 0.99 0.01 0.99 0.97 1.00 60643.94 1.00\n",
"correlation_chol[2,3] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[2,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[3,0] 0.10 0.09 0.10 -0.05 0.25 114741.88 1.00\n",
"correlation_chol[3,1] -0.10 0.09 -0.10 -0.24 0.05 105203.60 1.00\n",
"correlation_chol[3,2] 0.20 0.09 0.20 0.06 0.34 115861.70 1.00\n",
"correlation_chol[3,3] 0.96 0.02 0.96 0.92 0.99 94979.92 1.00\n",
"correlation_chol[3,4] 0.00 0.00 0.00 0.00 0.00 nan nan\n",
"correlation_chol[4,0] 0.07 0.09 0.07 -0.08 0.22 94395.09 1.00\n",
"correlation_chol[4,1] -0.13 0.09 -0.13 -0.27 0.02 108106.60 1.00\n",
"correlation_chol[4,2] -0.07 0.09 -0.07 -0.22 0.07 91913.36 1.00\n",
"correlation_chol[4,3] 0.05 0.09 0.05 -0.09 0.19 112808.40 1.00\n",
"correlation_chol[4,4] 0.97 0.02 0.97 0.94 1.00 74805.02 1.00\n",
" loc_base[0] 0.94 0.37 0.90 0.36 1.53 56492.71 1.00\n",
" loc_base[1] 0.71 0.34 0.67 0.17 1.25 63387.40 1.00\n",
" loc_base[2] 1.45 0.48 1.40 0.68 2.19 53877.99 1.00\n",
" loc_base[3] -0.88 0.39 -0.83 -1.49 -0.25 65206.16 1.00\n",
" loc_base[4] -0.05 0.33 -0.05 -0.60 0.49 61402.62 1.00\n",
" loc_coeff[0,0] -0.01 0.12 -0.01 -0.20 0.18 117293.71 1.00\n",
" loc_coeff[0,1] -0.03 0.13 -0.03 -0.25 0.20 97564.62 1.00\n",
" loc_coeff[0,2] 0.18 0.16 0.18 -0.08 0.44 93814.70 1.00\n",
" loc_coeff[1,0] 0.09 0.12 0.09 -0.10 0.28 114478.01 1.00\n",
" loc_coeff[1,1] 0.16 0.13 0.16 -0.06 0.38 99325.51 1.00\n",
" loc_coeff[1,2] -0.39 0.16 -0.39 -0.65 -0.14 96537.19 1.00\n",
" loc_coeff[2,0] -0.14 0.12 -0.15 -0.34 0.05 129498.76 1.00\n",
" loc_coeff[2,1] -0.08 0.14 -0.08 -0.30 0.15 121682.00 1.00\n",
" loc_coeff[2,2] 0.14 0.16 0.14 -0.12 0.40 109642.80 1.00\n",
" loc_coeff[3,0] -0.02 0.13 -0.02 -0.24 0.19 97389.42 1.00\n",
" loc_coeff[3,1] 0.04 0.15 0.04 -0.21 0.28 104280.40 1.00\n",
" loc_coeff[3,2] -0.01 0.17 -0.01 -0.29 0.28 103223.67 1.00\n",
" loc_coeff[4,0] 0.22 0.12 0.22 0.02 0.40 102234.65 1.00\n",
" loc_coeff[4,1] -0.10 0.13 -0.10 -0.32 0.12 112994.22 1.00\n",
" loc_coeff[4,2] 0.17 0.16 0.17 -0.08 0.43 104528.33 1.00\n",
" tau 0.94 0.32 0.89 0.46 1.41 45905.21 1.00\n",
" variances[0] 1.02 0.14 1.00 0.80 1.24 103432.68 1.00\n",
" variances[1] 1.00 0.13 0.99 0.78 1.21 100483.26 1.00\n",
" variances[2] 1.03 0.14 1.02 0.80 1.25 94752.40 1.00\n",
" variances[3] 1.25 0.17 1.24 0.98 1.51 98888.41 1.00\n",
" variances[4] 1.01 0.13 1.00 0.79 1.23 119200.74 1.00\n",
"\n",
"Number of divergences: 0\n"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment