Created
December 30, 2022 23:24
-
-
Save ngupta23/8bd712f65d8f70630967aec6dde4266f to your computer and use it in GitHub Desktop.
pycaret_issue_custom_metric.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"authorship_tag": "ABX9TyPCpOmVzb3obqBr216ur1C9", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"a1f663739a584515b77d5a0021ac1112": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HBoxModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_798347ee149f4e87a1222ea615ae1796", | |
"IPY_MODEL_1e4f52eb43704e659de98c0b8e5592fa", | |
"IPY_MODEL_6d5e87d392574da188542f87d9ce44b7" | |
], | |
"layout": "IPY_MODEL_60d2d8a8bb2b403ab1f3769a8d592831" | |
} | |
}, | |
"798347ee149f4e87a1222ea615ae1796": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_5186e5117bd048a5ba722a102c801eb5", | |
"placeholder": "", | |
"style": "IPY_MODEL_8ffabd38dda54e32bb831337972cb9d9", | |
"value": "Processing: 100%" | |
} | |
}, | |
"1e4f52eb43704e659de98c0b8e5592fa": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "FloatProgressModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "FloatProgressModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "ProgressView", | |
"bar_style": "", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_0a8c2e06702d4ae48e05239b338b07fe", | |
"max": 61, | |
"min": 0, | |
"orientation": "horizontal", | |
"style": "IPY_MODEL_a1bfebf8d77b48cf81886ac3d129ef46", | |
"value": 61 | |
} | |
}, | |
"6d5e87d392574da188542f87d9ce44b7": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_798e541c75d247d18998916c06c1ca48", | |
"placeholder": "", | |
"style": "IPY_MODEL_12047c584b3b4a7c8d2c0ae08a0353b8", | |
"value": " 61/61 [02:04<00:00, 1.35s/it]" | |
} | |
}, | |
"60d2d8a8bb2b403ab1f3769a8d592831": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": "hidden", | |
"width": null | |
} | |
}, | |
"5186e5117bd048a5ba722a102c801eb5": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"8ffabd38dda54e32bb831337972cb9d9": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"0a8c2e06702d4ae48e05239b338b07fe": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"a1bfebf8d77b48cf81886ac3d129ef46": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "ProgressStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "ProgressStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"bar_color": null, | |
"description_width": "" | |
} | |
}, | |
"798e541c75d247d18998916c06c1ca48": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"12047c584b3b4a7c8d2c0ae08a0353b8": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"3783b94292274cf89f942f27877077d5": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HBoxModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_1fc967e584e04c2cb8a4b9f5ebf4232c", | |
"IPY_MODEL_7959d744e63947a68db0e89b2259507c", | |
"IPY_MODEL_15fdc29e905a4bdcbcf99bb15c0666b1" | |
], | |
"layout": "IPY_MODEL_8cd39821783548178e30123aaa20a678" | |
} | |
}, | |
"1fc967e584e04c2cb8a4b9f5ebf4232c": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_f94ad0b3b152446897f44551e8df0756", | |
"placeholder": "", | |
"style": "IPY_MODEL_6be4de66a42f4111bfbc336b1ebb9a12", | |
"value": "Processing: 100%" | |
} | |
}, | |
"7959d744e63947a68db0e89b2259507c": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "FloatProgressModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "FloatProgressModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "ProgressView", | |
"bar_style": "", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_52b5ab48cb744c4b85f1a436ede80751", | |
"max": 61, | |
"min": 0, | |
"orientation": "horizontal", | |
"style": "IPY_MODEL_11a4b1fe8b7e454a871ea0c4fd0c2ff4", | |
"value": 61 | |
} | |
}, | |
"15fdc29e905a4bdcbcf99bb15c0666b1": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_eec05212cb44449ea702dde77baaf3fe", | |
"placeholder": "", | |
"style": "IPY_MODEL_b634f3588ae343ddb0805d4740add8f2", | |
"value": " 61/61 [01:44<00:00, 1.14s/it]" | |
} | |
}, | |
"8cd39821783548178e30123aaa20a678": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": "hidden", | |
"width": null | |
} | |
}, | |
"f94ad0b3b152446897f44551e8df0756": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"6be4de66a42f4111bfbc336b1ebb9a12": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"52b5ab48cb744c4b85f1a436ede80751": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"11a4b1fe8b7e454a871ea0c4fd0c2ff4": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "ProgressStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "ProgressStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"bar_color": null, | |
"description_width": "" | |
} | |
}, | |
"eec05212cb44449ea702dde77baaf3fe": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"b634f3588ae343ddb0805d4740add8f2": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
} | |
} | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/ngupta23/8bd712f65d8f70630967aec6dde4266f/pycaret_issue_custom_metric.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "roq88h2nUx3I", | |
"outputId": "2484e99a-4998-483c-fccd-e696e4b89326" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", | |
"Requirement already satisfied: pycaret in /usr/local/lib/python3.8/dist-packages (3.0.0rc6)\n", | |
"Requirement already satisfied: plotly>=5.0.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (5.5.0)\n", | |
"Requirement already satisfied: markupsafe>=2.0.1 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.0.1)\n", | |
"Requirement already satisfied: tbats>=1.1.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.1.2)\n", | |
"Requirement already satisfied: scipy<2.0.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.7.3)\n", | |
"Requirement already satisfied: ipython>=5.5.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (7.9.0)\n", | |
"Requirement already satisfied: jinja2>=1.2 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.11.3)\n", | |
"Requirement already satisfied: statsmodels>=0.12.1 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.13.5)\n", | |
"Requirement already satisfied: imbalanced-learn>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.8.1)\n", | |
"Requirement already satisfied: importlib-metadata>=4.12.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (5.1.0)\n", | |
"Requirement already satisfied: yellowbrick>=1.4 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.5)\n", | |
"Requirement already satisfied: pandas<1.6.0,>=1.3.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.3.5)\n", | |
"Requirement already satisfied: cloudpickle in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.5.0)\n", | |
"Requirement already satisfied: scikit-learn>=1.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.0.2)\n", | |
"Requirement already satisfied: schemdraw>=0.14 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.15)\n", | |
"Requirement already satisfied: psutil>=5.9.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (5.9.4)\n", | |
"Requirement already satisfied: pmdarima!=1.8.1,<3.0.0,>=1.8.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.0.2)\n", | |
"Requirement already satisfied: matplotlib>=3.3.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (3.6.2)\n", | |
"Requirement already satisfied: sktime<0.15.0,>=0.14.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.14.1)\n", | |
"Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (5.7.0)\n", | |
"Requirement already satisfied: scikit-plot>=0.3.7 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.3.7)\n", | |
"Requirement already satisfied: joblib>=1.2.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.2.0)\n", | |
"Requirement already satisfied: plotly-resampler>=0.7.2.2 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.8.4rc1)\n", | |
"Requirement already satisfied: lightgbm>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (3.3.3)\n", | |
"Requirement already satisfied: category-encoders>=2.4.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.5.1.post0)\n", | |
"Requirement already satisfied: ipywidgets>=7.6.5 in /usr/local/lib/python3.8/dist-packages (from pycaret) (7.7.1)\n", | |
"Requirement already satisfied: pyod>=0.9.8 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.0.7)\n", | |
"Requirement already satisfied: requests>=2.27.1 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.28.1)\n", | |
"Requirement already satisfied: tqdm>=4.62.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (4.64.1)\n", | |
"Requirement already satisfied: numpy<1.23,>=1.21 in /usr/local/lib/python3.8/dist-packages (from pycaret) (1.21.6)\n", | |
"Requirement already satisfied: numba>=0.55.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.56.4)\n", | |
"Requirement already satisfied: deprecation>=2.1.0 in /usr/local/lib/python3.8/dist-packages (from pycaret) (2.1.0)\n", | |
"Requirement already satisfied: kaleido>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from pycaret) (0.2.1)\n", | |
"Requirement already satisfied: patsy>=0.5.1 in /usr/local/lib/python3.8/dist-packages (from category-encoders>=2.4.0->pycaret) (0.5.3)\n", | |
"Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from deprecation>=2.1.0->pycaret) (21.3)\n", | |
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata>=4.12.0->pycaret) (3.11.0)\n", | |
"Requirement already satisfied: pickleshare in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (0.7.5)\n", | |
"Requirement already satisfied: backcall in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (0.2.0)\n", | |
"Requirement already satisfied: pexpect in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (4.8.0)\n", | |
"Requirement already satisfied: pygments in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (2.6.1)\n", | |
"Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (2.0.10)\n", | |
"Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (4.4.2)\n", | |
"Requirement already satisfied: jedi>=0.10 in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (0.18.2)\n", | |
"Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (5.7.1)\n", | |
"Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.8/dist-packages (from ipython>=5.5.0->pycaret) (57.4.0)\n", | |
"Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets>=7.6.5->pycaret) (3.0.4)\n", | |
"Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.8/dist-packages (from ipywidgets>=7.6.5->pycaret) (5.3.4)\n", | |
"Requirement already satisfied: widgetsnbextension~=3.6.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets>=7.6.5->pycaret) (3.6.1)\n", | |
"Requirement already satisfied: ipython-genutils~=0.2.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets>=7.6.5->pycaret) (0.2.0)\n", | |
"Requirement already satisfied: jupyter-client in /usr/local/lib/python3.8/dist-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->pycaret) (6.1.12)\n", | |
"Requirement already satisfied: tornado>=4.2 in /usr/local/lib/python3.8/dist-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->pycaret) (6.0.4)\n", | |
"Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.8/dist-packages (from jedi>=0.10->ipython>=5.5.0->pycaret) (0.8.3)\n", | |
"Requirement already satisfied: wheel in /usr/local/lib/python3.8/dist-packages (from lightgbm>=3.0.0->pycaret) (0.38.4)\n", | |
"Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (3.0.9)\n", | |
"Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (1.0.6)\n", | |
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (0.11.0)\n", | |
"Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (7.1.2)\n", | |
"Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (2.8.2)\n", | |
"Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (4.38.0)\n", | |
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.3.0->pycaret) (1.4.4)\n", | |
"Requirement already satisfied: fastjsonschema in /usr/local/lib/python3.8/dist-packages (from nbformat>=4.2.0->pycaret) (2.16.2)\n", | |
"Requirement already satisfied: jupyter-core in /usr/local/lib/python3.8/dist-packages (from nbformat>=4.2.0->pycaret) (5.1.0)\n", | |
"Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.8/dist-packages (from nbformat>=4.2.0->pycaret) (4.3.3)\n", | |
"Requirement already satisfied: importlib-resources>=1.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat>=4.2.0->pycaret) (5.10.1)\n", | |
"Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat>=4.2.0->pycaret) (22.1.0)\n", | |
"Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat>=4.2.0->pycaret) (0.19.2)\n", | |
"Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.8/dist-packages (from numba>=0.55.0->pycaret) (0.39.1)\n", | |
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas<1.6.0,>=1.3.0->pycaret) (2022.6)\n", | |
"Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from patsy>=0.5.1->category-encoders>=2.4.0->pycaret) (1.15.0)\n", | |
"Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.8/dist-packages (from plotly>=5.0.0->pycaret) (8.1.0)\n", | |
"Requirement already satisfied: Werkzeug<=2.1.2 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (1.0.1)\n", | |
"Requirement already satisfied: trace-updater>=0.0.8 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (0.0.9)\n", | |
"Requirement already satisfied: dash<3.0.0,>=2.2.0 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (2.7.1)\n", | |
"Requirement already satisfied: orjson<4.0.0,>=3.8.0 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (3.8.3)\n", | |
"Requirement already satisfied: Flask-Cors<4.0.0,>=3.0.10 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (3.0.10)\n", | |
"Requirement already satisfied: jupyter-dash>=0.4.2 in /usr/local/lib/python3.8/dist-packages (from plotly-resampler>=0.7.2.2->pycaret) (0.4.2)\n", | |
"Requirement already satisfied: Flask>=1.0.4 in /usr/local/lib/python3.8/dist-packages (from dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (1.1.4)\n", | |
"Requirement already satisfied: dash-core-components==2.0.0 in /usr/local/lib/python3.8/dist-packages (from dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (2.0.0)\n", | |
"Requirement already satisfied: dash-html-components==2.0.0 in /usr/local/lib/python3.8/dist-packages (from dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (2.0.0)\n", | |
"Requirement already satisfied: dash-table==5.0.0 in /usr/local/lib/python3.8/dist-packages (from dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (5.0.0)\n", | |
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.8/dist-packages (from Flask>=1.0.4->dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (1.1.0)\n", | |
"Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.8/dist-packages (from Flask>=1.0.4->dash<3.0.0,>=2.2.0->plotly-resampler>=0.7.2.2->pycaret) (7.1.2)\n", | |
"Requirement already satisfied: ansi2html in /usr/local/lib/python3.8/dist-packages (from jupyter-dash>=0.4.2->plotly-resampler>=0.7.2.2->pycaret) (1.8.0)\n", | |
"Requirement already satisfied: retrying in /usr/local/lib/python3.8/dist-packages (from jupyter-dash>=0.4.2->plotly-resampler>=0.7.2.2->pycaret) (1.3.4)\n", | |
"Requirement already satisfied: nest-asyncio in /usr/local/lib/python3.8/dist-packages (from jupyter-dash>=0.4.2->plotly-resampler>=0.7.2.2->pycaret) (1.5.6)\n", | |
"Requirement already satisfied: Cython!=0.29.18,!=0.29.31,>=0.29 in /usr/local/lib/python3.8/dist-packages (from pmdarima!=1.8.1,<3.0.0,>=1.8.0->pycaret) (0.29.32)\n", | |
"Requirement already satisfied: urllib3 in /usr/local/lib/python3.8/dist-packages (from pmdarima!=1.8.1,<3.0.0,>=1.8.0->pycaret) (1.24.3)\n", | |
"Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/dist-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=5.5.0->pycaret) (0.2.5)\n", | |
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=2.27.1->pycaret) (2022.12.7)\n", | |
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.27.1->pycaret) (2.10)\n", | |
"Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.8/dist-packages (from requests>=2.27.1->pycaret) (2.1.1)\n", | |
"Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=1.0->pycaret) (3.1.0)\n", | |
"Requirement already satisfied: deprecated>=1.2.13 in /usr/local/lib/python3.8/dist-packages (from sktime<0.15.0,>=0.14.0->pycaret) (1.2.13)\n", | |
"Requirement already satisfied: wrapt<2,>=1.10 in /usr/local/lib/python3.8/dist-packages (from deprecated>=1.2.13->sktime<0.15.0,>=0.14.0->pycaret) (1.14.1)\n", | |
"Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.8/dist-packages (from widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (5.7.16)\n", | |
"Requirement already satisfied: pyzmq>=17 in /usr/local/lib/python3.8/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (23.2.1)\n", | |
"Requirement already satisfied: Send2Trash in /usr/local/lib/python3.8/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (1.8.0)\n", | |
"Requirement already satisfied: prometheus-client in /usr/local/lib/python3.8/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.15.0)\n", | |
"Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.13.3)\n", | |
"Requirement already satisfied: nbconvert<6.0 in /usr/local/lib/python3.8/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (5.6.1)\n", | |
"Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.8/dist-packages (from jupyter-core->nbformat>=4.2.0->pycaret) (2.6.0)\n", | |
"Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.4)\n", | |
"Requirement already satisfied: testpath in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.6.0)\n", | |
"Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.8.4)\n", | |
"Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (1.5.0)\n", | |
"Requirement already satisfied: bleach in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (5.0.1)\n", | |
"Requirement already satisfied: defusedxml in /usr/local/lib/python3.8/dist-packages (from nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.7.1)\n", | |
"Requirement already satisfied: ptyprocess in /usr/local/lib/python3.8/dist-packages (from terminado>=0.8.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.7.0)\n", | |
"Requirement already satisfied: webencodings in /usr/local/lib/python3.8/dist-packages (from bleach->nbconvert<6.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets>=7.6.5->pycaret) (0.5.1)\n" | |
] | |
} | |
], | |
"source": [ | |
"!pip install --pre pycaret" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"from pycaret import show_versions\n", | |
"show_versions()" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "oqPSOGDwVOWh", | |
"outputId": "371a8592-173b-4d01-b4b2-a4a5be56cc05" | |
}, | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\n", | |
"System:\n", | |
" python: 3.8.16 (default, Dec 7 2022, 01:12:13) [GCC 7.5.0]\n", | |
"executable: /usr/bin/python3\n", | |
" machine: Linux-5.10.133+-x86_64-with-glibc2.27\n", | |
"\n", | |
"PyCaret required dependencies:\n", | |
" pip: 21.1.3\n", | |
" setuptools: 57.4.0\n", | |
" pycaret: 3.0.0rc6\n", | |
" IPython: 7.9.0\n", | |
" ipywidgets: 7.7.1\n", | |
" tqdm: 4.64.1\n", | |
" numpy: 1.21.6\n", | |
" pandas: 1.3.5\n", | |
" jinja2: 2.11.3\n", | |
" scipy: 1.7.3\n", | |
" joblib: 1.2.0\n", | |
" sklearn: 1.0.2\n", | |
" pyod: 1.0.7\n", | |
" imblearn: 0.8.1\n", | |
" category_encoders: 2.5.1.post0\n", | |
" lightgbm: 3.3.3\n", | |
" numba: 0.56.4\n", | |
" requests: 2.28.1\n", | |
" matplotlib: 3.6.2\n", | |
" scikitplot: 0.3.7\n", | |
" yellowbrick: 1.5\n", | |
" plotly: 5.5.0\n", | |
" kaleido: 0.2.1\n", | |
" statsmodels: 0.13.5\n", | |
" sktime: 0.14.1\n", | |
" tbats: 1.1.2\n", | |
" pmdarima: 2.0.2\n", | |
" psutil: 5.9.4\n", | |
"\n", | |
"PyCaret optional dependencies:\n", | |
" shap: Not installed\n", | |
" interpret: Not installed\n", | |
" umap: Not installed\n", | |
" pandas_profiling: 1.4.1\n", | |
" explainerdashboard: Not installed\n", | |
" autoviz: Not installed\n", | |
" fairlearn: Not installed\n", | |
" xgboost: 0.90\n", | |
" catboost: Not installed\n", | |
" kmodes: Not installed\n", | |
" mlxtend: 0.14.0\n", | |
" statsforecast: Not installed\n", | |
" tune_sklearn: Not installed\n", | |
" ray: Not installed\n", | |
" hyperopt: 0.1.2\n", | |
" optuna: Not installed\n", | |
" skopt: Not installed\n", | |
" mlflow: Not installed\n", | |
" gradio: Not installed\n", | |
" fastapi: Not installed\n", | |
" uvicorn: Not installed\n", | |
" m2cgen: Not installed\n", | |
" evidently: Not installed\n", | |
" nltk: 3.7\n", | |
" pyLDAvis: Not installed\n", | |
" gensim: 3.6.0\n", | |
" spacy: 3.4.4\n", | |
" wordcloud: 1.8.2.2\n", | |
" textblob: 0.15.3\n", | |
" fugue: Not installed\n", | |
" streamlit: Not installed\n", | |
" prophet: 1.1.1\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np\n", | |
"data = pd.read_csv('https://raw.githubusercontent.com/srees1988/predict-churn-py/main/customer_churn_data.csv')\n", | |
"data.head()" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 386 | |
}, | |
"id": "P0Ug40gnU0FU", | |
"outputId": "79735200-c184-424f-fc32-61c40266d244" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" customerID gender SeniorCitizen Partner Dependents tenure PhoneService \\\n", | |
"0 7590-VHVEG Female 0 Yes No 1 No \n", | |
"1 5575-GNVDE Male 0 No No 34 Yes \n", | |
"2 3668-QPYBK Male 0 No No 2 Yes \n", | |
"3 7795-CFOCW Male 0 No No 45 No \n", | |
"4 9237-HQITU Female 0 No No 2 Yes \n", | |
"\n", | |
" MultipleLines InternetService OnlineSecurity ... DeviceProtection \\\n", | |
"0 No phone service DSL No ... No \n", | |
"1 No DSL Yes ... Yes \n", | |
"2 No DSL Yes ... No \n", | |
"3 No phone service DSL Yes ... Yes \n", | |
"4 No Fiber optic No ... No \n", | |
"\n", | |
" TechSupport StreamingTV StreamingMovies Contract PaperlessBilling \\\n", | |
"0 No No No Month-to-month Yes \n", | |
"1 No No No One year No \n", | |
"2 No No No Month-to-month Yes \n", | |
"3 Yes No No One year No \n", | |
"4 No No No Month-to-month Yes \n", | |
"\n", | |
" PaymentMethod MonthlyCharges TotalCharges Churn \n", | |
"0 Electronic check 29.85 29.85 No \n", | |
"1 Mailed check 56.95 1889.5 No \n", | |
"2 Mailed check 53.85 108.15 Yes \n", | |
"3 Bank transfer (automatic) 42.30 1840.75 No \n", | |
"4 Electronic check 70.70 151.65 Yes \n", | |
"\n", | |
"[5 rows x 21 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-27a952b8-d376-4bbc-b484-b70e66bcb0c5\">\n", | |
" <div class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>customerID</th>\n", | |
" <th>gender</th>\n", | |
" <th>SeniorCitizen</th>\n", | |
" <th>Partner</th>\n", | |
" <th>Dependents</th>\n", | |
" <th>tenure</th>\n", | |
" <th>PhoneService</th>\n", | |
" <th>MultipleLines</th>\n", | |
" <th>InternetService</th>\n", | |
" <th>OnlineSecurity</th>\n", | |
" <th>...</th>\n", | |
" <th>DeviceProtection</th>\n", | |
" <th>TechSupport</th>\n", | |
" <th>StreamingTV</th>\n", | |
" <th>StreamingMovies</th>\n", | |
" <th>Contract</th>\n", | |
" <th>PaperlessBilling</th>\n", | |
" <th>PaymentMethod</th>\n", | |
" <th>MonthlyCharges</th>\n", | |
" <th>TotalCharges</th>\n", | |
" <th>Churn</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>7590-VHVEG</td>\n", | |
" <td>Female</td>\n", | |
" <td>0</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>1</td>\n", | |
" <td>No</td>\n", | |
" <td>No phone service</td>\n", | |
" <td>DSL</td>\n", | |
" <td>No</td>\n", | |
" <td>...</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>Month-to-month</td>\n", | |
" <td>Yes</td>\n", | |
" <td>Electronic check</td>\n", | |
" <td>29.85</td>\n", | |
" <td>29.85</td>\n", | |
" <td>No</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>5575-GNVDE</td>\n", | |
" <td>Male</td>\n", | |
" <td>0</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>34</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>DSL</td>\n", | |
" <td>Yes</td>\n", | |
" <td>...</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>One year</td>\n", | |
" <td>No</td>\n", | |
" <td>Mailed check</td>\n", | |
" <td>56.95</td>\n", | |
" <td>1889.5</td>\n", | |
" <td>No</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>3668-QPYBK</td>\n", | |
" <td>Male</td>\n", | |
" <td>0</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>2</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>DSL</td>\n", | |
" <td>Yes</td>\n", | |
" <td>...</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>Month-to-month</td>\n", | |
" <td>Yes</td>\n", | |
" <td>Mailed check</td>\n", | |
" <td>53.85</td>\n", | |
" <td>108.15</td>\n", | |
" <td>Yes</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>7795-CFOCW</td>\n", | |
" <td>Male</td>\n", | |
" <td>0</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>45</td>\n", | |
" <td>No</td>\n", | |
" <td>No phone service</td>\n", | |
" <td>DSL</td>\n", | |
" <td>Yes</td>\n", | |
" <td>...</td>\n", | |
" <td>Yes</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>One year</td>\n", | |
" <td>No</td>\n", | |
" <td>Bank transfer (automatic)</td>\n", | |
" <td>42.30</td>\n", | |
" <td>1840.75</td>\n", | |
" <td>No</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>9237-HQITU</td>\n", | |
" <td>Female</td>\n", | |
" <td>0</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>2</td>\n", | |
" <td>Yes</td>\n", | |
" <td>No</td>\n", | |
" <td>Fiber optic</td>\n", | |
" <td>No</td>\n", | |
" <td>...</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>No</td>\n", | |
" <td>Month-to-month</td>\n", | |
" <td>Yes</td>\n", | |
" <td>Electronic check</td>\n", | |
" <td>70.70</td>\n", | |
" <td>151.65</td>\n", | |
" <td>Yes</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>5 rows × 21 columns</p>\n", | |
"</div>\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-27a952b8-d376-4bbc-b484-b70e66bcb0c5')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
" \n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n", | |
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" \n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" flex-wrap:wrap;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-27a952b8-d376-4bbc-b484-b70e66bcb0c5 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-27a952b8-d376-4bbc-b484-b70e66bcb0c5');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
" </div>\n", | |
" " | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 3 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# replace blanks with np.nan\n", | |
"data['TotalCharges'] = data['TotalCharges'].replace(' ', np.nan)\n", | |
"# convert to float64\n", | |
"data['TotalCharges'] = data['TotalCharges'].astype('float64')" | |
], | |
"metadata": { | |
"id": "HNxPVMagU2gQ" | |
}, | |
"execution_count": 4, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"#init setup\n", | |
"from pycaret.classification import *\n", | |
"s = setup(data, target='Churn', ignore_features = ['customerID'])" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 865 | |
}, | |
"id": "tTF1yss4U5cZ", | |
"outputId": "77c35e6f-2101-4dca-db87-c04364847754" | |
}, | |
"execution_count": 5, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<pandas.io.formats.style.Styler at 0x7f713cafd670>" | |
], | |
"text/html": [ | |
"<style type=\"text/css\">\n", | |
"#T_6f065_row13_col1 {\n", | |
" background-color: lightgreen;\n", | |
"}\n", | |
"</style>\n", | |
"<table id=\"T_6f065_\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th class=\"blank level0\" > </th>\n", | |
" <th class=\"col_heading level0 col0\" >Description</th>\n", | |
" <th class=\"col_heading level0 col1\" >Value</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n", | |
" <td id=\"T_6f065_row0_col0\" class=\"data row0 col0\" >Session id</td>\n", | |
" <td id=\"T_6f065_row0_col1\" class=\"data row0 col1\" >8127</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n", | |
" <td id=\"T_6f065_row1_col0\" class=\"data row1 col0\" >Target</td>\n", | |
" <td id=\"T_6f065_row1_col1\" class=\"data row1 col1\" >Churn</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n", | |
" <td id=\"T_6f065_row2_col0\" class=\"data row2 col0\" >Target type</td>\n", | |
" <td id=\"T_6f065_row2_col1\" class=\"data row2 col1\" >Binary</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n", | |
" <td id=\"T_6f065_row3_col0\" class=\"data row3 col0\" >Target mapping</td>\n", | |
" <td id=\"T_6f065_row3_col1\" class=\"data row3 col1\" >No: 0, Yes: 1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n", | |
" <td id=\"T_6f065_row4_col0\" class=\"data row4 col0\" >Original data shape</td>\n", | |
" <td id=\"T_6f065_row4_col1\" class=\"data row4 col1\" >(7043, 20)</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n", | |
" <td id=\"T_6f065_row5_col0\" class=\"data row5 col0\" >Transformed data shape</td>\n", | |
" <td id=\"T_6f065_row5_col1\" class=\"data row5 col1\" >(7043, 41)</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n", | |
" <td id=\"T_6f065_row6_col0\" class=\"data row6 col0\" >Transformed train set shape</td>\n", | |
" <td id=\"T_6f065_row6_col1\" class=\"data row6 col1\" >(4930, 41)</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n", | |
" <td id=\"T_6f065_row7_col0\" class=\"data row7 col0\" >Transformed test set shape</td>\n", | |
" <td id=\"T_6f065_row7_col1\" class=\"data row7 col1\" >(2113, 41)</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n", | |
" <td id=\"T_6f065_row8_col0\" class=\"data row8 col0\" >Ignore features</td>\n", | |
" <td id=\"T_6f065_row8_col1\" class=\"data row8 col1\" >1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n", | |
" <td id=\"T_6f065_row9_col0\" class=\"data row9 col0\" >Ordinal features</td>\n", | |
" <td id=\"T_6f065_row9_col1\" class=\"data row9 col1\" >5</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n", | |
" <td id=\"T_6f065_row10_col0\" class=\"data row10 col0\" >Numeric features</td>\n", | |
" <td id=\"T_6f065_row10_col1\" class=\"data row10 col1\" >4</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n", | |
" <td id=\"T_6f065_row11_col0\" class=\"data row11 col0\" >Categorical features</td>\n", | |
" <td id=\"T_6f065_row11_col1\" class=\"data row11 col1\" >15</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n", | |
" <td id=\"T_6f065_row12_col0\" class=\"data row12 col0\" >Rows with missing values</td>\n", | |
" <td id=\"T_6f065_row12_col1\" class=\"data row12 col1\" >0.2%</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n", | |
" <td id=\"T_6f065_row13_col0\" class=\"data row13 col0\" >Preprocess</td>\n", | |
" <td id=\"T_6f065_row13_col1\" class=\"data row13 col1\" >True</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n", | |
" <td id=\"T_6f065_row14_col0\" class=\"data row14 col0\" >Imputation type</td>\n", | |
" <td id=\"T_6f065_row14_col1\" class=\"data row14 col1\" >simple</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n", | |
" <td id=\"T_6f065_row15_col0\" class=\"data row15 col0\" >Numeric imputation</td>\n", | |
" <td id=\"T_6f065_row15_col1\" class=\"data row15 col1\" >mean</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row16\" class=\"row_heading level0 row16\" >16</th>\n", | |
" <td id=\"T_6f065_row16_col0\" class=\"data row16 col0\" >Categorical imputation</td>\n", | |
" <td id=\"T_6f065_row16_col1\" class=\"data row16 col1\" >mode</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row17\" class=\"row_heading level0 row17\" >17</th>\n", | |
" <td id=\"T_6f065_row17_col0\" class=\"data row17 col0\" >Maximum one-hot encoding</td>\n", | |
" <td id=\"T_6f065_row17_col1\" class=\"data row17 col1\" >25</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row18\" class=\"row_heading level0 row18\" >18</th>\n", | |
" <td id=\"T_6f065_row18_col0\" class=\"data row18 col0\" >Encoding method</td>\n", | |
" <td id=\"T_6f065_row18_col1\" class=\"data row18 col1\" >None</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row19\" class=\"row_heading level0 row19\" >19</th>\n", | |
" <td id=\"T_6f065_row19_col0\" class=\"data row19 col0\" >Fold Generator</td>\n", | |
" <td id=\"T_6f065_row19_col1\" class=\"data row19 col1\" >StratifiedKFold</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row20\" class=\"row_heading level0 row20\" >20</th>\n", | |
" <td id=\"T_6f065_row20_col0\" class=\"data row20 col0\" >Fold Number</td>\n", | |
" <td id=\"T_6f065_row20_col1\" class=\"data row20 col1\" >10</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row21\" class=\"row_heading level0 row21\" >21</th>\n", | |
" <td id=\"T_6f065_row21_col0\" class=\"data row21 col0\" >CPU Jobs</td>\n", | |
" <td id=\"T_6f065_row21_col1\" class=\"data row21 col1\" >-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row22\" class=\"row_heading level0 row22\" >22</th>\n", | |
" <td id=\"T_6f065_row22_col0\" class=\"data row22 col0\" >Use GPU</td>\n", | |
" <td id=\"T_6f065_row22_col1\" class=\"data row22 col1\" >False</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row23\" class=\"row_heading level0 row23\" >23</th>\n", | |
" <td id=\"T_6f065_row23_col0\" class=\"data row23 col0\" >Log Experiment</td>\n", | |
" <td id=\"T_6f065_row23_col1\" class=\"data row23 col1\" >False</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row24\" class=\"row_heading level0 row24\" >24</th>\n", | |
" <td id=\"T_6f065_row24_col0\" class=\"data row24 col0\" >Experiment Name</td>\n", | |
" <td id=\"T_6f065_row24_col1\" class=\"data row24 col1\" >clf-default-name</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_6f065_level0_row25\" class=\"row_heading level0 row25\" >25</th>\n", | |
" <td id=\"T_6f065_row25_col0\" class=\"data row25 col0\" >USI</td>\n", | |
" <td id=\"T_6f065_row25_col1\" class=\"data row25 col1\" >342d</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n" | |
] | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# compare all models\n", | |
"best_model = compare_models(sort='AUC')" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 488, | |
"referenced_widgets": [ | |
"a1f663739a584515b77d5a0021ac1112", | |
"798347ee149f4e87a1222ea615ae1796", | |
"1e4f52eb43704e659de98c0b8e5592fa", | |
"6d5e87d392574da188542f87d9ce44b7", | |
"60d2d8a8bb2b403ab1f3769a8d592831", | |
"5186e5117bd048a5ba722a102c801eb5", | |
"8ffabd38dda54e32bb831337972cb9d9", | |
"0a8c2e06702d4ae48e05239b338b07fe", | |
"a1bfebf8d77b48cf81886ac3d129ef46", | |
"798e541c75d247d18998916c06c1ca48", | |
"12047c584b3b4a7c8d2c0ae08a0353b8" | |
] | |
}, | |
"id": "55ilsjHjU9v4", | |
"outputId": "6926d2f6-9441-4546-98de-66dd91523916" | |
}, | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
], | |
"text/html": [] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<pandas.io.formats.style.Styler at 0x7f713cd99490>" | |
], | |
"text/html": [ | |
"<style type=\"text/css\">\n", | |
"#T_dea6d_ th {\n", | |
" text-align: left;\n", | |
"}\n", | |
"#T_dea6d_row0_col0, #T_dea6d_row0_col1, #T_dea6d_row0_col3, #T_dea6d_row0_col4, #T_dea6d_row0_col5, #T_dea6d_row0_col6, #T_dea6d_row0_col7, #T_dea6d_row1_col0, #T_dea6d_row1_col2, #T_dea6d_row1_col3, #T_dea6d_row1_col4, #T_dea6d_row1_col5, #T_dea6d_row1_col6, #T_dea6d_row1_col7, #T_dea6d_row2_col0, #T_dea6d_row2_col2, #T_dea6d_row2_col3, #T_dea6d_row2_col4, #T_dea6d_row2_col5, #T_dea6d_row3_col0, #T_dea6d_row3_col1, #T_dea6d_row3_col2, #T_dea6d_row3_col3, #T_dea6d_row3_col4, #T_dea6d_row3_col7, #T_dea6d_row4_col0, #T_dea6d_row4_col1, #T_dea6d_row4_col2, #T_dea6d_row4_col3, #T_dea6d_row4_col4, #T_dea6d_row4_col5, #T_dea6d_row4_col6, #T_dea6d_row4_col7, #T_dea6d_row5_col0, #T_dea6d_row5_col1, #T_dea6d_row5_col2, #T_dea6d_row5_col3, #T_dea6d_row5_col4, #T_dea6d_row5_col5, #T_dea6d_row5_col6, #T_dea6d_row5_col7, #T_dea6d_row6_col0, #T_dea6d_row6_col1, #T_dea6d_row6_col2, #T_dea6d_row6_col4, #T_dea6d_row6_col5, #T_dea6d_row6_col6, #T_dea6d_row6_col7, #T_dea6d_row7_col0, #T_dea6d_row7_col1, #T_dea6d_row7_col2, #T_dea6d_row7_col3, #T_dea6d_row7_col4, #T_dea6d_row7_col5, #T_dea6d_row7_col6, #T_dea6d_row7_col7, #T_dea6d_row8_col0, #T_dea6d_row8_col1, #T_dea6d_row8_col2, #T_dea6d_row8_col3, #T_dea6d_row8_col4, #T_dea6d_row8_col5, #T_dea6d_row8_col6, #T_dea6d_row8_col7, #T_dea6d_row9_col0, #T_dea6d_row9_col1, #T_dea6d_row9_col2, #T_dea6d_row9_col3, #T_dea6d_row9_col4, #T_dea6d_row9_col5, #T_dea6d_row9_col6, #T_dea6d_row9_col7, #T_dea6d_row10_col0, #T_dea6d_row10_col1, #T_dea6d_row10_col2, #T_dea6d_row10_col3, #T_dea6d_row10_col4, #T_dea6d_row10_col5, #T_dea6d_row10_col6, #T_dea6d_row10_col7, #T_dea6d_row11_col0, #T_dea6d_row11_col1, #T_dea6d_row11_col2, #T_dea6d_row11_col3, #T_dea6d_row11_col4, #T_dea6d_row11_col5, #T_dea6d_row11_col6, #T_dea6d_row11_col7, #T_dea6d_row12_col0, #T_dea6d_row12_col1, #T_dea6d_row12_col2, #T_dea6d_row12_col3, #T_dea6d_row12_col4, #T_dea6d_row12_col5, #T_dea6d_row12_col6, #T_dea6d_row12_col7, #T_dea6d_row13_col0, #T_dea6d_row13_col1, #T_dea6d_row13_col2, #T_dea6d_row13_col3, #T_dea6d_row13_col5, #T_dea6d_row13_col6, #T_dea6d_row13_col7 {\n", | |
" text-align: left;\n", | |
"}\n", | |
"#T_dea6d_row0_col2, #T_dea6d_row1_col1, #T_dea6d_row2_col1, #T_dea6d_row2_col6, #T_dea6d_row2_col7, #T_dea6d_row3_col5, #T_dea6d_row3_col6, #T_dea6d_row6_col3, #T_dea6d_row13_col4 {\n", | |
" text-align: left;\n", | |
" background-color: yellow;\n", | |
"}\n", | |
"#T_dea6d_row0_col8, #T_dea6d_row1_col8, #T_dea6d_row2_col8, #T_dea6d_row3_col8, #T_dea6d_row4_col8, #T_dea6d_row5_col8, #T_dea6d_row6_col8, #T_dea6d_row7_col8, #T_dea6d_row8_col8, #T_dea6d_row9_col8, #T_dea6d_row10_col8, #T_dea6d_row11_col8, #T_dea6d_row12_col8 {\n", | |
" text-align: left;\n", | |
" background-color: lightgrey;\n", | |
"}\n", | |
"#T_dea6d_row13_col8 {\n", | |
" text-align: left;\n", | |
" background-color: yellow;\n", | |
" background-color: lightgrey;\n", | |
"}\n", | |
"</style>\n", | |
"<table id=\"T_dea6d_\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th class=\"blank level0\" > </th>\n", | |
" <th class=\"col_heading level0 col0\" >Model</th>\n", | |
" <th class=\"col_heading level0 col1\" >Accuracy</th>\n", | |
" <th class=\"col_heading level0 col2\" >AUC</th>\n", | |
" <th class=\"col_heading level0 col3\" >Recall</th>\n", | |
" <th class=\"col_heading level0 col4\" >Prec.</th>\n", | |
" <th class=\"col_heading level0 col5\" >F1</th>\n", | |
" <th class=\"col_heading level0 col6\" >Kappa</th>\n", | |
" <th class=\"col_heading level0 col7\" >MCC</th>\n", | |
" <th class=\"col_heading level0 col8\" >TT (Sec)</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row0\" class=\"row_heading level0 row0\" >gbc</th>\n", | |
" <td id=\"T_dea6d_row0_col0\" class=\"data row0 col0\" >Gradient Boosting Classifier</td>\n", | |
" <td id=\"T_dea6d_row0_col1\" class=\"data row0 col1\" >0.8024</td>\n", | |
" <td id=\"T_dea6d_row0_col2\" class=\"data row0 col2\" >0.8486</td>\n", | |
" <td id=\"T_dea6d_row0_col3\" class=\"data row0 col3\" >0.5237</td>\n", | |
" <td id=\"T_dea6d_row0_col4\" class=\"data row0 col4\" >0.6621</td>\n", | |
" <td id=\"T_dea6d_row0_col5\" class=\"data row0 col5\" >0.5844</td>\n", | |
" <td id=\"T_dea6d_row0_col6\" class=\"data row0 col6\" >0.4572</td>\n", | |
" <td id=\"T_dea6d_row0_col7\" class=\"data row0 col7\" >0.4628</td>\n", | |
" <td id=\"T_dea6d_row0_col8\" class=\"data row0 col8\" >1.1600</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row1\" class=\"row_heading level0 row1\" >ada</th>\n", | |
" <td id=\"T_dea6d_row1_col0\" class=\"data row1 col0\" >Ada Boost Classifier</td>\n", | |
" <td id=\"T_dea6d_row1_col1\" class=\"data row1 col1\" >0.8034</td>\n", | |
" <td id=\"T_dea6d_row1_col2\" class=\"data row1 col2\" >0.8471</td>\n", | |
" <td id=\"T_dea6d_row1_col3\" class=\"data row1 col3\" >0.5359</td>\n", | |
" <td id=\"T_dea6d_row1_col4\" class=\"data row1 col4\" >0.6612</td>\n", | |
" <td id=\"T_dea6d_row1_col5\" class=\"data row1 col5\" >0.5915</td>\n", | |
" <td id=\"T_dea6d_row1_col6\" class=\"data row1 col6\" >0.4640</td>\n", | |
" <td id=\"T_dea6d_row1_col7\" class=\"data row1 col7\" >0.4688</td>\n", | |
" <td id=\"T_dea6d_row1_col8\" class=\"data row1 col8\" >1.1410</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row2\" class=\"row_heading level0 row2\" >lr</th>\n", | |
" <td id=\"T_dea6d_row2_col0\" class=\"data row2 col0\" >Logistic Regression</td>\n", | |
" <td id=\"T_dea6d_row2_col1\" class=\"data row2 col1\" >0.8034</td>\n", | |
" <td id=\"T_dea6d_row2_col2\" class=\"data row2 col2\" >0.8448</td>\n", | |
" <td id=\"T_dea6d_row2_col3\" class=\"data row2 col3\" >0.5397</td>\n", | |
" <td id=\"T_dea6d_row2_col4\" class=\"data row2 col4\" >0.6598</td>\n", | |
" <td id=\"T_dea6d_row2_col5\" class=\"data row2 col5\" >0.5931</td>\n", | |
" <td id=\"T_dea6d_row2_col6\" class=\"data row2 col6\" >0.4653</td>\n", | |
" <td id=\"T_dea6d_row2_col7\" class=\"data row2 col7\" >0.4698</td>\n", | |
" <td id=\"T_dea6d_row2_col8\" class=\"data row2 col8\" >2.3800</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row3\" class=\"row_heading level0 row3\" >lda</th>\n", | |
" <td id=\"T_dea6d_row3_col0\" class=\"data row3 col0\" >Linear Discriminant Analysis</td>\n", | |
" <td id=\"T_dea6d_row3_col1\" class=\"data row3 col1\" >0.7998</td>\n", | |
" <td id=\"T_dea6d_row3_col2\" class=\"data row3 col2\" >0.8385</td>\n", | |
" <td id=\"T_dea6d_row3_col3\" class=\"data row3 col3\" >0.5604</td>\n", | |
" <td id=\"T_dea6d_row3_col4\" class=\"data row3 col4\" >0.6415</td>\n", | |
" <td id=\"T_dea6d_row3_col5\" class=\"data row3 col5\" >0.5977</td>\n", | |
" <td id=\"T_dea6d_row3_col6\" class=\"data row3 col6\" >0.4653</td>\n", | |
" <td id=\"T_dea6d_row3_col7\" class=\"data row3 col7\" >0.4675</td>\n", | |
" <td id=\"T_dea6d_row3_col8\" class=\"data row3 col8\" >0.5670</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row4\" class=\"row_heading level0 row4\" >lightgbm</th>\n", | |
" <td id=\"T_dea6d_row4_col0\" class=\"data row4 col0\" >Light Gradient Boosting Machine</td>\n", | |
" <td id=\"T_dea6d_row4_col1\" class=\"data row4 col1\" >0.7945</td>\n", | |
" <td id=\"T_dea6d_row4_col2\" class=\"data row4 col2\" >0.8378</td>\n", | |
" <td id=\"T_dea6d_row4_col3\" class=\"data row4 col3\" >0.5275</td>\n", | |
" <td id=\"T_dea6d_row4_col4\" class=\"data row4 col4\" >0.6379</td>\n", | |
" <td id=\"T_dea6d_row4_col5\" class=\"data row4 col5\" >0.5762</td>\n", | |
" <td id=\"T_dea6d_row4_col6\" class=\"data row4 col6\" >0.4424</td>\n", | |
" <td id=\"T_dea6d_row4_col7\" class=\"data row4 col7\" >0.4467</td>\n", | |
" <td id=\"T_dea6d_row4_col8\" class=\"data row4 col8\" >0.7240</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row5\" class=\"row_heading level0 row5\" >rf</th>\n", | |
" <td id=\"T_dea6d_row5_col0\" class=\"data row5 col0\" >Random Forest Classifier</td>\n", | |
" <td id=\"T_dea6d_row5_col1\" class=\"data row5 col1\" >0.7927</td>\n", | |
" <td id=\"T_dea6d_row5_col2\" class=\"data row5 col2\" >0.8232</td>\n", | |
" <td id=\"T_dea6d_row5_col3\" class=\"data row5 col3\" >0.4992</td>\n", | |
" <td id=\"T_dea6d_row5_col4\" class=\"data row5 col4\" >0.6407</td>\n", | |
" <td id=\"T_dea6d_row5_col5\" class=\"data row5 col5\" >0.5604</td>\n", | |
" <td id=\"T_dea6d_row5_col6\" class=\"data row5 col6\" >0.4277</td>\n", | |
" <td id=\"T_dea6d_row5_col7\" class=\"data row5 col7\" >0.4338</td>\n", | |
" <td id=\"T_dea6d_row5_col8\" class=\"data row5 col8\" >1.0060</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row6\" class=\"row_heading level0 row6\" >qda</th>\n", | |
" <td id=\"T_dea6d_row6_col0\" class=\"data row6 col0\" >Quadratic Discriminant Analysis</td>\n", | |
" <td id=\"T_dea6d_row6_col1\" class=\"data row6 col1\" >0.6661</td>\n", | |
" <td id=\"T_dea6d_row6_col2\" class=\"data row6 col2\" >0.8201</td>\n", | |
" <td id=\"T_dea6d_row6_col3\" class=\"data row6 col3\" >0.8670</td>\n", | |
" <td id=\"T_dea6d_row6_col4\" class=\"data row6 col4\" >0.4409</td>\n", | |
" <td id=\"T_dea6d_row6_col5\" class=\"data row6 col5\" >0.5810</td>\n", | |
" <td id=\"T_dea6d_row6_col6\" class=\"data row6 col6\" >0.3531</td>\n", | |
" <td id=\"T_dea6d_row6_col7\" class=\"data row6 col7\" >0.4134</td>\n", | |
" <td id=\"T_dea6d_row6_col8\" class=\"data row6 col8\" >0.5540</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row7\" class=\"row_heading level0 row7\" >nb</th>\n", | |
" <td id=\"T_dea6d_row7_col0\" class=\"data row7 col0\" >Naive Bayes</td>\n", | |
" <td id=\"T_dea6d_row7_col1\" class=\"data row7 col1\" >0.6931</td>\n", | |
" <td id=\"T_dea6d_row7_col2\" class=\"data row7 col2\" >0.8175</td>\n", | |
" <td id=\"T_dea6d_row7_col3\" class=\"data row7 col3\" >0.8433</td>\n", | |
" <td id=\"T_dea6d_row7_col4\" class=\"data row7 col4\" >0.4578</td>\n", | |
" <td id=\"T_dea6d_row7_col5\" class=\"data row7 col5\" >0.5932</td>\n", | |
" <td id=\"T_dea6d_row7_col6\" class=\"data row7 col6\" >0.3799</td>\n", | |
" <td id=\"T_dea6d_row7_col7\" class=\"data row7 col7\" >0.4262</td>\n", | |
" <td id=\"T_dea6d_row7_col8\" class=\"data row7 col8\" >0.5550</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row8\" class=\"row_heading level0 row8\" >et</th>\n", | |
" <td id=\"T_dea6d_row8_col0\" class=\"data row8 col0\" >Extra Trees Classifier</td>\n", | |
" <td id=\"T_dea6d_row8_col1\" class=\"data row8 col1\" >0.7765</td>\n", | |
" <td id=\"T_dea6d_row8_col2\" class=\"data row8 col2\" >0.7952</td>\n", | |
" <td id=\"T_dea6d_row8_col3\" class=\"data row8 col3\" >0.4839</td>\n", | |
" <td id=\"T_dea6d_row8_col4\" class=\"data row8 col4\" >0.5986</td>\n", | |
" <td id=\"T_dea6d_row8_col5\" class=\"data row8 col5\" >0.5344</td>\n", | |
" <td id=\"T_dea6d_row8_col6\" class=\"data row8 col6\" >0.3896</td>\n", | |
" <td id=\"T_dea6d_row8_col7\" class=\"data row8 col7\" >0.3939</td>\n", | |
" <td id=\"T_dea6d_row8_col8\" class=\"data row8 col8\" >0.9910</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row9\" class=\"row_heading level0 row9\" >knn</th>\n", | |
" <td id=\"T_dea6d_row9_col0\" class=\"data row9 col0\" >K Neighbors Classifier</td>\n", | |
" <td id=\"T_dea6d_row9_col1\" class=\"data row9 col1\" >0.7684</td>\n", | |
" <td id=\"T_dea6d_row9_col2\" class=\"data row9 col2\" >0.7487</td>\n", | |
" <td id=\"T_dea6d_row9_col3\" class=\"data row9 col3\" >0.4564</td>\n", | |
" <td id=\"T_dea6d_row9_col4\" class=\"data row9 col4\" >0.5821</td>\n", | |
" <td id=\"T_dea6d_row9_col5\" class=\"data row9 col5\" >0.5110</td>\n", | |
" <td id=\"T_dea6d_row9_col6\" class=\"data row9 col6\" >0.3622</td>\n", | |
" <td id=\"T_dea6d_row9_col7\" class=\"data row9 col7\" >0.3672</td>\n", | |
" <td id=\"T_dea6d_row9_col8\" class=\"data row9 col8\" >0.6560</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row10\" class=\"row_heading level0 row10\" >dt</th>\n", | |
" <td id=\"T_dea6d_row10_col0\" class=\"data row10 col0\" >Decision Tree Classifier</td>\n", | |
" <td id=\"T_dea6d_row10_col1\" class=\"data row10 col1\" >0.7327</td>\n", | |
" <td id=\"T_dea6d_row10_col2\" class=\"data row10 col2\" >0.6621</td>\n", | |
" <td id=\"T_dea6d_row10_col3\" class=\"data row10 col3\" >0.5108</td>\n", | |
" <td id=\"T_dea6d_row10_col4\" class=\"data row10 col4\" >0.4965</td>\n", | |
" <td id=\"T_dea6d_row10_col5\" class=\"data row10 col5\" >0.5030</td>\n", | |
" <td id=\"T_dea6d_row10_col6\" class=\"data row10 col6\" >0.3204</td>\n", | |
" <td id=\"T_dea6d_row10_col7\" class=\"data row10 col7\" >0.3207</td>\n", | |
" <td id=\"T_dea6d_row10_col8\" class=\"data row10 col8\" >0.5620</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row11\" class=\"row_heading level0 row11\" >dummy</th>\n", | |
" <td id=\"T_dea6d_row11_col0\" class=\"data row11 col0\" >Dummy Classifier</td>\n", | |
" <td id=\"T_dea6d_row11_col1\" class=\"data row11 col1\" >0.7347</td>\n", | |
" <td id=\"T_dea6d_row11_col2\" class=\"data row11 col2\" >0.5000</td>\n", | |
" <td id=\"T_dea6d_row11_col3\" class=\"data row11 col3\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row11_col4\" class=\"data row11 col4\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row11_col5\" class=\"data row11 col5\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row11_col6\" class=\"data row11 col6\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row11_col7\" class=\"data row11 col7\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row11_col8\" class=\"data row11 col8\" >0.5370</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row12\" class=\"row_heading level0 row12\" >svm</th>\n", | |
" <td id=\"T_dea6d_row12_col0\" class=\"data row12 col0\" >SVM - Linear Kernel</td>\n", | |
" <td id=\"T_dea6d_row12_col1\" class=\"data row12 col1\" >0.7379</td>\n", | |
" <td id=\"T_dea6d_row12_col2\" class=\"data row12 col2\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row12_col3\" class=\"data row12 col3\" >0.4601</td>\n", | |
" <td id=\"T_dea6d_row12_col4\" class=\"data row12 col4\" >0.5872</td>\n", | |
" <td id=\"T_dea6d_row12_col5\" class=\"data row12 col5\" >0.4765</td>\n", | |
" <td id=\"T_dea6d_row12_col6\" class=\"data row12 col6\" >0.3207</td>\n", | |
" <td id=\"T_dea6d_row12_col7\" class=\"data row12 col7\" >0.3451</td>\n", | |
" <td id=\"T_dea6d_row12_col8\" class=\"data row12 col8\" >0.5140</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dea6d_level0_row13\" class=\"row_heading level0 row13\" >ridge</th>\n", | |
" <td id=\"T_dea6d_row13_col0\" class=\"data row13 col0\" >Ridge Classifier</td>\n", | |
" <td id=\"T_dea6d_row13_col1\" class=\"data row13 col1\" >0.8010</td>\n", | |
" <td id=\"T_dea6d_row13_col2\" class=\"data row13 col2\" >0.0000</td>\n", | |
" <td id=\"T_dea6d_row13_col3\" class=\"data row13 col3\" >0.5084</td>\n", | |
" <td id=\"T_dea6d_row13_col4\" class=\"data row13 col4\" >0.6647</td>\n", | |
" <td id=\"T_dea6d_row13_col5\" class=\"data row13 col5\" >0.5755</td>\n", | |
" <td id=\"T_dea6d_row13_col6\" class=\"data row13 col6\" >0.4486</td>\n", | |
" <td id=\"T_dea6d_row13_col7\" class=\"data row13 col7\" >0.4559</td>\n", | |
" <td id=\"T_dea6d_row13_col8\" class=\"data row13 col8\" >0.4680</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n" | |
] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Processing: 0%| | 0/61 [00:00<?, ?it/s]" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "a1f663739a584515b77d5a0021ac1112" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/b3e629b1971e1542/manager.min.js" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
], | |
"text/html": [] | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"def calculate_profit(y, y_pred):\n", | |
" tp = np.where((y_pred==1) & (y==1), (5000-1000), 0)\n", | |
" fp = np.where((y_pred==1) & (y==0), -1000, 0)\n", | |
" return np.sum([tp,fp])# add metric to PyCaret\n", | |
"add_metric('profit', 'Profit', calculate_profit)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "C2LuD076VHGA", | |
"outputId": "322b3d3d-a99b-4b77-d469-5c15842de467" | |
}, | |
"execution_count": 7, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"Name Profit\n", | |
"Display Name Profit\n", | |
"Score Function <function calculate_profit at 0x7f713cc59d30>\n", | |
"Scorer make_scorer(calculate_profit)\n", | |
"Target pred\n", | |
"Args {}\n", | |
"Greater is Better True\n", | |
"Multiclass True\n", | |
"Custom True\n", | |
"Name: profit, dtype: object" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 7 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"best_model = compare_models(sort='Profit')" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 488, | |
"referenced_widgets": [ | |
"3783b94292274cf89f942f27877077d5", | |
"1fc967e584e04c2cb8a4b9f5ebf4232c", | |
"7959d744e63947a68db0e89b2259507c", | |
"15fdc29e905a4bdcbcf99bb15c0666b1", | |
"8cd39821783548178e30123aaa20a678", | |
"f94ad0b3b152446897f44551e8df0756", | |
"6be4de66a42f4111bfbc336b1ebb9a12", | |
"52b5ab48cb744c4b85f1a436ede80751", | |
"11a4b1fe8b7e454a871ea0c4fd0c2ff4", | |
"eec05212cb44449ea702dde77baaf3fe", | |
"b634f3588ae343ddb0805d4740add8f2" | |
] | |
}, | |
"id": "4-xUNC95VINf", | |
"outputId": "34c7aff3-626d-4dcc-9ab4-1ebb7bb3e1c4" | |
}, | |
"execution_count": 8, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
], | |
"text/html": [] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<pandas.io.formats.style.Styler at 0x7f713cd4d4c0>" | |
], | |
"text/html": [ | |
"<style type=\"text/css\">\n", | |
"#T_dfbc0_ th {\n", | |
" text-align: left;\n", | |
"}\n", | |
"#T_dfbc0_row0_col0, #T_dfbc0_row0_col2, #T_dfbc0_row0_col3, #T_dfbc0_row0_col4, #T_dfbc0_row0_col5, #T_dfbc0_row1_col0, #T_dfbc0_row1_col1, #T_dfbc0_row1_col2, #T_dfbc0_row1_col3, #T_dfbc0_row1_col4, #T_dfbc0_row1_col5, #T_dfbc0_row1_col6, #T_dfbc0_row1_col7, #T_dfbc0_row2_col0, #T_dfbc0_row2_col1, #T_dfbc0_row2_col2, #T_dfbc0_row2_col3, #T_dfbc0_row2_col4, #T_dfbc0_row2_col5, #T_dfbc0_row2_col6, #T_dfbc0_row2_col7, #T_dfbc0_row3_col0, #T_dfbc0_row3_col1, #T_dfbc0_row3_col2, #T_dfbc0_row3_col3, #T_dfbc0_row3_col4, #T_dfbc0_row3_col5, #T_dfbc0_row3_col6, #T_dfbc0_row3_col7, #T_dfbc0_row4_col0, #T_dfbc0_row4_col1, #T_dfbc0_row4_col2, #T_dfbc0_row4_col3, #T_dfbc0_row4_col4, #T_dfbc0_row4_col5, #T_dfbc0_row4_col6, #T_dfbc0_row4_col7, #T_dfbc0_row5_col0, #T_dfbc0_row5_col1, #T_dfbc0_row5_col2, #T_dfbc0_row5_col3, #T_dfbc0_row5_col5, #T_dfbc0_row5_col6, #T_dfbc0_row5_col7, #T_dfbc0_row6_col0, #T_dfbc0_row6_col1, #T_dfbc0_row6_col2, #T_dfbc0_row6_col3, #T_dfbc0_row6_col4, #T_dfbc0_row6_col5, #T_dfbc0_row6_col6, #T_dfbc0_row6_col7, #T_dfbc0_row7_col0, #T_dfbc0_row7_col1, #T_dfbc0_row7_col2, #T_dfbc0_row7_col4, #T_dfbc0_row7_col5, #T_dfbc0_row7_col6, #T_dfbc0_row7_col7, #T_dfbc0_row8_col0, #T_dfbc0_row8_col2, #T_dfbc0_row8_col3, #T_dfbc0_row8_col4, #T_dfbc0_row8_col5, #T_dfbc0_row8_col6, #T_dfbc0_row8_col7, #T_dfbc0_row9_col0, #T_dfbc0_row9_col1, #T_dfbc0_row9_col3, #T_dfbc0_row9_col4, #T_dfbc0_row9_col5, #T_dfbc0_row9_col6, #T_dfbc0_row9_col7, #T_dfbc0_row10_col0, #T_dfbc0_row10_col1, #T_dfbc0_row10_col2, #T_dfbc0_row10_col3, #T_dfbc0_row10_col4, #T_dfbc0_row10_col7, #T_dfbc0_row11_col0, #T_dfbc0_row11_col1, #T_dfbc0_row11_col2, #T_dfbc0_row11_col3, #T_dfbc0_row11_col4, #T_dfbc0_row11_col5, #T_dfbc0_row11_col6, #T_dfbc0_row11_col7, #T_dfbc0_row12_col0, #T_dfbc0_row12_col1, #T_dfbc0_row12_col2, #T_dfbc0_row12_col3, #T_dfbc0_row12_col4, #T_dfbc0_row12_col5, #T_dfbc0_row12_col6, #T_dfbc0_row12_col7, #T_dfbc0_row13_col0, #T_dfbc0_row13_col1, #T_dfbc0_row13_col2, #T_dfbc0_row13_col3, #T_dfbc0_row13_col4, #T_dfbc0_row13_col5, #T_dfbc0_row13_col6, #T_dfbc0_row13_col7 {\n", | |
" text-align: left;\n", | |
"}\n", | |
"#T_dfbc0_row0_col1, #T_dfbc0_row0_col6, #T_dfbc0_row0_col7, #T_dfbc0_row0_col8, #T_dfbc0_row1_col8, #T_dfbc0_row2_col8, #T_dfbc0_row3_col8, #T_dfbc0_row4_col8, #T_dfbc0_row5_col4, #T_dfbc0_row5_col8, #T_dfbc0_row6_col8, #T_dfbc0_row7_col3, #T_dfbc0_row7_col8, #T_dfbc0_row8_col1, #T_dfbc0_row8_col8, #T_dfbc0_row9_col2, #T_dfbc0_row9_col8, #T_dfbc0_row10_col5, #T_dfbc0_row10_col6, #T_dfbc0_row10_col8, #T_dfbc0_row11_col8, #T_dfbc0_row12_col8, #T_dfbc0_row13_col8 {\n", | |
" text-align: left;\n", | |
" background-color: yellow;\n", | |
"}\n", | |
"#T_dfbc0_row0_col9, #T_dfbc0_row1_col9, #T_dfbc0_row2_col9, #T_dfbc0_row3_col9, #T_dfbc0_row4_col9, #T_dfbc0_row6_col9, #T_dfbc0_row7_col9, #T_dfbc0_row8_col9, #T_dfbc0_row9_col9, #T_dfbc0_row10_col9, #T_dfbc0_row11_col9, #T_dfbc0_row12_col9, #T_dfbc0_row13_col9 {\n", | |
" text-align: left;\n", | |
" background-color: lightgrey;\n", | |
"}\n", | |
"#T_dfbc0_row5_col9 {\n", | |
" text-align: left;\n", | |
" background-color: yellow;\n", | |
" background-color: lightgrey;\n", | |
"}\n", | |
"</style>\n", | |
"<table id=\"T_dfbc0_\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th class=\"blank level0\" > </th>\n", | |
" <th class=\"col_heading level0 col0\" >Model</th>\n", | |
" <th class=\"col_heading level0 col1\" >Accuracy</th>\n", | |
" <th class=\"col_heading level0 col2\" >AUC</th>\n", | |
" <th class=\"col_heading level0 col3\" >Recall</th>\n", | |
" <th class=\"col_heading level0 col4\" >Prec.</th>\n", | |
" <th class=\"col_heading level0 col5\" >F1</th>\n", | |
" <th class=\"col_heading level0 col6\" >Kappa</th>\n", | |
" <th class=\"col_heading level0 col7\" >MCC</th>\n", | |
" <th class=\"col_heading level0 col8\" >Profit</th>\n", | |
" <th class=\"col_heading level0 col9\" >TT (Sec)</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row0\" class=\"row_heading level0 row0\" >lr</th>\n", | |
" <td id=\"T_dfbc0_row0_col0\" class=\"data row0 col0\" >Logistic Regression</td>\n", | |
" <td id=\"T_dfbc0_row0_col1\" class=\"data row0 col1\" >0.8034</td>\n", | |
" <td id=\"T_dfbc0_row0_col2\" class=\"data row0 col2\" >0.8448</td>\n", | |
" <td id=\"T_dfbc0_row0_col3\" class=\"data row0 col3\" >0.5397</td>\n", | |
" <td id=\"T_dfbc0_row0_col4\" class=\"data row0 col4\" >0.6598</td>\n", | |
" <td id=\"T_dfbc0_row0_col5\" class=\"data row0 col5\" >0.5931</td>\n", | |
" <td id=\"T_dfbc0_row0_col6\" class=\"data row0 col6\" >0.4653</td>\n", | |
" <td id=\"T_dfbc0_row0_col7\" class=\"data row0 col7\" >0.4698</td>\n", | |
" <td id=\"T_dfbc0_row0_col8\" class=\"data row0 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row0_col9\" class=\"data row0 col9\" >0.6290</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row1\" class=\"row_heading level0 row1\" >knn</th>\n", | |
" <td id=\"T_dfbc0_row1_col0\" class=\"data row1 col0\" >K Neighbors Classifier</td>\n", | |
" <td id=\"T_dfbc0_row1_col1\" class=\"data row1 col1\" >0.7684</td>\n", | |
" <td id=\"T_dfbc0_row1_col2\" class=\"data row1 col2\" >0.7487</td>\n", | |
" <td id=\"T_dfbc0_row1_col3\" class=\"data row1 col3\" >0.4564</td>\n", | |
" <td id=\"T_dfbc0_row1_col4\" class=\"data row1 col4\" >0.5821</td>\n", | |
" <td id=\"T_dfbc0_row1_col5\" class=\"data row1 col5\" >0.5110</td>\n", | |
" <td id=\"T_dfbc0_row1_col6\" class=\"data row1 col6\" >0.3622</td>\n", | |
" <td id=\"T_dfbc0_row1_col7\" class=\"data row1 col7\" >0.3672</td>\n", | |
" <td id=\"T_dfbc0_row1_col8\" class=\"data row1 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row1_col9\" class=\"data row1 col9\" >0.6930</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row2\" class=\"row_heading level0 row2\" >nb</th>\n", | |
" <td id=\"T_dfbc0_row2_col0\" class=\"data row2 col0\" >Naive Bayes</td>\n", | |
" <td id=\"T_dfbc0_row2_col1\" class=\"data row2 col1\" >0.6931</td>\n", | |
" <td id=\"T_dfbc0_row2_col2\" class=\"data row2 col2\" >0.8175</td>\n", | |
" <td id=\"T_dfbc0_row2_col3\" class=\"data row2 col3\" >0.8433</td>\n", | |
" <td id=\"T_dfbc0_row2_col4\" class=\"data row2 col4\" >0.4578</td>\n", | |
" <td id=\"T_dfbc0_row2_col5\" class=\"data row2 col5\" >0.5932</td>\n", | |
" <td id=\"T_dfbc0_row2_col6\" class=\"data row2 col6\" >0.3799</td>\n", | |
" <td id=\"T_dfbc0_row2_col7\" class=\"data row2 col7\" >0.4262</td>\n", | |
" <td id=\"T_dfbc0_row2_col8\" class=\"data row2 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row2_col9\" class=\"data row2 col9\" >0.5540</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row3\" class=\"row_heading level0 row3\" >dt</th>\n", | |
" <td id=\"T_dfbc0_row3_col0\" class=\"data row3 col0\" >Decision Tree Classifier</td>\n", | |
" <td id=\"T_dfbc0_row3_col1\" class=\"data row3 col1\" >0.7327</td>\n", | |
" <td id=\"T_dfbc0_row3_col2\" class=\"data row3 col2\" >0.6621</td>\n", | |
" <td id=\"T_dfbc0_row3_col3\" class=\"data row3 col3\" >0.5108</td>\n", | |
" <td id=\"T_dfbc0_row3_col4\" class=\"data row3 col4\" >0.4965</td>\n", | |
" <td id=\"T_dfbc0_row3_col5\" class=\"data row3 col5\" >0.5030</td>\n", | |
" <td id=\"T_dfbc0_row3_col6\" class=\"data row3 col6\" >0.3204</td>\n", | |
" <td id=\"T_dfbc0_row3_col7\" class=\"data row3 col7\" >0.3207</td>\n", | |
" <td id=\"T_dfbc0_row3_col8\" class=\"data row3 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row3_col9\" class=\"data row3 col9\" >0.5760</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row4\" class=\"row_heading level0 row4\" >svm</th>\n", | |
" <td id=\"T_dfbc0_row4_col0\" class=\"data row4 col0\" >SVM - Linear Kernel</td>\n", | |
" <td id=\"T_dfbc0_row4_col1\" class=\"data row4 col1\" >0.7379</td>\n", | |
" <td id=\"T_dfbc0_row4_col2\" class=\"data row4 col2\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row4_col3\" class=\"data row4 col3\" >0.4601</td>\n", | |
" <td id=\"T_dfbc0_row4_col4\" class=\"data row4 col4\" >0.5872</td>\n", | |
" <td id=\"T_dfbc0_row4_col5\" class=\"data row4 col5\" >0.4765</td>\n", | |
" <td id=\"T_dfbc0_row4_col6\" class=\"data row4 col6\" >0.3207</td>\n", | |
" <td id=\"T_dfbc0_row4_col7\" class=\"data row4 col7\" >0.3451</td>\n", | |
" <td id=\"T_dfbc0_row4_col8\" class=\"data row4 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row4_col9\" class=\"data row4 col9\" >0.5120</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row5\" class=\"row_heading level0 row5\" >ridge</th>\n", | |
" <td id=\"T_dfbc0_row5_col0\" class=\"data row5 col0\" >Ridge Classifier</td>\n", | |
" <td id=\"T_dfbc0_row5_col1\" class=\"data row5 col1\" >0.8010</td>\n", | |
" <td id=\"T_dfbc0_row5_col2\" class=\"data row5 col2\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row5_col3\" class=\"data row5 col3\" >0.5084</td>\n", | |
" <td id=\"T_dfbc0_row5_col4\" class=\"data row5 col4\" >0.6647</td>\n", | |
" <td id=\"T_dfbc0_row5_col5\" class=\"data row5 col5\" >0.5755</td>\n", | |
" <td id=\"T_dfbc0_row5_col6\" class=\"data row5 col6\" >0.4486</td>\n", | |
" <td id=\"T_dfbc0_row5_col7\" class=\"data row5 col7\" >0.4559</td>\n", | |
" <td id=\"T_dfbc0_row5_col8\" class=\"data row5 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row5_col9\" class=\"data row5 col9\" >0.4740</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row6\" class=\"row_heading level0 row6\" >rf</th>\n", | |
" <td id=\"T_dfbc0_row6_col0\" class=\"data row6 col0\" >Random Forest Classifier</td>\n", | |
" <td id=\"T_dfbc0_row6_col1\" class=\"data row6 col1\" >0.7927</td>\n", | |
" <td id=\"T_dfbc0_row6_col2\" class=\"data row6 col2\" >0.8232</td>\n", | |
" <td id=\"T_dfbc0_row6_col3\" class=\"data row6 col3\" >0.4992</td>\n", | |
" <td id=\"T_dfbc0_row6_col4\" class=\"data row6 col4\" >0.6407</td>\n", | |
" <td id=\"T_dfbc0_row6_col5\" class=\"data row6 col5\" >0.5604</td>\n", | |
" <td id=\"T_dfbc0_row6_col6\" class=\"data row6 col6\" >0.4277</td>\n", | |
" <td id=\"T_dfbc0_row6_col7\" class=\"data row6 col7\" >0.4338</td>\n", | |
" <td id=\"T_dfbc0_row6_col8\" class=\"data row6 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row6_col9\" class=\"data row6 col9\" >0.9950</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row7\" class=\"row_heading level0 row7\" >qda</th>\n", | |
" <td id=\"T_dfbc0_row7_col0\" class=\"data row7 col0\" >Quadratic Discriminant Analysis</td>\n", | |
" <td id=\"T_dfbc0_row7_col1\" class=\"data row7 col1\" >0.6661</td>\n", | |
" <td id=\"T_dfbc0_row7_col2\" class=\"data row7 col2\" >0.8201</td>\n", | |
" <td id=\"T_dfbc0_row7_col3\" class=\"data row7 col3\" >0.8670</td>\n", | |
" <td id=\"T_dfbc0_row7_col4\" class=\"data row7 col4\" >0.4409</td>\n", | |
" <td id=\"T_dfbc0_row7_col5\" class=\"data row7 col5\" >0.5810</td>\n", | |
" <td id=\"T_dfbc0_row7_col6\" class=\"data row7 col6\" >0.3531</td>\n", | |
" <td id=\"T_dfbc0_row7_col7\" class=\"data row7 col7\" >0.4134</td>\n", | |
" <td id=\"T_dfbc0_row7_col8\" class=\"data row7 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row7_col9\" class=\"data row7 col9\" >0.5610</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row8\" class=\"row_heading level0 row8\" >ada</th>\n", | |
" <td id=\"T_dfbc0_row8_col0\" class=\"data row8 col0\" >Ada Boost Classifier</td>\n", | |
" <td id=\"T_dfbc0_row8_col1\" class=\"data row8 col1\" >0.8034</td>\n", | |
" <td id=\"T_dfbc0_row8_col2\" class=\"data row8 col2\" >0.8471</td>\n", | |
" <td id=\"T_dfbc0_row8_col3\" class=\"data row8 col3\" >0.5359</td>\n", | |
" <td id=\"T_dfbc0_row8_col4\" class=\"data row8 col4\" >0.6612</td>\n", | |
" <td id=\"T_dfbc0_row8_col5\" class=\"data row8 col5\" >0.5915</td>\n", | |
" <td id=\"T_dfbc0_row8_col6\" class=\"data row8 col6\" >0.4640</td>\n", | |
" <td id=\"T_dfbc0_row8_col7\" class=\"data row8 col7\" >0.4688</td>\n", | |
" <td id=\"T_dfbc0_row8_col8\" class=\"data row8 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row8_col9\" class=\"data row8 col9\" >1.0610</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row9\" class=\"row_heading level0 row9\" >gbc</th>\n", | |
" <td id=\"T_dfbc0_row9_col0\" class=\"data row9 col0\" >Gradient Boosting Classifier</td>\n", | |
" <td id=\"T_dfbc0_row9_col1\" class=\"data row9 col1\" >0.8024</td>\n", | |
" <td id=\"T_dfbc0_row9_col2\" class=\"data row9 col2\" >0.8486</td>\n", | |
" <td id=\"T_dfbc0_row9_col3\" class=\"data row9 col3\" >0.5237</td>\n", | |
" <td id=\"T_dfbc0_row9_col4\" class=\"data row9 col4\" >0.6621</td>\n", | |
" <td id=\"T_dfbc0_row9_col5\" class=\"data row9 col5\" >0.5844</td>\n", | |
" <td id=\"T_dfbc0_row9_col6\" class=\"data row9 col6\" >0.4572</td>\n", | |
" <td id=\"T_dfbc0_row9_col7\" class=\"data row9 col7\" >0.4628</td>\n", | |
" <td id=\"T_dfbc0_row9_col8\" class=\"data row9 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row9_col9\" class=\"data row9 col9\" >1.1630</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row10\" class=\"row_heading level0 row10\" >lda</th>\n", | |
" <td id=\"T_dfbc0_row10_col0\" class=\"data row10 col0\" >Linear Discriminant Analysis</td>\n", | |
" <td id=\"T_dfbc0_row10_col1\" class=\"data row10 col1\" >0.7998</td>\n", | |
" <td id=\"T_dfbc0_row10_col2\" class=\"data row10 col2\" >0.8385</td>\n", | |
" <td id=\"T_dfbc0_row10_col3\" class=\"data row10 col3\" >0.5604</td>\n", | |
" <td id=\"T_dfbc0_row10_col4\" class=\"data row10 col4\" >0.6415</td>\n", | |
" <td id=\"T_dfbc0_row10_col5\" class=\"data row10 col5\" >0.5977</td>\n", | |
" <td id=\"T_dfbc0_row10_col6\" class=\"data row10 col6\" >0.4653</td>\n", | |
" <td id=\"T_dfbc0_row10_col7\" class=\"data row10 col7\" >0.4675</td>\n", | |
" <td id=\"T_dfbc0_row10_col8\" class=\"data row10 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row10_col9\" class=\"data row10 col9\" >0.5660</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row11\" class=\"row_heading level0 row11\" >et</th>\n", | |
" <td id=\"T_dfbc0_row11_col0\" class=\"data row11 col0\" >Extra Trees Classifier</td>\n", | |
" <td id=\"T_dfbc0_row11_col1\" class=\"data row11 col1\" >0.7765</td>\n", | |
" <td id=\"T_dfbc0_row11_col2\" class=\"data row11 col2\" >0.7952</td>\n", | |
" <td id=\"T_dfbc0_row11_col3\" class=\"data row11 col3\" >0.4839</td>\n", | |
" <td id=\"T_dfbc0_row11_col4\" class=\"data row11 col4\" >0.5986</td>\n", | |
" <td id=\"T_dfbc0_row11_col5\" class=\"data row11 col5\" >0.5344</td>\n", | |
" <td id=\"T_dfbc0_row11_col6\" class=\"data row11 col6\" >0.3896</td>\n", | |
" <td id=\"T_dfbc0_row11_col7\" class=\"data row11 col7\" >0.3939</td>\n", | |
" <td id=\"T_dfbc0_row11_col8\" class=\"data row11 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row11_col9\" class=\"data row11 col9\" >1.0070</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row12\" class=\"row_heading level0 row12\" >lightgbm</th>\n", | |
" <td id=\"T_dfbc0_row12_col0\" class=\"data row12 col0\" >Light Gradient Boosting Machine</td>\n", | |
" <td id=\"T_dfbc0_row12_col1\" class=\"data row12 col1\" >0.7945</td>\n", | |
" <td id=\"T_dfbc0_row12_col2\" class=\"data row12 col2\" >0.8378</td>\n", | |
" <td id=\"T_dfbc0_row12_col3\" class=\"data row12 col3\" >0.5275</td>\n", | |
" <td id=\"T_dfbc0_row12_col4\" class=\"data row12 col4\" >0.6379</td>\n", | |
" <td id=\"T_dfbc0_row12_col5\" class=\"data row12 col5\" >0.5762</td>\n", | |
" <td id=\"T_dfbc0_row12_col6\" class=\"data row12 col6\" >0.4424</td>\n", | |
" <td id=\"T_dfbc0_row12_col7\" class=\"data row12 col7\" >0.4467</td>\n", | |
" <td id=\"T_dfbc0_row12_col8\" class=\"data row12 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row12_col9\" class=\"data row12 col9\" >0.6450</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_dfbc0_level0_row13\" class=\"row_heading level0 row13\" >dummy</th>\n", | |
" <td id=\"T_dfbc0_row13_col0\" class=\"data row13 col0\" >Dummy Classifier</td>\n", | |
" <td id=\"T_dfbc0_row13_col1\" class=\"data row13 col1\" >0.7347</td>\n", | |
" <td id=\"T_dfbc0_row13_col2\" class=\"data row13 col2\" >0.5000</td>\n", | |
" <td id=\"T_dfbc0_row13_col3\" class=\"data row13 col3\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col4\" class=\"data row13 col4\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col5\" class=\"data row13 col5\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col6\" class=\"data row13 col6\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col7\" class=\"data row13 col7\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col8\" class=\"data row13 col8\" >0.0000</td>\n", | |
" <td id=\"T_dfbc0_row13_col9\" class=\"data row13 col9\" >0.5490</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n" | |
] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Processing: 0%| | 0/61 [00:00<?, ?it/s]" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "3783b94292274cf89f942f27877077d5" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/b3e629b1971e1542/manager.min.js" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
], | |
"text/html": [] | |
}, | |
"metadata": {} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Yard1