{"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.13"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceId":59156,"databundleVersionId":13874099,"isSourceIdPinned":false,"sourceType":"competition"}],"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":true},"papermill":{"default_parameters":{},"duration":2629.824922,"end_time":"2025-10-28T15:03:29.739803","environment_variables":{},"exception":null,"input_path":"__notebook__.ipynb","output_path":"__notebook__.ipynb","parameters":{},"start_time":"2025-10-28T14:19:39.914881","version":"2.6.0"},"widgets":{"application/vnd.jupyter.widget-state+json":{"state":{"00a9c1f7debd4a8cac0ea02b12c69ca3":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"014ef2449bbd45b892b1a7c084e13dee":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_93c26c113718465fb28ad45da0f039a9","placeholder":"​","style":"IPY_MODEL_9c61542b299747ef82194c493ee42771","tabbable":null,"tooltip":null,"value":" 19/19 [00:30&lt;00:00,  1.57it/s]"}},"06cf6a1d3d314a8d8c02c32129b8ab4c":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"0dfa56bffe504e9f8342c6a7ffb4d25c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"0e274ac89cd048d399bd73de445381bb":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"0ed5351a4f6b4b76bb682a31dd229fd4":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"14fe2e5d56ec499db2db23e7b93adbf7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"15477d31f26f485f8998616fab1b7be6":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_d88061e91ac8459eafea8d7cb085bc7f","placeholder":"​","style":"IPY_MODEL_2845beecb1dd4b7d958042d1dfda0b57","tabbable":null,"tooltip":null,"value":" 634/634 [01:44&lt;00:00,  3.49it/s]"}},"17738bd85d094bd49486ee844dd7bd1d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_4664ded5314743a5ae717aebca9bd4f1","max":42,"min":0,"orientation":"horizontal","style":"IPY_MODEL_523aabe0ece342839f7d0fc125f77256","tabbable":null,"tooltip":null,"value":42}},"183c95d542364bcaa0f773596c9b066b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"185fb820319d4628b892a0ae7b326bbf":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_e956347583c14ff5b683beccde1099cb","max":89,"min":0,"orientation":"horizontal","style":"IPY_MODEL_e6352ba74ca0412ba0bbc15be08829e2","tabbable":null,"tooltip":null,"value":89}},"19459326b9bb4a169731837aece09d7b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"1f7c037faab543d6a9e15bcd3abeb9ce":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2213dd09077c4ec5aa96cf93babf4a7c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_5a90f5b653904eada7e068e8c5b0368f","IPY_MODEL_185fb820319d4628b892a0ae7b326bbf","IPY_MODEL_c4ddaf45f9b04b05addc0673ee92f630"],"layout":"IPY_MODEL_5ec726e379974389b01fda2d63486569","tabbable":null,"tooltip":null}},"25acf3f2d0114063a5fbd78b30513207":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2777c9bfa1164282a420e5c0aad77354":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"27f95c09c7f84c5bba80b70dadce2952":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_2c4a3fc124444d3eb5e19a7810a07c26","IPY_MODEL_52096aaae75e407498a05ad28c30e667","IPY_MODEL_6a5fff1159da4f8eab4fa008af918c87"],"layout":"IPY_MODEL_9f9585adeeb64c39b2db27cce2dc0aaa","tabbable":null,"tooltip":null}},"2845beecb1dd4b7d958042d1dfda0b57":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"29cc91d9a83d40c596a159b29f601a02":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_bea99d5a671d44af9731689fcba22cc2","placeholder":"​","style":"IPY_MODEL_7216429c85b54f199988f7ddfac89986","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"2c4a3fc124444d3eb5e19a7810a07c26":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_402b0f8e9bce4b1c889759f6672924a2","placeholder":"​","style":"IPY_MODEL_19459326b9bb4a169731837aece09d7b","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"324f144490dd4cc0b792dd2a7b36ab97":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"33911deab5ea4418a5e4b94db4f32d72":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"3643a5082b0b437da81dc4478426a948":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"384d1872c1f74c4e945eeb60bc1875d1":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"39359eea7e2341f892179c581d9b96d5":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_704fddb6b6864ceb89114931c7f1bbb8","IPY_MODEL_471c05ea74d24520b0c4773b13f453e9","IPY_MODEL_848cac0c4b4c4020bee704e92f5d77db"],"layout":"IPY_MODEL_33911deab5ea4418a5e4b94db4f32d72","tabbable":null,"tooltip":null}},"402b0f8e9bce4b1c889759f6672924a2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4120adde4f5840c68039c9a2f94529e5":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"42d285cd09aa49629b754f0bcd30e784":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"42e21e687386428197bde78f7f5c9b7a":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4664ded5314743a5ae717aebca9bd4f1":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"46775525a94b4d3a8756d576b05c49a2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"471c05ea74d24520b0c4773b13f453e9":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_06cf6a1d3d314a8d8c02c32129b8ab4c","max":10,"min":0,"orientation":"horizontal","style":"IPY_MODEL_c81a45688588453f83929fdbbcf5b92d","tabbable":null,"tooltip":null,"value":10}},"4950fdce55344c05b0ace803dc95d456":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_76c66c86285c4989934bfffe807331e0","placeholder":"​","style":"IPY_MODEL_fbc6c0459e4b48c1842bb65913d8ba50","tabbable":null,"tooltip":null,"value":" 24/24 [00:06&lt;00:00,  4.05it/s]"}},"4ca0555a88a949fd9e9c0a7759422af2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"4cd0b813da2e4f4b818e95efdb71bc82":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"52096aaae75e407498a05ad28c30e667":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_1f7c037faab543d6a9e15bcd3abeb9ce","max":17,"min":0,"orientation":"horizontal","style":"IPY_MODEL_0e274ac89cd048d399bd73de445381bb","tabbable":null,"tooltip":null,"value":17}},"523aabe0ece342839f7d0fc125f77256":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"570c5a59ac6a4ce4a7c9240951ae58a0":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"59b7b0fcb51847ce8beca6d8833cb966":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"5a90f5b653904eada7e068e8c5b0368f":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_c1991427a1244de382d703da99cd6142","placeholder":"​","style":"IPY_MODEL_e2b6d3caf38e4a7488c47f65755e22b7","tabbable":null,"tooltip":null,"value":"  Processing:  99%"}},"5ec726e379974389b01fda2d63486569":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"6076ef460a4d4a6f92404253fd853dd4":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"6088459defa54bc882df81a3b589a257":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_46775525a94b4d3a8756d576b05c49a2","placeholder":"​","style":"IPY_MODEL_a5ce42d8729740dc8aa9faa8c994265c","tabbable":null,"tooltip":null,"value":" 42/42 [00:10&lt;00:00,  4.20it/s]"}},"6a5fff1159da4f8eab4fa008af918c87":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_d313be11e63e4f56b7e68b35a1654259","placeholder":"​","style":"IPY_MODEL_00a9c1f7debd4a8cac0ea02b12c69ca3","tabbable":null,"tooltip":null,"value":" 17/17 [00:05&lt;00:00,  3.43it/s]"}},"6fafd1bb5837458a8c5a8ffc4a2c7b05":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"704fddb6b6864ceb89114931c7f1bbb8":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_183c95d542364bcaa0f773596c9b066b","placeholder":"​","style":"IPY_MODEL_324f144490dd4cc0b792dd2a7b36ab97","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"714a36f4600d4a90b3962d767d2cb7c8":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7216429c85b54f199988f7ddfac89986":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"73ee1f293a5f4e4b9d84b433882b271d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"7456e23a722a4174adba32f070b94dda":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_89d20446558748e0a892205870c50d31","max":7,"min":0,"orientation":"horizontal","style":"IPY_MODEL_6076ef460a4d4a6f92404253fd853dd4","tabbable":null,"tooltip":null,"value":7}},"76c66c86285c4989934bfffe807331e0":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7d038eb4c7a64f8c942de3348d46f958":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"7f86310b44b8439aa1c3a93183174ec3":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_940ecedbec764309b4e213a3243dae47","placeholder":"​","style":"IPY_MODEL_7d038eb4c7a64f8c942de3348d46f958","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"82732872da3c450d90eb4be16f729344":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"83e711c52f7f4c64b8b73bc680ce973d":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"848cac0c4b4c4020bee704e92f5d77db":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_0ed5351a4f6b4b76bb682a31dd229fd4","placeholder":"​","style":"IPY_MODEL_0dfa56bffe504e9f8342c6a7ffb4d25c","tabbable":null,"tooltip":null,"value":" 10/10 [00:17&lt;00:00,  1.62s/it]"}},"89d20446558748e0a892205870c50d31":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"8a6f95ff0f374807b10cb6f7c2982001":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_fbbe940dce474c2fb997dee82c237887","max":24,"min":0,"orientation":"horizontal","style":"IPY_MODEL_6fafd1bb5837458a8c5a8ffc4a2c7b05","tabbable":null,"tooltip":null,"value":24}},"8d89dd87d9f944fb84a0eae5ac412ce6":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"8dba818be181463ba8bbb5093dc1f642":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"8dbe72cdd91d40b59e6058068ca18312":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_c48bf0e5bd544d36bbdaccadb287fb7b","IPY_MODEL_8a6f95ff0f374807b10cb6f7c2982001","IPY_MODEL_4950fdce55344c05b0ace803dc95d456"],"layout":"IPY_MODEL_3643a5082b0b437da81dc4478426a948","tabbable":null,"tooltip":null}},"8fa0e6a0d9ca427e8696159fca98efd3":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"92170536904f4d6eb39394a500ab91d3":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"939020ac2da741a3a2f4bacb4c7c4c53":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_ba95ad3435774aad9bd46c38a07fa832","placeholder":"​","style":"IPY_MODEL_c0d18cfb6c154be0bf289e61f7b8951e","tabbable":null,"tooltip":null,"value":"  Videos: 100%"}},"93c26c113718465fb28ad45da0f039a9":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"940ecedbec764309b4e213a3243dae47":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"95e70f786cff465a9f7e718cd7537993":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_29cc91d9a83d40c596a159b29f601a02","IPY_MODEL_bd2bb890cca44ccaaaff375a2b63f8ce","IPY_MODEL_014ef2449bbd45b892b1a7c084e13dee"],"layout":"IPY_MODEL_8dba818be181463ba8bbb5093dc1f642","tabbable":null,"tooltip":null}},"9b282ece7ce24e0daeb6ac6bfc439fd2":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_7f86310b44b8439aa1c3a93183174ec3","IPY_MODEL_7456e23a722a4174adba32f070b94dda","IPY_MODEL_b0a38a078332483fbcf896a234758e5e"],"layout":"IPY_MODEL_e794ae7921c7464b852b57199c0ae4a0","tabbable":null,"tooltip":null}},"9b6ac66e00c248fc99808ec3c2bc1b7d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_570c5a59ac6a4ce4a7c9240951ae58a0","placeholder":"​","style":"IPY_MODEL_9ee2bb60912f4661bfd4be0e92f548ce","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"9c61542b299747ef82194c493ee42771":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"9ea07f220ca24a83b35ca395f7ba3807":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_ab915b1292924c758bf8eff3f8b48cc5","placeholder":"​","style":"IPY_MODEL_a684edb8b52b4530a741ae52a6f7c8dd","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"9ee2bb60912f4661bfd4be0e92f548ce":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"9f9585adeeb64c39b2db27cce2dc0aaa":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"9fa641e7cb864a01bdadc235ef3c7dc5":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a1d4edfa3f834ea88034ef997bb219ec":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_9ea07f220ca24a83b35ca395f7ba3807","IPY_MODEL_c2130503bee047348b36db82670bf702","IPY_MODEL_f0d7f98562994aceb5854d183ba3daa6"],"layout":"IPY_MODEL_82732872da3c450d90eb4be16f729344","tabbable":null,"tooltip":null}},"a5ce42d8729740dc8aa9faa8c994265c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"a684edb8b52b4530a741ae52a6f7c8dd":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"ab915b1292924c758bf8eff3f8b48cc5":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"abc8b165916c4d6486e858ab5b0dbea9":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b0a38a078332483fbcf896a234758e5e":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_9fa641e7cb864a01bdadc235ef3c7dc5","placeholder":"​","style":"IPY_MODEL_42d285cd09aa49629b754f0bcd30e784","tabbable":null,"tooltip":null,"value":" 7/7 [00:08&lt;00:00,  1.20s/it]"}},"b88341c276bd4cc88f93dd92d6f08ab7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_9b6ac66e00c248fc99808ec3c2bc1b7d","IPY_MODEL_dbd3d9712a8a43789b60e70f40918ecd","IPY_MODEL_15477d31f26f485f8998616fab1b7be6"],"layout":"IPY_MODEL_4ca0555a88a949fd9e9c0a7759422af2","tabbable":null,"tooltip":null}},"ba95ad3435774aad9bd46c38a07fa832":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"bc05aad601a742be9775d3d585fb3de5":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_92170536904f4d6eb39394a500ab91d3","placeholder":"​","style":"IPY_MODEL_14fe2e5d56ec499db2db23e7b93adbf7","tabbable":null,"tooltip":null,"value":" 1/1 [00:26&lt;00:00, 26.92s/it]"}},"bd2bb890cca44ccaaaff375a2b63f8ce":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_384d1872c1f74c4e945eeb60bc1875d1","max":19,"min":0,"orientation":"horizontal","style":"IPY_MODEL_8d89dd87d9f944fb84a0eae5ac412ce6","tabbable":null,"tooltip":null,"value":19}},"bea99d5a671d44af9731689fcba22cc2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c09f09d9da474c0db435aa6a9d2a2ddd":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c0d18cfb6c154be0bf289e61f7b8951e":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"c1172cedde1d4601b4df165da636c05c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"c1991427a1244de382d703da99cd6142":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c2130503bee047348b36db82670bf702":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_42e21e687386428197bde78f7f5c9b7a","max":21,"min":0,"orientation":"horizontal","style":"IPY_MODEL_dbfeb5ad230e4764adb9684d953ec95d","tabbable":null,"tooltip":null,"value":21}},"c3c87fd189f8406dab9308cf8c49cf7b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_c09f09d9da474c0db435aa6a9d2a2ddd","placeholder":"​","style":"IPY_MODEL_2777c9bfa1164282a420e5c0aad77354","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"c48bf0e5bd544d36bbdaccadb287fb7b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_8fa0e6a0d9ca427e8696159fca98efd3","placeholder":"​","style":"IPY_MODEL_4120adde4f5840c68039c9a2f94529e5","tabbable":null,"tooltip":null,"value":"  Processing: 100%"}},"c4ddaf45f9b04b05addc0673ee92f630":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_d17299adfea74150b576f24aa858b585","placeholder":"​","style":"IPY_MODEL_73ee1f293a5f4e4b9d84b433882b271d","tabbable":null,"tooltip":null,"value":" 88/89 [00:08&lt;00:00, 11.39it/s]"}},"c81a45688588453f83929fdbbcf5b92d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"d17299adfea74150b576f24aa858b585":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d313be11e63e4f56b7e68b35a1654259":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d88061e91ac8459eafea8d7cb085bc7f":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dbd3d9712a8a43789b60e70f40918ecd":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_714a36f4600d4a90b3962d767d2cb7c8","max":634,"min":0,"orientation":"horizontal","style":"IPY_MODEL_fe6890ffa68b4ba281a33321955fd722","tabbable":null,"tooltip":null,"value":634}},"dbfeb5ad230e4764adb9684d953ec95d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e2b6d3caf38e4a7488c47f65755e22b7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"e2cbf46593b24361874f3ddc00656418":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_939020ac2da741a3a2f4bacb4c7c4c53","IPY_MODEL_fb8f27cac4894f5095d9b44c49dc778c","IPY_MODEL_bc05aad601a742be9775d3d585fb3de5"],"layout":"IPY_MODEL_4cd0b813da2e4f4b818e95efdb71bc82","tabbable":null,"tooltip":null}},"e6352ba74ca0412ba0bbc15be08829e2":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e794ae7921c7464b852b57199c0ae4a0":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":"hidden","width":null}},"e956347583c14ff5b683beccde1099cb":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"f0d7f98562994aceb5854d183ba3daa6":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_25acf3f2d0114063a5fbd78b30513207","placeholder":"​","style":"IPY_MODEL_c1172cedde1d4601b4df165da636c05c","tabbable":null,"tooltip":null,"value":" 21/21 [00:06&lt;00:00,  3.50it/s]"}},"fb7c96d773ba4b26b78b7459c2d1c367":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_c3c87fd189f8406dab9308cf8c49cf7b","IPY_MODEL_17738bd85d094bd49486ee844dd7bd1d","IPY_MODEL_6088459defa54bc882df81a3b589a257"],"layout":"IPY_MODEL_83e711c52f7f4c64b8b73bc680ce973d","tabbable":null,"tooltip":null}},"fb8f27cac4894f5095d9b44c49dc778c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"","description":"","description_allow_html":false,"layout":"IPY_MODEL_abc8b165916c4d6486e858ab5b0dbea9","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_59b7b0fcb51847ce8beca6d8833cb966","tabbable":null,"tooltip":null,"value":1}},"fbbe940dce474c2fb997dee82c237887":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fbc6c0459e4b48c1842bb65913d8ba50":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"fe6890ffa68b4ba281a33321955fd722":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}}},"version_major":2,"version_minor":0}}},"nbformat_minor":4,"nbformat":4,"cells":[{"id":"b587003e","cell_type":"markdown","source":"# 1","metadata":{"papermill":{"duration":0.004004,"end_time":"2025-10-28T14:19:43.617801","exception":false,"start_time":"2025-10-28T14:19:43.613797","status":"completed"},"tags":[]}},{"id":"4ff340c8","cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom tqdm.notebook import tqdm\nimport json\nimport os\nimport warnings\nimport gc\nwarnings.filterwarnings('ignore')\n\n# Machine Learning\nimport lightgbm as lgb\nimport xgboost as xgb\nfrom sklearn.model_selection import GroupKFold\nfrom sklearn.metrics import f1_score\nfrom sklearn.utils.class_weight import compute_class_weight\n\nprint(\"✓ Libraries imported\")\n\nclass Config:\n    # Paths\n    DATA_PATH = '/kaggle/input/MABe-mouse-behavior-detection'\n    \n    # Mode\n    MODE = 'submit'\n    VERBOSE = True\n    \n    # Feature Engineering\n    VELOCITY_WINDOWS = [5, 10, 20]\n    ROLLING_WINDOWS = [10, 20]\n    \n    # Model Parameters\n    THRESHOLD = 0.25\n    DOWNSAMPLE = 1.25  # Use 80% of data\n    MIN_SAMPLES_PER_ACTION = 50\n    \n    # LightGBM\n    LGBM_PARAMS = {\n        'objective': 'binary',\n        'metric': 'binary_logloss',\n        'boosting_type': 'gbdt',\n        'num_leaves': 31,\n        'learning_rate': 0.03,\n        'feature_fraction': 0.75,\n        'bagging_fraction': 0.75,\n        'bagging_freq': 4,\n        'min_child_samples': 15,\n        'reg_alpha': 0.1,\n        'reg_lambda': 0.1,\n        'n_estimators': 150,\n        'verbose': -1,\n        'n_jobs': -1,\n        'random_state': 42\n    }\n    \n    # XGBoost\n    XGB_PARAMS = {\n        'objective': 'binary:logistic',\n        'max_depth': 5,\n        'learning_rate': 0.03,\n        'subsample': 0.75,\n        'colsample_bytree': 0.75,\n        'min_child_weight': 3,\n        'reg_alpha': 0.1,\n        'reg_lambda': 1.0,\n        'n_estimators': 150,\n        'verbosity': 0,\n        'n_jobs': -1,\n        'random_state': 42\n    }\n\nconfig = Config()\n\nprint(\"\\n\" + \"=\"*70)\nprint(\"⚡ PHASE 1 CONFIGURATION\")\nprint(\"=\"*70)\nprint(f\"Data path: {config.DATA_PATH}\")\nprint(f\"Mode: {config.MODE}\")\nprint(f\"Downsample: {config.DOWNSAMPLE} → Using {100/config.DOWNSAMPLE:.1f}% of data\")\nprint(f\"Min samples per action: {config.MIN_SAMPLES_PER_ACTION}\")\nprint(\"=\"*70)\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:19:43.625356Z","iopub.status.busy":"2025-10-28T14:19:43.625132Z","iopub.status.idle":"2025-10-28T14:19:51.769039Z","shell.execute_reply":"2025-10-28T14:19:51.768060Z"},"papermill":{"duration":8.149194,"end_time":"2025-10-28T14:19:51.770265","exception":false,"start_time":"2025-10-28T14:19:43.621071","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"6787e1ed","cell_type":"markdown","source":"# 2","metadata":{"papermill":{"duration":0.003016,"end_time":"2025-10-28T14:19:51.776887","exception":false,"start_time":"2025-10-28T14:19:51.773871","status":"completed"},"tags":[]}},{"id":"db36bbe6","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"LOADING DATA\")\nprint(\"=\"*60)\n\ntrain = pd.read_csv(f'{config.DATA_PATH}/train.csv')\ntest = pd.read_csv(f'{config.DATA_PATH}/test.csv')\n\nprint(f\"✓ train.csv loaded: {train.shape}\")\nprint(f\"✓ test.csv loaded: {test.shape}\")\n\n# Filter out MABe22\ntrain_clean = train[~train['lab_id'].str.startswith('MABe22')].reset_index(drop=True)\nprint(f\"✓ Clean training videos: {len(train_clean)}\")\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:19:51.784239Z","iopub.status.busy":"2025-10-28T14:19:51.783775Z","iopub.status.idle":"2025-10-28T14:19:51.923164Z","shell.execute_reply":"2025-10-28T14:19:51.922248Z"},"papermill":{"duration":0.1444,"end_time":"2025-10-28T14:19:51.924401","exception":false,"start_time":"2025-10-28T14:19:51.780001","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"4b3336e8","cell_type":"markdown","source":"# 3\n","metadata":{"papermill":{"duration":0.003096,"end_time":"2025-10-28T14:19:51.930991","exception":false,"start_time":"2025-10-28T14:19:51.927895","status":"completed"},"tags":[]}},{"id":"fc02aaad","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"DEFINING FEATURE ENGINEERING\")\nprint(\"=\"*60)\n\nclass MotionFeatures:\n    @staticmethod\n    def compute_velocity(coords, window=5):\n        velocity = np.zeros(len(coords))\n        if len(coords) > window:\n            velocity[window:] = np.linalg.norm(\n                coords[window:] - coords[:-window], axis=1\n            ) / window\n        return velocity\n    \n    @staticmethod\n    def compute_acceleration(coords, window=5):\n        vel = MotionFeatures.compute_velocity(coords, window)\n        accel = np.zeros_like(vel)\n        if len(vel) > window:\n            accel[window:] = (vel[window:] - vel[:-window]) / window\n        return accel\n\nclass GeometricFeatures:\n    @staticmethod\n    def compute_angle(p1, p2, p3):\n        v1 = p1 - p2\n        v2 = p3 - p2\n        \n        v1_norm = np.linalg.norm(v1, axis=1, keepdims=True) + 1e-8\n        v2_norm = np.linalg.norm(v2, axis=1, keepdims=True) + 1e-8\n        \n        v1 = v1 / v1_norm\n        v2 = v2 / v2_norm\n        \n        cos_angle = np.sum(v1 * v2, axis=1)\n        cos_angle = np.clip(cos_angle, -1.0, 1.0)\n        \n        return np.arccos(cos_angle)\n    \n    @staticmethod\n    def compute_distance(coords1, coords2):\n        return np.sqrt(np.sum((coords1 - coords2)**2, axis=1))\n\ndef extract_single_mouse_features(mouse_df, cfg):\n    features = {}\n    body_parts = mouse_df.columns.get_level_values(0).unique().tolist()\n    \n    # Center (using body_center which exists in data)\n    if 'body_center' in body_parts:\n        center = mouse_df['body_center'].values\n    elif 'center' in body_parts:\n        center = mouse_df['center'].values\n    else:\n        center = mouse_df.values.reshape(len(mouse_df), -1, 2).mean(axis=1)\n    \n    # Position features\n    for part in body_parts[:3]:\n        if part in mouse_df.columns:\n            coords = mouse_df[part].values\n            rel_coords = coords - center\n            features[f'{part}_rel_dist'] = np.linalg.norm(rel_coords, axis=1)\n    \n    # Motion features\n    motion = MotionFeatures()\n    for part in body_parts[:2]:\n        if part in mouse_df.columns:\n            coords = mouse_df[part].values\n            for w in cfg.VELOCITY_WINDOWS:\n                features[f'{part}_vel_{w}'] = motion.compute_velocity(coords, w)\n            features[f'{part}_accel'] = motion.compute_acceleration(coords, 5)\n    \n    # Angles (check for body_center, not spine_middle)\n    geom = GeometricFeatures()\n    if all(p in body_parts for p in ['nose', 'body_center', 'tail_base']):\n        angle = geom.compute_angle(\n            mouse_df['nose'].values,\n            mouse_df['body_center'].values,\n            mouse_df['tail_base'].values\n        )\n        features['body_angle'] = angle\n        angle_vel = motion.compute_velocity(angle.reshape(-1, 1), 5).flatten()\n        features['body_angle_vel'] = angle_vel\n    \n    # Distances\n    key_parts = []\n    for p in ['nose', 'body_center', 'tail_base', 'neck', 'ear_left']:\n        if p in body_parts:\n            key_parts.append(p)\n            if len(key_parts) >= 3:\n                break\n    \n    for i, p1 in enumerate(key_parts):\n        for p2 in key_parts[i+1:]:\n            dist = geom.compute_distance(mouse_df[p1].values, mouse_df[p2].values)\n            features[f'dist_{p1}_{p2}'] = dist\n    \n    features_df = pd.DataFrame(features, index=mouse_df.index)\n    \n    # Rolling aggregations\n    for col in features_df.columns:\n        for w in cfg.ROLLING_WINDOWS:\n            features_df[f'{col}_mean_{w}'] = features_df[col].rolling(\n                window=w, min_periods=1, center=True\n            ).mean()\n    \n    return features_df\n\ndef extract_pair_features(mouse_pair_df, cfg):\n    features = {}\n    \n    mouse_A = mouse_pair_df['A']\n    mouse_B = mouse_pair_df['B']\n    \n    parts_A = mouse_A.columns.get_level_values(0).unique().tolist()\n    parts_B = mouse_B.columns.get_level_values(0).unique().tolist()\n    \n    geom = GeometricFeatures()\n    motion = MotionFeatures()\n    \n    # Inter-mouse distances\n    for pa in ['nose', 'body_center'][:2]:\n        if pa in parts_A:\n            for pb in ['nose', 'body_center'][:2]:\n                if pb in parts_B:\n                    if pa in mouse_A.columns and pb in mouse_B.columns:\n                        dist = geom.compute_distance(mouse_A[pa].values, mouse_B[pb].values)\n                        features[f'dist_{pa}_{pb}'] = dist\n    \n    # Minimum distance\n    all_dists = []\n    for pa in parts_A[:3]:\n        if pa in mouse_A.columns:\n            for pb in parts_B[:3]:\n                if pb in mouse_B.columns:\n                    dist = geom.compute_distance(mouse_A[pa].values, mouse_B[pb].values)\n                    all_dists.append(dist)\n    \n    if all_dists:\n        all_dists = np.array(all_dists).T\n        min_dist = np.min(all_dists, axis=1)\n        features['min_dist'] = min_dist\n        features['mean_dist'] = np.mean(all_dists, axis=1)\n        approach_rate = -np.gradient(min_dist)\n        features['approach_rate'] = approach_rate\n    \n    # Relative motion\n    if 'nose' in parts_A and 'nose' in parts_B:\n        for w in cfg.VELOCITY_WINDOWS[:2]:\n            vel_A = motion.compute_velocity(mouse_A['nose'].values, w)\n            vel_B = motion.compute_velocity(mouse_B['nose'].values, w)\n            features[f'vel_diff_{w}'] = np.abs(vel_A - vel_B)\n    \n    # Orientation\n    if all(p in parts_A for p in ['nose', 'tail_base']) and 'nose' in parts_B:\n        dir_A = mouse_A['nose'].values - mouse_A['tail_base'].values\n        dir_A = dir_A / (np.linalg.norm(dir_A, axis=1, keepdims=True) + 1e-8)\n        \n        to_B = mouse_B['nose'].values - mouse_A['nose'].values\n        to_B = to_B / (np.linalg.norm(to_B, axis=1, keepdims=True) + 1e-8)\n        \n        orientation_A_to_B = np.sum(dir_A * to_B, axis=1)\n        features['A_faces_B'] = orientation_A_to_B\n    \n    features_df = pd.DataFrame(features, index=mouse_pair_df.index)\n    \n    # Rolling aggregations\n    for col in features_df.columns:\n        for w in cfg.ROLLING_WINDOWS:\n            features_df[f'{col}_mean_{w}'] = features_df[col].rolling(\n                window=w, min_periods=1, center=True\n            ).mean()\n    \n    return features_df\n\nprint(\"✓ Feature engineering defined\")","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:19:51.938355Z","iopub.status.busy":"2025-10-28T14:19:51.938132Z","iopub.status.idle":"2025-10-28T14:19:51.956638Z","shell.execute_reply":"2025-10-28T14:19:51.955853Z"},"papermill":{"duration":0.023493,"end_time":"2025-10-28T14:19:51.957618","exception":false,"start_time":"2025-10-28T14:19:51.934125","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"8bc2f130","cell_type":"markdown","source":"# 4","metadata":{"papermill":{"duration":0.002938,"end_time":"2025-10-28T14:19:51.963762","exception":false,"start_time":"2025-10-28T14:19:51.960824","status":"completed"},"tags":[]}},{"id":"07f85725","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"DEFINING VIDEO PROCESSING\")\nprint(\"=\"*60)\n\ndef load_and_pivot_video(lab_id, video_id, traintest='train'):\n    path = f\"{config.DATA_PATH}/{traintest}_tracking/{lab_id}/{video_id}.parquet\"\n    \n    try:\n        vid = pd.read_parquet(path)\n        pvid = vid.pivot(\n            columns=['mouse_id', 'bodypart'],\n            index='video_frame',\n            values=['x', 'y']\n        )\n        pvid = pvid.reorder_levels([1, 2, 0], axis=1).T.sort_index().T\n        return pvid\n    except Exception as e:\n        if config.VERBOSE:\n            print(f\"Error loading {video_id}: {e}\")\n        return None\n\ndef process_video(row, traintest='train'):\n    lab_id = row['lab_id']\n    video_id = row['video_id']\n    \n    if str(lab_id).startswith('MABe22'):\n        return []\n    \n    pvid = load_and_pivot_video(lab_id, video_id, traintest)\n    if pvid is None or len(pvid) == 0:\n        return []\n    \n    pvid = pvid / row['pix_per_cm_approx']\n    \n    try:\n        behaviors = json.loads(row['behaviors_labeled'])\n        behaviors = sorted(list({b.replace(\"'\", \"\") for b in behaviors}))\n        behaviors = [b.split(',') for b in behaviors]\n        behaviors_df = pd.DataFrame(behaviors, columns=['agent', 'target', 'action'])\n    except:\n        return []\n    \n    results = []\n    \n    # Single mouse behaviors\n    single_behaviors = behaviors_df[behaviors_df['target'] == 'self']\n    \n    for mouse_str in single_behaviors['agent'].unique():\n        try:\n            mouse_id = int(mouse_str.replace('mouse', ''))\n            \n            if mouse_id not in pvid.columns.get_level_values(0):\n                continue\n            \n            mouse_data = pvid[mouse_id]\n            features = extract_single_mouse_features(mouse_data, config)\n            \n            if traintest == 'train' and config.DOWNSAMPLE > 1:\n                features = features.iloc[::int(config.DOWNSAMPLE)]\n            \n            meta = pd.DataFrame({\n                'video_id': video_id,\n                'agent_id': mouse_str,\n                'target_id': 'self',\n                'video_frame': features.index\n            })\n            \n            actions = single_behaviors[single_behaviors['agent'] == mouse_str]['action'].unique()\n            \n            if traintest == 'train':\n                annot_path = f\"{config.DATA_PATH}/train_annotation/{lab_id}/{video_id}.parquet\"\n                try:\n                    annot = pd.read_parquet(annot_path)\n                    labels = pd.DataFrame(0, index=features.index, columns=actions)\n                    \n                    annot_sub = annot[(annot['agent_id'] == mouse_id) & (annot['target_id'] == mouse_id)]\n                    for _, arow in annot_sub.iterrows():\n                        if arow['action'] in actions:\n                            start = arow['start_frame']\n                            stop = arow['stop_frame']\n                            mask = (labels.index >= start) & (labels.index <= stop)\n                            labels.loc[mask, arow['action']] = 1\n                    \n                    results.append(('single', features, meta, labels))\n                except:\n                    pass\n            else:\n                results.append(('single', features, meta, actions))\n        except:\n            pass\n    \n    # Pair behaviors\n    pair_behaviors = behaviors_df[behaviors_df['target'] != 'self']\n    \n    if len(pair_behaviors) > 0:\n        available_mice = pvid.columns.get_level_values(0).unique()\n        \n        for agent_id, target_id in [(a, b) for a in available_mice for b in available_mice if a != b]:\n            agent_str = f'mouse{agent_id}'\n            target_str = f'mouse{target_id}'\n            \n            actions = pair_behaviors[\n                (pair_behaviors['agent'] == agent_str) & \n                (pair_behaviors['target'] == target_str)\n            ]['action'].unique()\n            \n            if len(actions) == 0:\n                continue\n            \n            try:\n                mouse_pair = pd.concat([pvid[agent_id], pvid[target_id]], axis=1, keys=['A', 'B'])\n                features = extract_pair_features(mouse_pair, config)\n                \n                if traintest == 'train' and config.DOWNSAMPLE > 1:\n                    features = features.iloc[::int(config.DOWNSAMPLE)]\n                \n                meta = pd.DataFrame({\n                    'video_id': video_id,\n                    'agent_id': agent_str,\n                    'target_id': target_str,\n                    'video_frame': features.index\n                })\n                \n                if traintest == 'train':\n                    annot_path = f\"{config.DATA_PATH}/train_annotation/{lab_id}/{video_id}.parquet\"\n                    try:\n                        annot = pd.read_parquet(annot_path)\n                        labels = pd.DataFrame(0, index=features.index, columns=actions)\n                        \n                        annot_sub = annot[(annot['agent_id'] == agent_id) & (annot['target_id'] == target_id)]\n                        for _, arow in annot_sub.iterrows():\n                            if arow['action'] in actions:\n                                start = arow['start_frame']\n                                stop = arow['stop_frame']\n                                mask = (labels.index >= start) & (labels.index <= stop)\n                                labels.loc[mask, arow['action']] = 1\n                        \n                        results.append(('pair', features, meta, labels))\n                    except:\n                        pass\n                else:\n                    results.append(('pair', features, meta, actions))\n            except:\n                pass\n    \n    return results\n\nprint(\"✓ Video processing defined\")\n\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:19:51.970935Z","iopub.status.busy":"2025-10-28T14:19:51.970739Z","iopub.status.idle":"2025-10-28T14:19:51.986391Z","shell.execute_reply":"2025-10-28T14:19:51.985790Z"},"papermill":{"duration":0.020574,"end_time":"2025-10-28T14:19:51.987398","exception":false,"start_time":"2025-10-28T14:19:51.966824","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"f5afb54a","cell_type":"markdown","source":"# 5","metadata":{"papermill":{"duration":0.003012,"end_time":"2025-10-28T14:19:51.993772","exception":false,"start_time":"2025-10-28T14:19:51.990760","status":"completed"},"tags":[]}},{"id":"7f25379e","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"PROCESSING TRAINING DATA\")\nprint(\"=\"*60)\n\nbody_parts_groups = train_clean['body_parts_tracked'].unique()\nprint(f\"Found {len(body_parts_groups)} body part configurations\")\n\ntrain_data = {}\n\nfor bp_idx, bp_str in enumerate(body_parts_groups):\n    print(f\"\\n[{bp_idx+1}/{len(body_parts_groups)}] Processing: {bp_str[:60]}...\")\n    \n    subset = train_clean[train_clean['body_parts_tracked'] == bp_str]\n    print(f\"  Videos: {len(subset)}\")\n    \n    single_data = {'features': [], 'meta': [], 'labels': []}\n    pair_data = {'features': [], 'meta': [], 'labels': []}\n    \n    for _, row in tqdm(subset.iterrows(), total=len(subset), desc=\"  Processing\", leave=False):\n        results = process_video(row, 'train')\n        \n        for switch, feats, meta, labels in results:\n            if switch == 'single':\n                single_data['features'].append(feats)\n                single_data['meta'].append(meta)\n                single_data['labels'].append(labels)\n            else:\n                pair_data['features'].append(feats)\n                pair_data['meta'].append(meta)\n                pair_data['labels'].append(labels)\n    \n    train_data[bp_str] = {\n        'single': single_data,\n        'pair': pair_data\n    }\n    \n    print(f\"  ✓ Single batches: {len(single_data['features'])}\")\n    print(f\"  ✓ Pair batches: {len(pair_data['features'])}\")\n    \n    gc.collect()\n\nprint(f\"\\n✓ All training data processed!\")\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:19:52.001137Z","iopub.status.busy":"2025-10-28T14:19:52.000622Z","iopub.status.idle":"2025-10-28T14:23:10.628447Z","shell.execute_reply":"2025-10-28T14:23:10.627581Z"},"papermill":{"duration":198.632785,"end_time":"2025-10-28T14:23:10.629686","exception":false,"start_time":"2025-10-28T14:19:51.996901","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"3a734fd4","cell_type":"markdown","source":"# 6","metadata":{"papermill":{"duration":0.004273,"end_time":"2025-10-28T14:23:10.638690","exception":false,"start_time":"2025-10-28T14:23:10.634417","status":"completed"},"tags":[]}},{"id":"59126810","cell_type":"code","source":"# Diagnostic cell - add this as a new cell\nprint(\"\\n\" + \"=\"*60)\nprint(\"DIAGNOSTIC REPORT\")\nprint(\"=\"*60)\n\ntotal_single_batches = sum(len(data['single']['features']) for data in train_data.values())\ntotal_pair_batches = sum(len(data['pair']['features']) for data in train_data.values())\n\nprint(f\"Total single batches: {total_single_batches}\")\nprint(f\"Total pair batches: {total_pair_batches}\")\n\nif total_single_batches == 0 and total_pair_batches == 0:\n    print(\"❌ CRITICAL: No data processed! Feature extraction failed!\")\nelse:\n    print(\"✓ Data processed successfully\")","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:23:10.648141Z","iopub.status.busy":"2025-10-28T14:23:10.647903Z","iopub.status.idle":"2025-10-28T14:23:10.653288Z","shell.execute_reply":"2025-10-28T14:23:10.652584Z"},"papermill":{"duration":0.011458,"end_time":"2025-10-28T14:23:10.654325","exception":false,"start_time":"2025-10-28T14:23:10.642867","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"32489ffe","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"TRAINING MODELS\")\nprint(\"=\"*60)\n\ntrained_models = {}\n\nfor bp_idx, (bp_str, data) in enumerate(train_data.items()):\n    print(f\"\\n[{bp_idx+1}/{len(train_data)}] Training for: {bp_str[:60]}...\")\n    \n    # Single mouse\n    if len(data['single']['features']) > 0:\n        print(\"\\n  [SINGLE MOUSE]\")\n        \n        X = pd.concat(data['single']['features'], ignore_index=True)\n        meta = pd.concat(data['single']['meta'], ignore_index=True)\n        labels = pd.concat(data['single']['labels'], ignore_index=True)\n        \n        print(f\"    Shape: {X.shape}\")\n        print(f\"    Actions: {list(labels.columns)}\")\n        \n        single_models = {}\n        \n        for action in labels.columns:\n            mask = ~labels[action].isna()\n            \n            if mask.sum() < config.MIN_SAMPLES_PER_ACTION:\n                continue\n            \n            X_action = X[mask].fillna(0).values\n            y_action = labels[action][mask].astype(int).values\n            \n            pos_rate = y_action.mean()\n            \n            model_lgbm = lgb.LGBMClassifier(**config.LGBM_PARAMS)\n            model_lgbm.fit(X_action, y_action)\n            \n            model_xgb = xgb.XGBClassifier(**config.XGB_PARAMS)\n            model_xgb.fit(X_action, y_action)\n            \n            single_models[action] = {\n                'lgbm': model_lgbm,\n                'xgb': model_xgb\n            }\n            \n            print(f\"      ✓ {action}: {mask.sum():,} samples, {pos_rate:.3f} pos\")\n        \n        if len(single_models) > 0:\n            trained_models[f'{bp_str}__single'] = single_models\n        \n        del X, meta, labels\n        gc.collect()\n    \n    # Pair\n    if len(data['pair']['features']) > 0:\n        print(\"\\n  [MOUSE PAIRS]\")\n        \n        X = pd.concat(data['pair']['features'], ignore_index=True)\n        meta = pd.concat(data['pair']['meta'], ignore_index=True)\n        labels = pd.concat(data['pair']['labels'], ignore_index=True)\n        \n        print(f\"    Shape: {X.shape}\")\n        print(f\"    Actions: {list(labels.columns)}\")\n        \n        pair_models = {}\n        \n        for action in labels.columns:\n            mask = ~labels[action].isna()\n            \n            if mask.sum() < config.MIN_SAMPLES_PER_ACTION:\n                continue\n            \n            X_action = X[mask].fillna(0).values\n            y_action = labels[action][mask].astype(int).values\n            \n            pos_rate = y_action.mean()\n            \n            model_lgbm = lgb.LGBMClassifier(**config.LGBM_PARAMS)\n            model_lgbm.fit(X_action, y_action)\n            \n            model_xgb = xgb.XGBClassifier(**config.XGB_PARAMS)\n            model_xgb.fit(X_action, y_action)\n            \n            pair_models[action] = {\n                'lgbm': model_lgbm,\n                'xgb': model_xgb\n            }\n            \n            print(f\"      ✓ {action}: {mask.sum():,} samples, {pos_rate:.3f} pos\")\n        \n        if len(pair_models) > 0:\n            trained_models[f'{bp_str}__pair'] = pair_models\n        \n        del X, meta, labels\n        gc.collect()\n\nprint(f\"\\n{'='*60}\")\nprint(f\"TRAINING COMPLETE!\")\nprint(f\"{'='*60}\")\nprint(f\"Total model groups: {len(trained_models)}\")\n\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T14:23:10.663966Z","iopub.status.busy":"2025-10-28T14:23:10.663753Z","iopub.status.idle":"2025-10-28T15:03:00.396347Z","shell.execute_reply":"2025-10-28T15:03:00.395695Z"},"papermill":{"duration":2389.738885,"end_time":"2025-10-28T15:03:00.397565","exception":false,"start_time":"2025-10-28T14:23:10.658680","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"4906a73a","cell_type":"markdown","source":"# 7","metadata":{"papermill":{"duration":0.008137,"end_time":"2025-10-28T15:03:00.414665","exception":false,"start_time":"2025-10-28T15:03:00.406528","status":"completed"},"tags":[]}},{"id":"2fb203da","cell_type":"code","source":"def predict_multiclass(preds_df, meta_df, threshold=0.15):\n    if len(preds_df.columns) == 0:\n        return pd.DataFrame(columns=['video_id', 'agent_id', 'target_id', 'action', 'start_frame', 'stop_frame'])\n    \n    action_idx_list = []\n    \n    for frame_idx in range(len(preds_df)):\n        max_prob = 0\n        max_action_idx = -1\n        \n        for action_idx, action in enumerate(preds_df.columns):\n            prob = preds_df.iloc[frame_idx, action_idx]\n            \n            if prob >= threshold and prob > max_prob:\n                max_prob = prob\n                max_action_idx = action_idx\n        \n        action_idx_list.append(max_action_idx)\n    \n    action_series = pd.Series(action_idx_list, index=meta_df['video_frame'].values)\n    \n    changes = (action_series != action_series.shift(1))\n    change_frames = action_series[changes]\n    change_meta = meta_df[changes.values].reset_index(drop=True)\n    \n    submissions = []\n    \n    for i in range(len(change_frames) - 1):\n        action_idx = change_frames.iloc[i]\n        \n        if action_idx >= 0:\n            video_id = change_meta.iloc[i]['video_id']\n            agent_id = change_meta.iloc[i]['agent_id']\n            target_id = change_meta.iloc[i]['target_id']\n            action = preds_df.columns[action_idx]\n            start_frame = change_frames.index[i]\n            \n            next_video = change_meta.iloc[i + 1]['video_id']\n            next_agent = change_meta.iloc[i + 1]['agent_id']\n            next_target = change_meta.iloc[i + 1]['target_id']\n            \n            if video_id == next_video and agent_id == next_agent and target_id == next_target:\n                stop_frame = change_frames.index[i + 1]\n            else:\n                stop_frame = meta_df[meta_df['video_id'] == video_id]['video_frame'].max() + 1\n            \n            submissions.append({\n                'video_id': video_id,\n                'agent_id': agent_id,\n                'target_id': target_id,\n                'action': action,\n                'start_frame': start_frame,\n                'stop_frame': stop_frame\n            })\n    \n    return pd.DataFrame(submissions)\n\nprint(\"✓ Prediction function defined\")","metadata":{"execution":{"iopub.execute_input":"2025-10-28T15:03:00.432228Z","iopub.status.busy":"2025-10-28T15:03:00.431998Z","iopub.status.idle":"2025-10-28T15:03:00.440336Z","shell.execute_reply":"2025-10-28T15:03:00.439756Z"},"papermill":{"duration":0.018568,"end_time":"2025-10-28T15:03:00.441353","exception":false,"start_time":"2025-10-28T15:03:00.422785","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"df921a18","cell_type":"markdown","source":"# 8","metadata":{"papermill":{"duration":0.007986,"end_time":"2025-10-28T15:03:00.457729","exception":false,"start_time":"2025-10-28T15:03:00.449743","status":"completed"},"tags":[]}},{"id":"4dd48a1d","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"MAKING PREDICTIONS\")\nprint(\"=\"*60)\n\nif config.MODE == 'submit':\n    dataset = test\nelse:\n    val_split = int(len(train_clean) * 0.8)\n    dataset = train_clean.iloc[val_split:]\n\nall_predictions = []\n\nbody_parts_groups = dataset['body_parts_tracked'].unique()\n\nfor bp_idx, bp_str in enumerate(body_parts_groups):\n    print(f\"\\n[{bp_idx+1}/{len(body_parts_groups)}] Predicting: {bp_str[:60]}...\")\n    \n    subset = dataset[dataset['body_parts_tracked'] == bp_str]\n    print(f\"  Videos: {len(subset)}\")\n    \n    single_model_key = f'{bp_str}__single'\n    pair_model_key = f'{bp_str}__pair'\n    \n    has_single = single_model_key in trained_models\n    has_pair = pair_model_key in trained_models\n    \n    if not has_single and not has_pair:\n        print(f\"  ⚠️  No trained models\")\n        continue\n    \n    for _, row in tqdm(subset.iterrows(), total=len(subset), desc=\"  Videos\", leave=False):\n        \n        if config.MODE == 'submit':\n            results = process_video(row, 'test')\n        else:\n            results = process_video(row, 'train')\n        \n        for switch, features, meta, actions_or_labels in results:\n            \n            if config.MODE == 'submit':\n                actions = actions_or_labels\n            else:\n                actions = actions_or_labels.columns.tolist()\n            \n            if switch == 'single' and has_single:\n                models = trained_models[single_model_key]\n            elif switch == 'pair' and has_pair:\n                models = trained_models[pair_model_key]\n            else:\n                continue\n            \n            predictions = pd.DataFrame(index=features.index)\n            \n            for action in actions:\n                if action in models:\n                    X = features.fillna(0).values\n                    \n                    try:\n                        pred_lgbm = models[action]['lgbm'].predict_proba(X)[:, 1]\n                    except:\n                        pred_lgbm = np.zeros(len(X))\n                    \n                    try:\n                        pred_xgb = models[action]['xgb'].predict_proba(X)[:, 1]\n                    except:\n                        pred_xgb = np.zeros(len(X))\n                    \n                    predictions[action] = 0.5 * pred_lgbm + 0.5 * pred_xgb\n            \n            if len(predictions.columns) > 0:\n                submission_part = predict_multiclass(predictions, meta, config.THRESHOLD)\n                all_predictions.append(submission_part)\n    \n    print(f\"  ✓ Predictions: {sum(len(p) for p in all_predictions)}\")\n\nif len(all_predictions) > 0:\n    submission = pd.concat(all_predictions, ignore_index=True)\nelse:\n    submission = pd.DataFrame(columns=['video_id', 'agent_id', 'target_id', 'action', 'start_frame', 'stop_frame'])\n\nprint(f\"\\n✓ Total predictions: {len(submission)}\")\n","metadata":{"execution":{"iopub.execute_input":"2025-10-28T15:03:00.475195Z","iopub.status.busy":"2025-10-28T15:03:00.474782Z","iopub.status.idle":"2025-10-28T15:03:27.407812Z","shell.execute_reply":"2025-10-28T15:03:27.406944Z"},"papermill":{"duration":26.943122,"end_time":"2025-10-28T15:03:27.409046","exception":false,"start_time":"2025-10-28T15:03:00.465924","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"ca94ca98","cell_type":"markdown","source":"# 9","metadata":{"papermill":{"duration":0.008222,"end_time":"2025-10-28T15:03:27.426205","exception":false,"start_time":"2025-10-28T15:03:27.417983","status":"completed"},"tags":[]}},{"id":"ab3376fc","cell_type":"code","source":"print(\"\\n\" + \"=\"*60)\nprint(\"POST-PROCESSING & SAVING\")\nprint(\"=\"*60)\n\n# Remove invalid\noriginal_len = len(submission)\nsubmission = submission[submission['start_frame'] < submission['stop_frame']]\nprint(f\"✓ Removed {original_len - len(submission)} invalid predictions\")\n\n# Remove overlaps\ncleaned = []\nfor key, group in submission.groupby(['video_id', 'agent_id', 'target_id']):\n    group = group.sort_values('start_frame').reset_index(drop=True)\n    \n    keep = []\n    last_stop = -1\n    \n    for idx, row in group.iterrows():\n        if row['start_frame'] >= last_stop:\n            keep.append(idx)\n            last_stop = row['stop_frame']\n    \n    cleaned.append(group.loc[keep])\n\nsubmission = pd.concat(cleaned, ignore_index=True)\nprint(f\"✓ After deduplication: {len(submission)} predictions\")\n\n# Fill missing videos\npredicted_videos = set(submission['video_id'].unique())\nall_videos = set(dataset['video_id'].unique())\nmissing_videos = all_videos - predicted_videos\n\nif len(missing_videos) > 0:\n    print(f\"⚠️  Filling {len(missing_videos)} videos with no predictions\")\n    \n    dummy_preds = []\n    for video_id in missing_videos:\n        row = dataset[dataset['video_id'] == video_id].iloc[0]\n        \n        try:\n            behaviors = json.loads(row['behaviors_labeled'])\n            if len(behaviors) > 0:\n                first_behavior = behaviors[0].replace(\"'\", \"\").split(',')\n                dummy_preds.append({\n                    'video_id': video_id,\n                    'agent_id': first_behavior[0],\n                    'target_id': first_behavior[1],\n                    'action': first_behavior[2],\n                    'start_frame': 0,\n                    'stop_frame': 100\n                })\n        except:\n            pass\n    \n    if dummy_preds:\n        dummy_df = pd.DataFrame(dummy_preds)\n        submission = pd.concat([submission, dummy_df], ignore_index=True)\n\nprint(f\"✓ Final submission: {len(submission)} predictions\")\n\n# Save\nsubmission = submission.reset_index(drop=True)\nsubmission.index.name = 'row_id'\nsubmission.to_csv('submission.csv')\n\nprint(\"\\n✓ Saved to submission.csv\")\nprint(f\"\\nSubmission shape: {submission.shape}\")\nprint(f\"Videos covered: {submission['video_id'].nunique()} / {len(dataset)}\")\n\nprint(\"\\n\" + \"=\"*70)","metadata":{"execution":{"iopub.execute_input":"2025-10-28T15:03:27.444212Z","iopub.status.busy":"2025-10-28T15:03:27.443604Z","iopub.status.idle":"2025-10-28T15:03:27.506561Z","shell.execute_reply":"2025-10-28T15:03:27.505834Z"},"papermill":{"duration":0.073334,"end_time":"2025-10-28T15:03:27.507753","exception":false,"start_time":"2025-10-28T15:03:27.434419","status":"completed"},"tags":[]},"outputs":[],"execution_count":null}]}