{"id":385073,"date":"2024-06-29T05:53:48","date_gmt":"2024-06-29T05:53:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=385073"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=385073","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Python. \u0427\u0430\u0441\u0442\u044c 1. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u043c\u044b<\/h3>\n<p>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 DataScience. \u041a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u0432 [1], \u043c\u044b \u0436\u0438\u0432\u0435\u043c \u0432 \u043c\u0438\u0440\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 &#8212; \u043e\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u0430 \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u0434\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441\u043e\u0446\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0427\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437 <strong>\u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (contingency tables)<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0438\u0445 <strong>\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/strong>. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e &#8212; \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <strong>python<\/strong>, \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u044e\u0430\u043d\u0441\u044b &#8212; \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 <strong>python<\/strong>. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0435\u0441\u0442\u044c \u043e \u0447\u0435\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c&#8230;<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0437\u043e\u0440\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a\u0438 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap).<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0439 (\u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &#8212; \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/hr-portal.ru\/statistica\/gl7\/gl7.php\" rel=\"noopener noreferrer nofollow\">https:\/\/hr-portal.ru\/statistica\/gl7\/gl7.php<\/a>) &#8212; \u043d\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445, \u0438\u0431\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u044a\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u044a\u044f\u0442\u043d\u043e\u0435, \u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u0432\u043e\u043b\u0435\u043d \u0441\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0431\u0435 \u043f\u043e \u0434\u0443\u0448\u0435.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h4>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043e\u0431\u0437\u043e\u0440\u0430\u0445, \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f <strong>my_module__stat.py<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (<a href=\"https:\/\/github.com\/AANazarov\/MyModulePython\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/AANazarov\/MyModulePython<\/a>).<\/p>\n<p>\u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>df_detection_values<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u0432 <strong>DataFrame<\/strong>: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043d\u0430 \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 (<strong>heatmap<\/strong>) \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u044f\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 (\u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <strong>my_module__stat.py<\/strong>):<\/p>\n<ul>\n<li>\n<p><strong>graph_contingency_tables_hist_3D<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0445 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_mosaicplot_sm<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>make_color_mosaicplot_dict<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict) \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>graph_contingency_tables_mosaicplot_sm<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_bar_freqint<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_heatmap<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<h4>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h4>\n<p><strong>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u043d\u044b\u043c\u0438 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u043d\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0443\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c. \u0418\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <strong>python<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d<\/strong> (<a href=\"https:\/\/matplotlib.org\/stable\/api\/_as_gen\/mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/api\/_as_gen\/mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d.html<\/a>); \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u043e\u0441\u044f\u043c\u0438 \u0438 \u043f\u0440.); \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/3d_bars.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/3d_bars.html<\/a>, <a href=\"https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/hist3d.html#\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/hist3d.html#<\/a>, <a href=\"https:\/\/coderslegacy.com\/python\/3d-bar-chart-matplotlib\/\" rel=\"noopener noreferrer nofollow\">https:\/\/coderslegacy.com\/python\/3d-bar-chart-matplotlib\/<\/a>, <a href=\"https:\/\/pythonprogramming.net\/3d-bar-chart-matplotlib-tutorial\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pythonprogramming.net\/3d-bar-chart-matplotlib-tutorial\/<\/a>.<\/p>\n<pre><code class=\"python\">def graph_contingency_tables_hist_3D(     data_df_in: pd.core.frame.DataFrame = None,     data_XY_list_in: list = None,     title_figure = None, title_figure_fontsize = 14,     title_axes = None, title_axes_fontsize = 16,     rows_label = None, cols_label = None, vertical_label = None, label_fontsize = 14,      rows_ticklabels_list = None, cols_ticklabels_list = None,     tick_fontsize = 11, rows_tick_rotation = 0, cols_tick_rotation = 0,      legend = None, legend_fontsize = 14,     labelpad = 20,     color=None,     tight_layout=True,     graph_size = (297\/INCH, 210\/INCH),     file_name = None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0445 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c      Args:         data_df_in (pd.core.frame.DataFrame, optional): \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - dataframe). Defaults to None.         data_XY_list_in (list, optional):               \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - list). Defaults to None.         title_figure (_type_, optional):                \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to None.         title_figure_fontsize (int, optional):          \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to 14.         title_axes (_type_, optional):                  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to None.         title_axes_fontsize (int, optional):            \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to 16.         rows_label (_type_, optional):                  \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 (\u043f\u043e \u0441\u0440\u043e\u043a\u0430\u043c). Defaults to None.         cols_label (_type_, optional):                  \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to None.         vertical_label (_type_, optional):              \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438. Defaults to None.         label_fontsize (int, optional):                 \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043e\u0441\u0435\u0439. Defaults to 14.         rows_ticklabels_list (_type_, optional):        \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c). Defaults to None.         cols_ticklabels_list (_type_, optional):        \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to None.         tick_fontsize (int, optional):                  \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439. Defaults to 11.         rows_tick_rotation (int, optional):             \u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c). Defaults to 0.         cols_tick_rotation (int, optional):             \u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to 0.         legend (_type_, optional):                      \u0422\u0435\u043a\u0441\u0442 \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to None.         legend_fontsize (int, optional):                \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to 14.         labelpad (int, optional):                       \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043e\u0441\u044c\u044e \u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438. Defaults to 20.         color (_type_, optional):                       \u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to None.         tight_layout (bool, optional):                  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         graph_size (tuple, optional):                   \u0420\u0430\u0437\u043c\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to (297\/INCH, 210\/INCH).         file_name (_type_, optional):                   \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. Defaults to None.     \"\"\"               # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure) \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     fig = plt.figure(figsize=graph_size)     ax = plt.axes(projection = \"3d\")     #ax = fig.gca(projection='3d')     fig.suptitle(title_figure, fontsize = title_figure_fontsize)     ax.set_title(title_axes, fontsize = title_axes_fontsize)              # \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if data_df_in is not None:         data = np.array(data_df_in)         NumOfCols = data_df_in.shape[1]         NumOfRows = data_df_in.shape[0]     else:         data = np.array(data_XY_list_in)         NumOfCols = np.shape(data)[1]         NumOfRows = np.shape(data)[0]                      # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     xpos = np.arange(0, NumOfCols, 1)     ypos = np.arange(0, NumOfRows, 1)              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0442\u043a\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442     xpos, ypos = np.meshgrid(xpos + 0.5, ypos + 0.5)     xpos = xpos.flatten()     ypos = ypos.flatten()          # \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u043b\u044f zpos \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u0443\u043b\u044f     zpos = np.zeros(NumOfCols * NumOfRows)              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     dx = np.ones(NumOfRows * NumOfCols) * 0.5     dy = np.ones(NumOfCols * NumOfRows) * 0.5              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     dz = data.flatten()                  # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if not color:         ax.bar3d(xpos, ypos, zpos, dx, dy, dz)     else:         ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color=color)                  # \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0441\u0435\u0439     x_label = cols_label if cols_label else ''     y_label = rows_label if rows_label else ''     z_label = vertical_label if vertical_label else ''          ax.set_xlabel(x_label, fontsize = label_fontsize)     ax.set_ylabel(y_label, fontsize = label_fontsize)     ax.set_zlabel(z_label, fontsize = label_fontsize)          # \u043c\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439     x_ticklabels_list = cols_ticklabels_list if cols_ticklabels_list \\         else list(data_df.columns) if (data_df is not None) else ''     y_ticklabels_list = rows_ticklabels_list if rows_ticklabels_list \\         else list(data_df.index) if data_df is not None else ''          # \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439 (https:\/\/matplotlib.org\/stable\/api\/ticker_api.html)     ax.xaxis.set_major_locator(IndexLocator(1.0, 0.25))     ax.yaxis.set_major_locator(IndexLocator(1.0, 0.25))              # \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439     ax.set_xticklabels(x_ticklabels_list, fontsize = tick_fontsize, rotation=rows_tick_rotation)     ax.set_yticklabels(y_ticklabels_list, fontsize = tick_fontsize, rotation=cols_tick_rotation)          # \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u044f\u043c\u0438 \u043e\u0441\u0435\u0439 \u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u043e\u0441\u0435\u0439     ax.xaxis.labelpad = labelpad     ax.yaxis.labelpad = labelpad          # \u043b\u0435\u0433\u0435\u043d\u0434\u0430     if legend:         b1 = plt.Rectangle((0, 0), 1, 1)         ax.legend([b1], [legend], prop={'size': legend_fontsize})              # \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if tight_layout:         fig.tight_layout()              # \u0432\u044b\u0432\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     plt.show()     if file_name:         fig.savefig(file_name, orientation = \"portrait\", dpi = 300)              return<\/code><\/pre>\n<h4>\u041c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/h4>\n<p><strong>\u041c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b (\u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u041c\u0430\u0440\u0438\u043c\u0435\u043a\u043a\u043e)<\/strong> \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b \u043a\u0430\u043a \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c, \u0442\u0430\u043a \u0438 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043b\u0430\u043d\u0435. \u0418\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <strong>python<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>statsmodels.graphics.mosaicplot.mosaic<\/strong> (<a href=\"https:\/\/www.statsmodels.org\/dev\/generated\/statsmodels.graphics.mosaicplot.mosaic.html\" rel=\"noopener noreferrer nofollow\">https:\/\/www.statsmodels.org\/dev\/generated\/statsmodels.graphics.mosaicplot.mosaic.html<\/a>); \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0446\u0432\u0435\u0442\u043e\u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f (dict), \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>make_color_mosaicplot_dict<\/strong>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0438\u0437 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b (\u0441\u043c., \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/towardsdatascience.com\/marimekko-charts-with-pythons-matplotlib-6b9784ae73a1\" rel=\"noopener noreferrer nofollow\">https:\/\/towardsdatascience.com\/marimekko-charts-with-pythons-matplotlib-6b9784ae73a1<\/a>), \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<pre><code class=\"python\">def graph_contingency_tables_mosaicplot_sm(     data_df_in: pd.core.frame.DataFrame = None,     data_XY_list_in: list = None,     properties: dict = {},     labelizer: bool = True,     title_figure = None, title_figure_fontsize = 12,     title_axes = None, title_axes_fontsize = 16,     x_label = None, y_label = None, label_fontsize = 14,      x_ticklabels_list = None, y_ticklabels_list = None,     x_ticklabels: bool = True, y_ticklabels: bool = True,     #tick_fontsize = 11,     tick_label_rotation = 0,     legend_list = None, legend_fontsize = 11,     text_fontsize = 16,     gap = 0.005,     horizontal: bool = True,     statistic: bool = True,     tight_layout=True,     graph_size = (297\/INCH, 210\/INCH),     file_name = None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c      Args:         data_df_in (pd.core.frame.DataFrame, optional): \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - DataFrame). Defaults to None.         data_XY_list_in (list, optional):               \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - list). Defaults to None.         properties (dict, optional):                    \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0446\u0432\u0435\u0442, \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0430 \u0438 \u043f\u0440.). Defaults to {}.         labelizer (bool, optional):                     \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0438\u0442\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to True.         title_figure (_type_, optional):                \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to None.         title_figure_fontsize (int, optional):          \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to 12.         title_axes (_type_, optional):                  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to None.         title_axes_fontsize (int, optional):            \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to 16.         x_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OX. Defaults to None.         y_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OY. Defaults to None.         label_fontsize (int, optional):                 \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439. Defaults to 14.         x_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OX. Defaults to None.         y_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OY. Defaults to None.         x_ticklabels (bool, optional):                  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 (\u0434\u0430\/\u043d\u0435\u0442, True\/False) \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u043e\u0441\u0438 OX. Defaults to True.         y_ticklabels (bool, optional):                  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 (\u0434\u0430\/\u043d\u0435\u0442, True\/False) \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u043e\u0441\u0438 OY. Defaults to True.         tick_fontsize (int, optional):                  \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e. Defaults to 11.         tick_label_rotation (int, optional):            \u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438. Defaults to 0.         legend_list (_type_, optional):                 \u0421\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to None.         legend_fontsize (int, optional):                \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to 11.         text_fontsize (int, optional):                  \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to 16.         gap (float, optional):                          \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0437\u043e\u0440\u043e\u0432. Defaults to 0.005.         horizontal (bool, optional):                    \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f. Defaults to True.         statistic (bool, optional):                     \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0443 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         tight_layout (bool, optional):                  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         graph_size (tuple, optional):                   \u0420\u0430\u0437\u043c\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to (297\/INCH, 210\/INCH).         file_name (_type_, optional):                   \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. Defaults to None.     \"\"\"          # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure) \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     fig, axes = plt.subplots(figsize=graph_size)     fig.suptitle(title_figure, fontsize = title_figure_fontsize)     axes.set_title(title_axes, fontsize = title_axes_fontsize)          # \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if data_df_in is not None:         data_df = data_df_in.copy()         if x_ticklabels_list:             data_df = data_df.set_index(pd.Index(x_ticklabels_list))     else:         data_df = pd.DataFrame(data_XY_list_in)         if x_ticklabels_list:             data_df = data_df.set_index(pd.Index(x_ticklabels_list))         if y_ticklabels_list:             data_df.columns = y_ticklabels_list              data_np = np.array(data_XY_list_in) if data_XY_list_in is not None \\         else np.array(data_df_in)          # \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0435\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430      if text_fontsize:         plt.rcParams[\"font.size\"] = text_fontsize                  # \u043c\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439     if data_df is not None:         x_list = list(map(str, x_ticklabels_list)) if x_ticklabels_list \\             else list(map(str, data_df.index))         y_list = list(map(str, y_ticklabels_list)) if y_ticklabels_list \\             else list(map(str, data_df.columns))     else:         x_list = list(map(str, x_ticklabels_list)) if x_ticklabels_list \\             else list(map(str, range(data_np.shape[0])))         y_list = list(map(str, y_ticklabels_list)) if y_ticklabels_list \\             else list(map(str, range(data_np.shape[1])))              if not labelizer:         if not x_ticklabels:             axes.tick_params(axis='x', colors='white')         if not y_ticklabels:             axes.tick_params(axis='y', colors='white')      # \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0441\u0435\u0439     x_label = x_label if x_label else ''     y_label = y_label if y_label else ''              axes.set_xlabel(x_label, fontsize = label_fontsize)     axes.set_ylabel(y_label, fontsize = label_fontsize)                                               # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict) data     data_dict = {}     for i, x in enumerate(x_list):         for j, y in enumerate(y_list):             data_dict[(x, y)] = data_np[i, j]     print(f'data_dict = \\n{data_dict}')                  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict) labelizer \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e labelizer_func     labelizer_dict = {}     for i, x in enumerate(x_list):         for j, y in enumerate(y_list):             labelizer_dict[(x, y)] = data_np[i, j] if labelizer else ''     labelizer_func = lambda k: labelizer_dict[k]            # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     from statsmodels.graphics.mosaicplot import mosaic     mosaic(data_dict,            title=title_axes,            statistic=statistic,            ax=axes,            horizontal=horizontal,            gap=gap,            label_rotation=tick_label_rotation,            #axes_label=False,            labelizer=labelizer_func,            properties=properties)                  # \u043b\u0435\u0433\u0435\u043d\u0434\u0430     if legend_list:         axes.legend(legend_list,                     bbox_to_anchor=(1, 0.5),                     loc=\"center left\",                     #mode=\"expand\",                     ncol=1)              # \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if tight_layout:         fig.tight_layout()              # \u0432\u044b\u0432\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     plt.show()     if file_name:         fig.savefig(file_name, orientation = \"portrait\", dpi = 300)          # \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0435\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e     if text_fontsize:         plt.rcParams[\"font.size\"] = 10                  return<\/code><\/pre>\n<h4> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0432\u0435\u0442\u0430 \u0432 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445<\/h4>\n<p> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0446\u0432\u0435\u0442\u0430 \u0432 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#8212; \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 2\u04452.<\/p>\n<\/li>\n<li>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u043e\u0432\u0430\u0440\u044f (dict).<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e \u0446\u0432\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0438\u0442\u043a\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>make_color_mosaicplot_dict<\/strong>:<\/p>\n<pre><code class=\"python\">def make_color_mosaicplot_dict(         rows_list, cols_list,          props_dict_rows=None,         props_dict_cols=None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043b\u0438\u0442\u043e\u043a \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0446\u0432\u0435\u0442, \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0430 \u0438 \u043f\u0440.) \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 graph_contingency_tables_mosaicplot_sm      Args:         rows_list (_type_):                 \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c)         cols_list (_type_):                 \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c)         props_dict_rows (_type_, optional): \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c). Defaults to None.         props_dict_cols (_type_, optional): \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to None.      Returns:         _type_: \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043b\u0438\u0442\u043e\u043a \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0446\u0432\u0435\u0442, \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0430 \u0438 \u043f\u0440.) \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 graph_contingency_tables_mosaicplot_sm     \"\"\"          result = {}     rows = list(map(str, rows_list))     cols = list(map(str, cols_list))          if props_dict_rows:         for col in cols:             for row in rows:                 result[(col, row)] = {'facecolor': props_dict_rows[row]}          if props_dict_cols:         for col in cols:             for row in rows:                 result[(col, row)] = {'facecolor': props_dict_cols[col]}          return result    <\/code><\/pre>\n<p><em><u>\u0421\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/u><\/em><\/p>\n<p>\u0421\u0442\u0430\u0440\u0430\u044f \u0434\u043e\u0431\u0440\u0430\u044f \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 <strong>pandas.DataFrame.plot.bar<\/strong> (<a href=\"https:\/\/pandas.pydata.org\/pandas-docs\/stable\/reference\/api\/pandas.DataFrame.plot.bar.html\" rel=\"noopener noreferrer nofollow\">https:\/\/pandas.pydata.org\/pandas-docs\/stable\/reference\/api\/pandas.DataFrame.plot.bar.html<\/a>) \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442, \u0433\u0440\u0430\u0444\u0438\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442.<\/p>\n<p>\u041d\u0430 <strong>\u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0421\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u043a\u0441\u043f\u0440\u0435\u0441\u0441-\u043e\u0446\u0435\u043d\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0439 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0441\u0432\u044f\u0437\u044c; \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0432\u044f\u0437\u0438), \u043d\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 2\u04452 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c &#8212; \u0441\u043c. \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, [3], <a href=\"https:\/\/cyberleninka.ru\/article\/n\/razrabotka-vizualnogo-metoda-issledovaniya-zavisimosti-kategorialnyh-peremennyh-na-osnove-tablits-sopryazhennosti\/viewer\" rel=\"noopener noreferrer nofollow\">https:\/\/cyberleninka.ru\/article\/n\/razrabotka-vizualnogo-metoda-issledovaniya-zavisimosti-kategorialnyh-peremennyh-na-osnove-tablits-sopryazhennosti\/viewer<\/a>). \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0433\u0438\u043f\u043e\u0442\u0435\u0437.<\/p>\n<pre><code class=\"python\">  def graph_contingency_tables_bar_freqint(     data_df_in: pd.core.frame.DataFrame = None,     data_XY_list_in: list = None,     graph_inclusion='arf',     title_figure=None, title_figure_fontsize=14, title_axes_fontsize=11,     x_label = None, y_label = None, label_fontsize = 11,      x_ticklabels_list = None, y_ticklabels_list = None, #tick_fontsize = 11,     color = None,     tight_layout=True,     result_output=False,     graph_size=None,     file_name=None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442      Args:         data_df_in (pd.core.frame.DataFrame, optional): \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - DataFrame). Defaults to None.         data_XY_list_in (list, optional):               \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - list). Defaults to None.         graph_inclusion (str, optional):                \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0440\u043e\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f:                                                             'a' - \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 (\u0432 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445)                                                             'r' - \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 (\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445)                                                             'f' - \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442                                                             Defaults to 'arf'.         title_figure (_type_, optional):                \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to None.         title_figure_fontsize (int, optional):          \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to 14.         title_axes_fontsize (int, optional):            \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to 11.         x_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OX. Defaults to None.         y_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OY. Defaults to None.         label_fontsize (int, optional):                 \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043f\u043e \u043e\u0441\u044f\u043c_. Defaults to 11.         x_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OX. Defaults to None.         y_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OY. Defaults to None.         tick_fontsize (int, optional):                  \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e. Defaults to 11.         color (_type_, optional):                       \u0421\u043f\u0438\u0441\u043e\u043a, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442\u0430 \u0434\u043b\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. Defaults to None.         tight_layout (bool, optional):                  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         result_output (bool, optional):                 \u0412\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (DataFrame) c \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (\u0434\u0430\/\u043d\u0435\u0442\u0431 True\/False). Defaults to False.         graph_size (_type_, optional):                  \u0420\u0430\u0437\u043c\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to None.         file_name (_type_, optional):                   \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. Defaults to None.     \"\"\"          # \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if data_df_in is not None:         data_df_abs = data_df_in.copy()         if x_ticklabels_list:             data_df_abs = data_df_abs.set_index(pd.Index(x_ticklabels_list))         if y_ticklabels_list:             data_df_abs.columns = y_ticklabels_list     else:         data_df_abs = pd.DataFrame(data_XY_list_in)         if x_ticklabels_list:             data_df_abs = data_df_abs.set_index(pd.Index(x_ticklabels_list))         if y_ticklabels_list:             data_df_abs.columns = y_ticklabels_list     data_df_rel = None          data_np = np.array(data_XY_list_in) if data_XY_list_in is not None \\         else np.array(data_df_in)          # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     count_graph = len(graph_inclusion)    # \u0447\u0438\u0441\u043b\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432     ax_rows = 1     ax_cols = count_graph    # \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)          # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure) \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     graph_size_dict = {         1: (297\/INCH*0.75, 210\/INCH),         2: (297\/INCH*1.5,  210\/INCH),         3: (297\/INCH*2.25, 210\/INCH)}          if not(graph_size):         graph_size = graph_size_dict[count_graph]          fig = plt.figure(figsize=graph_size)          if count_graph == 3:         ax1 = plt.subplot(1,3,1)         ax2 = plt.subplot(1,3,2)         ax3 = plt.subplot(1,3,3)     elif count_graph == 2:         ax1 = plt.subplot(1,2,1)         ax2 = plt.subplot(1,2,2)     elif count_graph == 1:         ax1 = plt.subplot(1,1,1)              # \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure)     fig.suptitle(title_figure, fontsize = title_figure_fontsize)          # \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 (\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)     if 'a' in graph_inclusion:         if color:             data_df_abs.plot.bar(                 color = color,                 stacked=True,                 rot=0,                 legend=True,                 ax=ax1)         else:             data_df_abs.plot.bar(                 #color = color_list,                 stacked=True,                 rot=0,                 legend=True,                 ax=ax1)         ax1.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)         ax1.set_title('Absolute values', fontsize=title_axes_fontsize)         ax1.set_xlabel(x_label, fontsize = label_fontsize)         ax1.set_ylabel(y_label, fontsize = label_fontsize)                  # \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)     if 'r' in graph_inclusion:         data_df_rel = data_df_abs.copy()         sum_data = np.sum(data_np)         data_df_abs.sum(axis=1)                  for col in data_df_rel.columns:             data_df_rel[col] = data_df_rel[col] \/ data_df_abs.sum(axis=1)                  if color:             data_df_rel.plot.bar(                 color = color,                 stacked=True,                 rot=0,                 legend=True,                 ax = ax1 if (graph_inclusion == 'r') or (graph_inclusion == 'rf') else ax2,                 alpha = 0.5)         else:             data_df_rel.plot.bar(                 #color = color,                 stacked=True,                 rot=0,                 legend=True,                 ax = ax1 if (graph_inclusion == 'r') or (graph_inclusion == 'rf') else ax2,                 alpha = 0.5)                  if (graph_inclusion == 'r') or (graph_inclusion == 'rf'):             ax1.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)             ax1.set_title('Relative values', fontsize=title_axes_fontsize)             ax1.set_xlabel(x_label, fontsize = label_fontsize)             ax1.set_ylabel(y_label, fontsize = label_fontsize)         else:             ax2.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)             ax2.set_title('Relative values', fontsize=title_axes_fontsize)             ax2.set_xlabel(x_label, fontsize = label_fontsize)             ax2.set_ylabel(y_label, fontsize = label_fontsize)                                  # \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442     if 'f' in graph_inclusion:         if color:             sns.lineplot(                 data=data_df_abs,                 palette = color,                 dashes=False,                 lw=3,                 #markers=['o','o'],                 markersize=10,                 ax=ax1 if (graph_inclusion == 'f') else ax3 if (graph_inclusion == 'arf') else ax2)         else:             sns.lineplot(                 data=data_df_abs,                 #palette = color,                 dashes=False,                 lw=3,                 #markers=['o','o'],                 markersize=10,                 ax=ax1 if (graph_inclusion == 'f') else ax3 if (graph_inclusion == 'arf') else ax2)                  if (graph_inclusion == 'f'):             ax1.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)             ax1.set_title('Graph of frequency interactions', fontsize=title_axes_fontsize)             ax1.set_xlabel(x_label, fontsize = label_fontsize)             ax1.set_ylabel(y_label, fontsize = label_fontsize)         elif (graph_inclusion == 'arf'):             ax3.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)             ax3.set_title('Graph of frequency interactions', fontsize=title_axes_fontsize)             ax3.set_xlabel(x_label, fontsize = label_fontsize)             ax3.set_ylabel(y_label, fontsize = label_fontsize)         else:             ax2.legend(loc='best', fontsize = 12, title=data_df_abs.columns.name)             ax2.set_title('Graph of frequency interactions', fontsize=title_axes_fontsize)             ax2.set_xlabel(x_label, fontsize = label_fontsize)             ax2.set_ylabel(y_label, fontsize = label_fontsize)          # \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if tight_layout:         fig.tight_layout()          # \u0432\u044b\u0432\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     plt.show()     if file_name:         fig.savefig(file_name, orientation = \"portrait\", dpi = 300)              # \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430     if result_output:         data_df_abs['sum'] = data_df_abs.sum(axis=1)         if data_df_rel is not None:             data_df_rel['sum'] = data_df_rel.sum(axis=1)             print('\\nAbsolute values:')             display(data_df_abs)             print('\\nRelative values:')             display(data_df_rel)         else:             print('\\nAbsolute values:')             display(data_df_abs)          return <\/code><\/pre>\n<h4>\u0413\u0440\u0430\u0444\u0438\u043a \u00ab\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b\u00bb (heatmap)<\/h4>\n<p><strong>\u0413\u0440\u0430\u0444\u0438\u043a &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/strong> \u0432\u0435\u0441\u044c\u043c\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <strong>python<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>seaborn.heatmap<\/strong> (<a href=\"https:\/\/seaborn.pydata.org\/generated\/seaborn.heatmap.html\" rel=\"noopener noreferrer nofollow\">https:\/\/seaborn.pydata.org\/generated\/seaborn.heatmap.html<\/a>). \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445, \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442 (\u0434\u043e\u043b\u0435\u0439); \u043d\u0443 \u0438 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u0443\u044e \u0448\u043a\u0430\u043b\u0443 (<a href=\"https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html<\/a>).<\/p>\n<pre><code class=\"python\">def graph_contingency_tables_heatmap(     data_df_in: pd.core.frame.DataFrame = None,     data_XY_list_in: list = None,     title_figure = None, title_figure_fontsize = 12,     title_axes = None, title_axes_fontsize = 14,     x_label = None, y_label = None, #label_fontsize = 11,      x_ticklabels_list = None, y_ticklabels_list = None, #tick_fontsize = 11,     values_type = 'absolute',     color_map='binary',     robust = False,     fmt = '.0f',     tight_layout=True,     #result_output = False,     graph_size = (297\/INCH\/2, 210\/INCH\/2),     file_name = None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b (heatmap)      Args:         data_df_in (pd.core.frame.DataFrame, optional): \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - DataFrame). Defaults to None.         data_XY_list_in (list, optional):               \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - list). Defaults to None.         title_figure (_type_, optional):                \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to None.         title_figure_fontsize (int, optional):          \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to 12.         title_axes (_type_, optional):                  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to None.         title_axes_fontsize (int, optional):            \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to 14.         x_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OX. Defaults to None.         y_label (_type_, optional):                     \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 OY. Defaults to None.         label_fontsize (int, optional):                 \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e. Defaults to 11.         x_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OX. Defaults to None.         y_ticklabels_list (_type_, optional):           \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 OY. Defaults to None.         tick_fontsize (int, optional):                  \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e. Defaults to 11.         values_type (str, optional):                    \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0432 \u043a\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0433\u0440\u0430\u0444\u0438\u043a:                                                             \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435\/\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, absolute\/relative.                                                             Defaults to 'absolute'.         color_map (str, optional):                      \u0426\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0430 (colormap) \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to 'binary'.         robust (bool, optional):                        \u0415\u0441\u043b\u0438 True \u0438 vmin \u0438\u043b\u0438 vmax \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f                                                             \u0441 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044f\u043c\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. Defaults to False.         fmt (str, optional):                            \u0427\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to '.0f'.         tight_layout (bool, optional):                  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         graph_size (tuple, optional):                   \u0420\u0430\u0437\u043c\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to (297\/INCH\/2, 210\/INCH\/2).         file_name (_type_, optional):                   \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. Defaults to None.     \"\"\"          # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure) \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     fig, axes = plt.subplots(figsize=graph_size)     fig.suptitle(title_figure, fontsize = title_figure_fontsize)     axes.set_title(title_axes, fontsize = title_axes_fontsize)          # \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if data_df_in is not None:         data_df = data_df_in.copy()         if x_ticklabels_list:             data_df = data_df.set_index(pd.Index(x_ticklabels_list))         if y_ticklabels_list:             data_df.columns = y_ticklabels_list     else:         data_df = pd.DataFrame(data_XY_list_in)         if x_ticklabels_list:             data_df = data_df.set_index(pd.Index(x_ticklabels_list))         if y_ticklabels_list:             data_df.columns = y_ticklabels_list              data_np = np.array(data_XY_list_in) if data_XY_list_in is not None \\         else np.array(data_df_in)          data_df_rel = None          if values_type == 'relative':                  data_df_rel = data_df.copy()         sum_data = np.sum(data_np)         data_df.sum(axis=1)                  for col in data_df_rel.columns:             data_df_rel[col] = data_df_rel[col] \/ sum_data              # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if values_type == \"absolute\":         if not robust:              sns.heatmap(data_df.transpose(),                 #vmin=0, vmax=1,                 linewidth=0.5,                 cbar=True,                 fmt=fmt,                 annot=True,                 cmap=color_map,                 ax=axes)         else:             sns.heatmap(data_df.transpose(),                 #vmin=0, vmax=1,                 linewidth=0.5,                 cbar=True,                 robust=True,                 fmt=fmt,                 annot=True,                 cmap=color_map,                 ax=axes)     else:         if not robust:              sns.heatmap(data_df_rel.transpose(),                 vmin=0, vmax=1,                 linewidth=0.5,                 cbar=True,                 fmt=fmt,                 annot=True,                 cmap=color_map,                 ax=axes)         else:             sns.heatmap(data_df_rel.transpose(),                 vmin=0, vmax=1,                 linewidth=0.5,                 cbar=True,                 robust=True,                 fmt=fmt,                 annot=True,                 cmap=color_map,                 ax=axes)          # \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if tight_layout:         fig.tight_layout()              # \u0432\u044b\u0432\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430     plt.show()     if file_name:         fig.savefig(file_name, orientation = \"portrait\", dpi = 300)          return<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0432\u0441\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c \u043f\u043e DataScience \u0437\u0430\u0434\u0430\u0447\u0443 (\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, &#171;\u0432 \u0443\u0437\u043a\u043e\u043c \u043a\u0440\u0443\u0433\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439&#187;(\u0421) ), \u0430 \u0438\u043c\u0435\u043d\u043d\u043e &#8212; <a href=\"https:\/\/www.kaggle.com\/c\/titanic\" rel=\"noopener noreferrer nofollow\"><strong>\u0437\u0430\u0434\u0430\u0447\u0443 \u043e &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435&#187;<\/strong><\/a>.<\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043e &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435&#187; \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0446\u0435\u043b\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043d\u043e\u0433\u043e\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0438\u043b\u0435\u0442\u0430, \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u0438 \u043f\u043e\u043b\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430) \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u042d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043e\u0442\u0447\u0435\u0442\u0430:<\/p>\n<pre><code class=\"python\"># \u041e\u0431\u0449\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Task_Project = 'Titanic - Machine Learning from Disaster (https:\/\/www.kaggle.com\/c\/titanic)'<\/code><\/pre>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/www.kaggle.com\/c\/titanic\" rel=\"noopener noreferrer nofollow\">https:\/\/www.kaggle.com\/c\/titanic<\/a> \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 csv-\u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>train.csv<\/strong> (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043e\u043c, \u0442.\u0435. \u0432\u044b\u0436\u0438\u043b \u0438\u043b\u0438 \u043d\u0435\u0442);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <strong>test.csv<\/strong> (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">train_df = pd.read_csv('data\/train.csv') display(train_df) #display(train_df.head(), train_df.tail()) train_df.info() train_df.describe()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6b3\/266\/243\/6b326624368a5c583c2fb26e265fdda5.png\" width=\"1270\" height=\"803\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b3\/266\/243\/6b326624368a5c583c2fb26e265fdda5.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e72\/7de\/8f5\/e727de8f5ae686dbf8d21f0017cf40b4.png\" width=\"716\" height=\"285\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e72\/7de\/8f5\/e727de8f5ae686dbf8d21f0017cf40b4.png\"\/><\/figure>\n<pre><code class=\"python\">test_df = pd.read_csv('data\/test.csv') display(test_df) #display(test_df.head(), test_df.tail()) test_df.info() test_df.describe()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5e8\/73c\/f68\/5e873cf6828ea097a0f3ad05204b95c0.png\" width=\"1168\" height=\"778\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e8\/73c\/f68\/5e873cf6828ea097a0f3ad05204b95c0.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b44\/361\/84f\/b4436184f5ab09408a80a2a373e1802a.png\" width=\"625\" height=\"264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b44\/361\/84f\/b4436184f5ab09408a80a2a373e1802a.png\"\/><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 DataFrame:<\/p>\n<pre><code class=\"python\">dataset_train_df = train_df.copy() dataset_test_df = test_df.copy()<\/code><\/pre>\n<p><em><u>\u041f\u0440\u0438\u043c\u0435\u0440 1: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432<\/u><\/em><\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430&#187;.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u043e\u0431\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430\u0441\u0435\u0442:<\/p>\n<pre><code class=\"python\">dataset_df = pd.concat([dataset_train_df, dataset_test_df], axis=0, ignore_index=True)  display(dataset_df) #display(dataset_df.head(), dataset_df.tail()) dataset_df.info() dataset_df.describe() display(dataset_df['PassengerId'].nunique()) #display(dataset_df.describe(include = ['category']))<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/88d\/068\/595\/88d068595222577846ab8d1245ade45f.png\" width=\"1330\" height=\"837\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/88d\/068\/595\/88d068595222577846ab8d1245ade45f.png\"\/><\/figure>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0447\u0430\u0441\u0442\u043e \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439, \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430&#187;, \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0448\u0435 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0432\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u043d\u0430 \u0431\u043e\u0440\u0442 \u0441\u0443\u0434\u043d\u0430 \u0432 \u043f\u043e\u0440\u0442\u0443 \u0428\u0435\u0440\u0431\u0443\u0440\u0430 (Cherbourg). \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0440\u0442\u0430 \u043f\u043e\u0441\u0430\u0434\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 (\u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0438\u043b\u0435\u0442\u0430, \u043f\u043e\u043b\u0430, \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0435\u0442\u0435\u0439 \u0438 \u0442.\u0434.). \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0437\u043e\u0440\u0435, \u0432 \u0446\u0435\u043b\u044f\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0437\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<h4>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u043f\u043e\u043b\u0443 (Sex)<\/h4>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Pclass<\/strong> \u0438 <strong>Sex<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;:<\/p>\n<pre><code class=\"python\">data_df = dataset_df.loc[:, ['Pclass', 'Sex']] result_df, detection_values_df = df_detection_values(data_df, detection_values=[0, ' ', nan, None]) display(result_df)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b24\/f7d\/fdc\/b24f7dfdc70e36e817849e42e3d33b10.png\" width=\"510\" height=\"355\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b24\/f7d\/fdc\/b24f7dfdc70e36e817849e42e3d33b10.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Pclass_Sex = dataset_df.pivot_table(     values='PassengerId',     index='Pclass',     columns='Sex',     aggfunc='count',     fill_value=0,     margins=True)  #display(dataset_df_Pclass_Sex) print(dataset_df_Pclass_Sex)<\/code><\/pre>\n<pre><code>Sex     female  male   All Pclass                     1          144   179   323 2          106   171   277 3          216   493   709 All        466   843  1309<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Pclass_Sex.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]-1]  title_axes = '\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432:\\n \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u043f\u043e\u043b\u0443 (Sex)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 16,                                  rows_label = 'Pclass',                                  cols_label = 'Sex',                                  vertical_label = 'Number of passengers',                                  #graph_size = (297\/INCH*1.5, 210\/INCH*1.5)                                  )     props_func = lambda key: {'color': 'grey' if 'male' in key else 'orange'}  graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_func,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Pclass',     y_label = 'Sex',     #statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f7e\/22f\/6c8\/f7e22f6c8b39bc9d8629d42820baa0b9.png\" width=\"496\" height=\"523\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f7e\/22f\/6c8\/f7e22f6c8b39bc9d8629d42820baa0b9.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/52c\/a1b\/57c\/52ca1b57c1f6bc61b3b4b6c23974f5c6.png\" width=\"821\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52c\/a1b\/57c\/52ca1b57c1f6bc61b3b4b6c23974f5c6.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0434\u043e\u043b\u044f \u043c\u0443\u0436\u0447\u0438\u043d \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 3 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0432 1 \u0438 2 \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     result_output=True,     tight_layout=False,     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/59f\/47e\/358\/59f47e3580df7dff43a4c6e11589fb0c.png\" width=\"1021\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/59f\/47e\/358\/59f47e3580df7dff43a4c6e11589fb0c.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438.<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 14,     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH\/1.5, 210\/INCH\/1.5)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 14,     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH\/1.5, 210\/INCH\/1.5)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2c6\/6ea\/3db\/2c66ea3db7ac39a02d08d0baf0debc26.png\" width=\"520\" height=\"392\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2c6\/6ea\/3db\/2c66ea3db7ac39a02d08d0baf0debc26.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18b\/702\/089\/18b7020895cb93c6af6a5d599b978ccc.png\" width=\"517\" height=\"392\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18b\/702\/089\/18b7020895cb93c6af6a5d599b978ccc.png\"\/><\/figure>\n<h4>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 (Age)<\/h4>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442 (Age) \u0432 \u043d\u0430\u0448\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f, \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u043d\u043d\u0438\u0439 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 (early age): \u0434\u043e 3 \u043b\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u043d\u043d\u0435\u0435 \u0434\u0435\u0442\u0441\u0442\u0432\u043e (early childhood): \u0441\u0432\u044b\u0448\u0435 3 \u0434\u043e 7 \u043b\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0442\u0441\u0442\u0432\u043e (childhood): \u0441\u0432\u044b\u0448\u0435 7 \u0434\u043e 13 \u043b\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u044e\u043d\u043e\u0441\u0442\u044c (adolescence): \u0441\u0432\u044b\u0448\u0435 13 \u0434\u043e 21 \u0433\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0440\u0435\u043b\u043e\u0441\u0442\u044c (maturity): \u0441\u0432\u044b\u0448\u0435 21 \u0434\u043e 55 \u043b\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u043a\u043b\u043e\u043d\u043d\u044b\u0439 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 (advanced age): \u0441\u0432\u044b\u0448\u0435 55 \u0434\u043e 75 \u043b\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0430\u0440\u043e\u0441\u0442\u044c (old age): \u0441\u0432\u044b\u0448\u0435 75 \u043b\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f Age def age_transform_func(age):     age_periods_dict = {         'early age':       3,         'early childhood': 7,         'childhood':       13,         'adolescence':     21,         'maturity':        55,         'advanced age':    75,         'old age':         130}     age_scale = list(age_periods_dict.values())     if not age or isnan(age):         result = None     else:         for i, elem in enumerate(age_scale):             if abs(age) &lt;= elem:                 result = list(age_periods_dict.keys())[i]                 break     return result  # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u043b\u0435 Age period dataset_df['Age period'] = dataset_df['Age'].apply(age_transform_func) display(dataset_df)  # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Excel (\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f) dataset_df.to_excel('dataset_df.xlsx')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5b7\/a79\/951\/5b7a79951af8f0fb89e34f3bcfb6ec64.png\" width=\"1405\" height=\"388\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5b7\/a79\/951\/5b7a79951af8f0fb89e34f3bcfb6ec64.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Pclass<\/strong> \u0438 <strong>Age<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;:<\/p>\n<pre><code class=\"python\">data_df = dataset_df.loc[:, ['Pclass', 'Age', 'Age period']] result_df, detection_values_df = df_detection_values(data_df, detection_values=[' ', 0, nan, None]) display(result_df)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a76\/e70\/653\/a76e7065361a76b177bd9831ea942c42.png\" width=\"510\" height=\"355\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a76\/e70\/653\/a76e7065361a76b177bd9831ea942c42.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044f <strong>Age<\/strong> \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u0438\u0441\u043a\u0430\u0437\u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"python\"># \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e drop_labels = [] for elem in detection_values_df.index:     if detection_values_df.loc[elem].any():         drop_labels.append(elem) #display(drop_labels)  # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 dataset_df_age = dataset_df.drop(index=drop_labels)  # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f data_df = dataset_df_age.loc[:, ['Pclass', 'Age', 'Age period']] result_df, detection_values_df = df_detection_values(data_df, detection_values=[' ', 0, nan, None])   display(result_df)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/83e\/ecc\/f4a\/83eeccf4ab99648b3e11c17bc831ec9b.png\" width=\"510\" height=\"355\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/83e\/ecc\/f4a\/83eeccf4ab99648b3e11c17bc831ec9b.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Pclass_AgePeriod = dataset_df_age.pivot_table(     values='PassengerId',     index='Pclass',     columns='Age period',     aggfunc='count',     fill_value=0,     margins=True)  #display(dataset_df_Pclass_AgePeriod) print(dataset_df_Pclass_AgePeriod)<\/code><\/pre>\n<pre><code>Age period  adolescence  advanced age  childhood  early age  early childhood  \\ Pclass                                                                          1                    25            37          2          2                2    2                    38            12          7         13                5    3                   128             8         24         26               18    All                 191            57         33         41               25     Age period  maturity  old age   All   Pclass                                1                214        2   284   2                186        0   261   3                297        0   501   All              697        2  1046 <\/code><\/pre>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0432 DataFrame \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430:<\/p>\n<pre><code class=\"python\">dataset_df_Pclass_AgePeriod = dataset_df_Pclass_AgePeriod.loc[:, ['early age', 'early childhood', 'childhood', 'adolescence', 'maturity', 'advanced age', 'old age']] #display(dataset_df_Pclass_AgePeriod) print(dataset_df_Pclass_AgePeriod)<\/code><\/pre>\n<pre><code>Age period  early age  early childhood  childhood  adolescence  maturity  \\ Pclass                                                                      1                   2                2          2           25       214    2                  13                5          7           38       186    3                  26               18         24          128       297    All                41               25         33          191       697     Age period  advanced age  old age   Pclass                              1                     37        2   2                     12        0   3                      8        0   All                   57        2  <\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Pclass_AgePeriod.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]]  title_axes = '\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432:\\n \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 (Age period)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 16,                                  rows_label = 'Pclass',                                  cols_label = 'Age period',                                  vertical_label = 'Number of passengers',                                  graph_size = (420\/INCH, 297\/INCH)                                  )   <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/86b\/29e\/b4f\/86b29eb4ffa8488e03139ee2412646f7.png\" width=\"665\" height=\"734\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86b\/29e\/b4f\/86b29eb4ffa8488e03139ee2412646f7.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u044d\u0441\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &#8212; \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e,\u0447\u0442\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 &#171;\u0441\u0431\u0438\u0432\u0430\u044e\u0442 \u0432 \u043a\u0443\u0447\u0443&#187; \u043c\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430:<\/p>\n<pre><code class=\"python\">graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     #properties=props_func,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Pclass', y_label = 'Age period',     statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/81a\/261\/553\/81a26155376691513c40523c6e680550.png\" width=\"821\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81a\/261\/553\/81a26155376691513c40523c6e680550.png\"\/><\/figure>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>graph_contingency_tables_mosaicplot_sm<\/strong>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c <strong>props_dict<\/strong> \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0446\u0432\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430: <strong>properties=props_dict<\/strong>; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0446\u0432\u0435\u0442\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0437 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b (colormap) <strong>tab10<\/strong> (\u0441\u043c. <a href=\"https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html<\/a>);<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430: <strong>labelizer=False<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438: <strong>y_ticklabels = False<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u0435\u0433\u0435\u043d\u0434\u044b: <strong>legend_list = legend_list<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043c\u044b\u0441\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;\u0441\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0443\u0447\u0443&#187; (\u0442.\u0435. \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430), \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043b\u0435\u0433\u0435\u043d\u0434\u0443.<\/p>\n<pre><code class=\"python\"># \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0432\u0435\u0442\u043e\u0432 (\u0438\u0437 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b tab10, https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html) legend_list = list(data_df.columns) colors_number = len(legend_list) color_list = [] for i in range(colors_number):     color_list.append(mpl.colors.to_hex(plt.cm.tab10.colors[i])) print(f'color_list = {color_list}')  # \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0446\u0432\u0435\u0442\u043e\u0432 \u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f (dict) color_dict = {} for i in range(colors_number):     color_dict[legend_list[i]] = color_list[i] print(f'props_dict_cols = {color_dict}')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c props_dict \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 graph_contingency_tables_mosaicplot_sm props_dict = make_color_mosaicplot_dict(     rows_list=legend_list,     cols_list=list(data_df.index),     props_dict_rows=color_dict) print(f'\\nprops_dict = {props_dict}')    # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_dict,     labelizer=False,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Pclass', y_label = 'Age period',     y_ticklabels = False,      text_fontsize = 14,     gap = 0,     legend_list = legend_list,     statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b97\/ef5\/0f5\/b97ef50f55e51b6a9706218b8a5e18e3.png\" width=\"826\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b97\/ef5\/0f5\/b97ef50f55e51b6a9706218b8a5e18e3.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     result_output=True,     tight_layout=False,     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e9d\/4ea\/ea5\/e9d4eaea5958a2f6ce53098d327e2e48.png\" width=\"1021\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9d\/4ea\/ea5\/e9d4eaea5958a2f6ce53098d327e2e48.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH, 210\/INCH*1.25)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH, 210\/INCH*1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ea8\/024\/e9f\/ea8024e9f607768028dcf47df14a913c.png\" width=\"776\" height=\"732\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea8\/024\/e9f\/ea8024e9f607768028dcf47df14a913c.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/135\/a5f\/101\/135a5f101330efb9eee4cc7e02b27d4a.png\" width=\"772\" height=\"732\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/135\/a5f\/101\/135a5f101330efb9eee4cc7e02b27d4a.png\"\/><\/figure>\n<h4>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u043f\u043e\u0440\u0442\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Embarked)<\/h4>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Pclass<\/strong> \u0438 <strong>Embarked<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Pclass_Embarked = dataset_df_embarked.pivot_table(     values='PassengerId',     index='Pclass',     columns='Embarked',     aggfunc='count',     fill_value=0,     margins=True)  #display(dataset_df_Pclass_Embarked) print(dataset_df_Pclass_Embarked)<\/code><\/pre>\n<pre><code>Embarked    C    Q    S   All Pclass                        1         141    3  177   321 2          28    7  242   277 3         101  113  495   709 All       270  123  914  1307<\/code><\/pre>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0432 DataFrame \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u043f\u043e\u0440\u0442\u0430\u0445 (Southampton, Cherbourg, Queenstown):<\/p>\n<pre><code class=\"python\">dataset_df_Pclass_Embarked = dataset_df_Pclass_Embarked.loc[:, ['S', 'C', 'Q']] #display(dataset_df_Pclass_Embarked) print(dataset_df_Pclass_Embarked)<\/code><\/pre>\n<pre><code>Embarked    S    C    Q Pclass                  1         177  141    3 2         242   28    7 3         495  101  113 All       914  270  123<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Pclass_Embarked.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]]  title_axes = '\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432:\\n \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass) \u0438 \u043f\u043e\u0440\u0442\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Embarked)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 16,                                  rows_label = 'Pclass',                                  cols_label = 'Embarked',                                  cols_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],                                  vertical_label = 'Number of passengers',                                  graph_size = (297\/INCH*1.5, 210\/INCH*1.5)                                  )   <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d84\/8c0\/f27\/d848c0f274d96e5f08cc2c17b7787d4a.png\" width=\"702\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d84\/8c0\/f27\/d848c0f274d96e5f08cc2c17b7787d4a.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\"># \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0432\u0435\u0442\u043e\u0432 (\u0438\u0437 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b tab10, https:\/\/matplotlib.org\/stable\/tutorials\/colors\/colormaps.html) #legend_list = list(data_df.columns) legend_list = ['Southampton', 'Cherbourg', 'Queenstown'] colors_number = len(legend_list) color_list = [] for i in range(colors_number):     color_list.append(mpl.colors.to_hex(plt.cm.tab10.colors[i])) print(f'color_list = {color_list}')  # \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0446\u0432\u0435\u0442\u043e\u0432 \u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f (dict) color_dict = {} for i in range(colors_number):     color_dict[legend_list[i]] = color_list[i] print(f'props_dict_cols = {color_dict}')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c props_dict \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 graph_contingency_tables_mosaicplot_sm props_dict = make_color_mosaicplot_dict(     rows_list=legend_list,     cols_list=list(data_df.index),     props_dict_rows=color_dict) print(f'\\nprops_dict = {props_dict}')    # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_dict,     labelizer=False,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Pclass', y_label = 'Embarked',     y_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     #tick_fontsize = 11, tick_label_rotation = 45,     text_fontsize = 14,     gap = 0,     #legend_list = legend_list,     statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f1f\/554\/b2c\/f1f554b2c7c46f087e0f99555ed06571.png\" width=\"826\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f1f\/554\/b2c\/f1f554b2c7c46f087e0f99555ed06571.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     y_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     result_output=True,     tight_layout=False,     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/202\/bf9\/320\/202bf9320bf540f29ea411555ab46a4d.png\" width=\"1021\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/202\/bf9\/320\/202bf9320bf540f29ea411555ab46a4d.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     y_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH\/1.5, 210\/INCH\/1.5)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     y_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79d\/13c\/066\/79d13c066adfe12001c4232f3980300c.png\" width=\"587\" height=\"392\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79d\/13c\/066\/79d13c066adfe12001c4232f3980300c.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8b5\/200\/d76\/8b5200d76315d35fd1f0a3f1079d2ee8.png\" width=\"628\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b5\/200\/d76\/8b5200d76315d35fd1f0a3f1079d2ee8.png\"\/><\/figure>\n<p><em><u>\u041f\u0440\u0438\u043c\u0435\u0440 2: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432<\/u><\/em><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432.<\/p>\n<pre><code class=\"python\">dataset_df = dataset_train_df.copy() #display(dataset_df) display(dataset_df.head(3)), display(dataset_df.tail(3)) dataset_df.info()<\/code><\/pre>\n<p><em><u>\u041a\u043b\u0430\u0441\u0441 \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass)<\/u><\/em><\/p>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Pclass<\/strong> \u0438 <strong>Survived<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;  (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Survived_Pclass = dataset_df.pivot_table(     values='PassengerId',     index='Pclass',     columns='Survived',     aggfunc='count',     fill_value=0,     margins=True) dataset_df_Survived_Pclass['Survival rate'] = dataset_df_Survived_Pclass[1] \/ dataset_df_Survived_Pclass['All']  #display(dataset_df_Survived_Pclass) print(dataset_df_Survived_Pclass)<\/code><\/pre>\n<pre><code>Survived    0    1  All  Survival rate Pclass                                 1          80  136  216       0.629630 2          97   87  184       0.472826 3         372  119  491       0.242363 All       549  342  891       0.383838<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Survived_Pclass.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]-2]  title_axes = '\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 (Survived):\\n \u043a\u043b\u0430\u0441\u0441 \u0431\u0438\u043b\u0435\u0442\u0430 (Pclass)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 18,                                  rows_label = 'Pclass',                                  cols_label = 'Survived',                                  vertical_label = 'Number of passengers',                                  graph_size = (297\/INCH*1.5, 210\/INCH*1.5)                                  )    <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c6\/6db\/2f0\/7c66db2f0ed08ad179185b3490ea3187.png\" width=\"702\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c6\/6db\/2f0\/7c66db2f0ed08ad179185b3490ea3187.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]-2]  props_dict_rows = {'1': 'green',                    '0': 'red'} props_dict = make_color_mosaicplot_dict(     rows_list=data_df.columns,     cols_list=data_df.index,     props_dict_rows=props_dict_rows)  graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_dict,     title_figure = Task_Project,     title_axes = title_axes,     x_label = 'Pclass',     y_label = 'Survived',     #label_fontsize = 14,      #statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27a\/387\/2d1\/27a3872d106f1c529e27b42d7475a28f.png\" width=\"821\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27a\/387\/2d1\/27a3872d106f1c529e27b42d7475a28f.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 3 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 1 \u0438 2 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     color = ['red', 'green'],     result_output=True,     tight_layout=False,     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/528\/6f4\/3d4\/5286f43d4158af377d3c88f36214fb10.png\" width=\"1021\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/528\/6f4\/3d4\/5286f43d4158af377d3c88f36214fb10.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f10\/322\/2de\/f103222de11793c4415137d8d5ad5ff3.png\" width=\"619\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f10\/322\/2de\/f103222de11793c4415137d8d5ad5ff3.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5f7\/77c\/1b2\/5f777c1b21723bf88b0aa89630a705a0.png\" width=\"616\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5f7\/77c\/1b2\/5f777c1b21723bf88b0aa89630a705a0.png\"\/><\/figure>\n<p><em><u>\u041f\u043e\u043b (Sex)<\/u><\/em><\/p>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Sex<\/strong> \u0438 <strong>Survived<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Survived_Sex = dataset_df.pivot_table(     values='PassengerId',     index='Sex',     columns='Survived',     aggfunc='count',     fill_value=0,     margins=True) dataset_df_Survived_Sex['Survival rate'] = dataset_df_Survived_Sex[1] \/ dataset_df_Survived_Sex['All']  #display(dataset_df_Survived_Sex) print(dataset_df_Survived_Sex)<\/code><\/pre>\n<pre><code>Survived    0    1  All  Survival rate Sex                                    female     81  233  314       0.742038 male      468  109  577       0.188908 All       549  342  891       0.383838<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Survived_Sex.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]-2]  title_axes = '\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 (Survived):\\n \u043f\u043e\u043b \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 (Sex)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 18,                                  rows_label = 'Sex',                                  cols_label = 'Survived',                                  vertical_label = 'Number of passengers',                                  graph_size = (297\/INCH*1.5, 210\/INCH*1.5))    <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/687\/be0\/198\/687be0198a612877bc1583f6bf46d0e4.png\" width=\"702\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/687\/be0\/198\/687be0198a612877bc1583f6bf46d0e4.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-1, :dataset_df_sample.shape[1]-2] props_func = lambda key: {'color': 'green' if '1' in key else 'red'}  graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_func,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Sex',     y_label = 'Survived',     #label_fontsize = 14,      #statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/931\/738\/126\/931738126811100d21f4f4ddccc7cf73.png\" width=\"821\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/931\/738\/126\/931738126811100d21f4f4ddccc7cf73.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u043c\u0443\u0436\u0447\u0438\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0434\u043b\u044f \u0436\u0435\u043d\u0449\u0438\u043d.<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     color = ['red', 'green'],     result_output=True,     tight_layout=False,     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8f5\/e2f\/eb5\/8f5e2feb5f9cb767c3994066532fbd5c.png\" width=\"1021\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f5\/e2f\/eb5\/8f5e2feb5f9cb767c3994066532fbd5c.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/385\/514\/57b\/38551457bd173244cbd9259672afb32f.png\" width=\"619\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/385\/514\/57b\/38551457bd173244cbd9259672afb32f.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79a\/70f\/f29\/79a70ff296e0fec0ed7ee53779a533da.png\" width=\"616\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79a\/70f\/f29\/79a70ff296e0fec0ed7ee53779a533da.png\"\/><\/figure>\n<h4>\u0412\u043e\u0437\u0440\u0430\u0441\u0442 (Age)<\/h4>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e &#8212; \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 <strong>Age period<\/strong>:<\/p>\n<pre><code class=\"python\"># \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u043b\u0435 Age period dataset_df['Age period'] = dataset_df['Age'].apply(age_transform_func) display(dataset_df)  # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Excel (\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f) dataset_df.to_excel('dataset_train_df.xlsx')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ce\/268\/27a\/7ce26827aab7136e5d500bafd450d152.png\" width=\"1376\" height=\"382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ce\/268\/27a\/7ce26827aab7136e5d500bafd450d152.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Age<\/strong> \u0438 <strong>Survived<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Survived_AgePeriod = dataset_df_age.pivot_table(     values='PassengerId',     index='Age period',     columns='Survived',     aggfunc='count',     fill_value=0,     margins=True) dataset_df_Survived_AgePeriod['Survival rate'] = dataset_df_Survived_AgePeriod[1] \/ dataset_df_Survived_AgePeriod['All']  #display(dataset_df_Survived_AgePeriod) print(dataset_df_Survived_AgePeriod)<\/code><\/pre>\n<pre><code>Survived           0    1  All  Survival rate Age period                                    adolescence       88   45  133       0.338346 advanced age      28   11   39       0.282051 childhood         13    8   21       0.380952 early age         10   20   30       0.666667 early childhood    6   14   20       0.700000 maturity         279  191  470       0.406383 old age            0    1    1       1.000000 All              424  290  714       0.406162<\/code><\/pre>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0432 DataFrame \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430:<\/p>\n<pre><code class=\"python\">dataset_df_Survived_AgePeriod = dataset_df_Survived_AgePeriod.loc[['early age', 'early childhood', 'childhood', 'adolescence', 'maturity', 'advanced age', 'old age']] #display(dataset_df_Survived_AgePeriod) print(dataset_df_Survived_AgePeriod)<\/code><\/pre>\n<pre><code>Survived           0    1  All  Survival rate Age period                                    early age         10   20   30       0.666667 early childhood    6   14   20       0.700000 childhood         13    8   21       0.380952 adolescence       88   45  133       0.338346 maturity         279  191  470       0.406383 advanced age      28   11   39       0.282051 old age            0    1    1       1.000000<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Survived_AgePeriod.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0], :dataset_df_sample.shape[1]-2]  title_axes = '\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 (Survived):\\n \u0432\u043e\u0437\u0440\u0430\u0441\u0442 (Age period)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 16,                                  rows_label = 'Age period',                                  cols_label = 'Survived',                                  vertical_label = 'Number of passengers',                                  graph_size = (297\/INCH*1.5, 210\/INCH*1.5)                                  )   <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/24d\/4ec\/ee0\/24d4ecee099596a4e2f3ee11264c5c32.png\" width=\"702\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24d\/4ec\/ee0\/24d4ecee099596a4e2f3ee11264c5c32.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 <strong>N\u04452<\/strong> \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict), \u0430 \u043c\u0435\u043d\u0435\u0435 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0], :dataset_df_sample.shape[1]-2] props_func = lambda key: {'color': 'green' if '1' in key else 'red'}  graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_func,     labelizer = False,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Age period',     y_label = 'Survived',     #label_fontsize = 14,      tick_label_rotation = [90, 0],     #statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e9\/a11\/c7e\/8e9a11c7edeee3c4ff3cfe25f1822476.png\" width=\"821\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e9\/a11\/c7e\/8e9a11c7edeee3c4ff3cfe25f1822476.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     color = ['red', 'green'],     result_output=True,     #tight_layout=False,     #graph_size=(297\/INCH*1.5, 210\/INCH\/1.1)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/70b\/143\/6a7\/70b1436a7331da03c63d5712da63ed90.png\" width=\"1887\" height=\"586\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70b\/143\/6a7\/70b1436a7331da03c63d5712da63ed90.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044f\u043c\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 <strong>tight_layout=False<\/strong>; \u043b\u0438\u0431\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u043b\u043a\u0438\u043c\u0438. \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='ar',     title_figure = title_axes, title_figure_fontsize = 16,     color = ['red', 'green'],     #result_output=True,     #tight_layout=False,     #graph_size=(297\/INCH*1.5, 210\/INCH\/1.1)       )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/598\/6d3\/e7f\/5986d3e7f621c9312039d1c2fb37eb25.png\" width=\"1255\" height=\"586\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/598\/6d3\/e7f\/5986d3e7f621c9312039d1c2fb37eb25.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH, 210\/INCH\/1.25)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a80\/8b0\/5e8\/a808b05e88c2358ca10c14e00375c8b5.png\" width=\"762\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a80\/8b0\/5e8\/a808b05e88c2358ca10c14e00375c8b5.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f8\/4b4\/616\/4f84b46168a21885f994f93ffa683149.png\" width=\"759\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f8\/4b4\/616\/4f84b46168a21885f994f93ffa683149.png\"\/><\/figure>\n<h4>\u041f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Embarked)<\/h4>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u043f\u043e\u043b\u044f\u043c <strong>Embarked<\/strong> \u0438 <strong>Survived<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">dataset_df_Survived_Embarked = dataset_df_embarked.pivot_table(     values='PassengerId',     index='Embarked',     columns='Survived',     aggfunc='count',     fill_value=0,     margins=True) dataset_df_Survived_Embarked['Survival rate'] = dataset_df_Survived_Embarked[1] \/ dataset_df_Survived_Embarked['All']  #display(dataset_df_Survived_Embarked) print(dataset_df_Survived_Embarked)<\/code><\/pre>\n<pre><code>Survived    0    1  All  Survival rate Embarked                               C          75   93  168       0.553571 Q          47   30   77       0.389610 S         427  217  644       0.336957 All       549  340  889       0.382452<\/code><\/pre>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0432 DataFrame \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u043f\u043e\u0440\u0442\u0430\u0445 (Southampton, Cherbourg, Queenstown):<\/p>\n<pre><code class=\"yaml\">dataset_df_Survived_Embarked = dataset_df_Survived_Embarked.loc[['S', 'C', 'Q']] #display(dataset_df_Survived_Embarked) print(dataset_df_Survived_Embarked)<\/code><\/pre>\n<pre><code>Survived    0    1  All  Survival rate Embarked                               S         427  217  644       0.336957 C          75   93  168       0.553571 Q          47   30   77       0.389610<\/code><\/pre>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">dataset_df_sample = dataset_df_Survived_Embarked.copy() data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-0, :dataset_df_sample.shape[1]-2]  title_axes = '\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 (Survived):\\n \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Embarked)'  graph_contingency_tables_hist_3D(data_df,                                  title_figure = Task_Project, title_figure_fontsize = 12,                                  title_axes = title_axes, title_axes_fontsize = 18,                                  rows_label = 'Embarked',                                  cols_label = 'Survived',                                  rows_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],                                  vertical_label = 'Number of passengers',                                  graph_size = (297\/INCH*1.5, 210\/INCH*1.5))    <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ef3\/14c\/be4\/ef314cbe4886bcd7a657c6ce9c3322c3.png\" width=\"702\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef3\/14c\/be4\/ef314cbe4886bcd7a657c6ce9c3322c3.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em><\/p>\n<pre><code class=\"python\">data_df = dataset_df_sample.iloc[:dataset_df_sample.shape[0]-0, :dataset_df_sample.shape[1]-2] props_func = lambda key: {'color': 'green' if '1' in key else 'red'}  graph_contingency_tables_mosaicplot_sm(     data_df_in=data_df,     properties=props_func,     title_figure = Task_Project, title_figure_fontsize = 12,     title_axes = title_axes,     x_label = 'Embarked',     y_label = 'Survived',     x_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     #label_fontsize = 14,      #statistic = False,     #graph_size = (297\/INCH, 210\/INCH)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/858\/431\/735\/8584317358bcd7563285d4c26c757865.png\" width=\"820\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/858\/431\/735\/8584317358bcd7563285d4c26c757865.png\"\/><\/figure>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442<\/em><\/p>\n<pre><code class=\"python\">graph_contingency_tables_bar_freqint(     data_df_in=data_df,     graph_inclusion='arf',     title_figure = title_axes, title_figure_fontsize = 16,     color = ['red', 'green'],     result_output=True,     tight_layout=False,     x_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     graph_size=(297\/INCH*1.5, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4e9\/d5b\/88a\/4e9d5b88a3cb4f94c3890f8af8215d98.png\" width=\"1042\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e9\/d5b\/88a\/4e9d5b88a3cb4f94c3890f8af8215d98.png\"\/><\/figure>\n<p><strong><u>\u0412\u044b\u0432\u043e\u0434:<\/u><\/strong> \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044e: \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0448\u0435 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0432\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u043d\u0430 \u0431\u043e\u0440\u0442 \u0441\u0443\u0434\u043d\u0430 \u0432 \u0428\u0435\u0440\u0431\u0443\u0440\u0435 (Cherbourg). \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043b\u0438 \u044d\u0442\u043e? \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0430\u043d\u0430\u043b\u0438\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b, \u0447\u0442\u043e \u0432 \u0428\u0435\u0440\u0431\u0443\u0440\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0448\u0435 \u0434\u043e\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 1 \u043a\u043b\u0430\u0441\u0441\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 (\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 (\u0434\u043e\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438) \u0447\u0430\u0441\u0442\u043e\u0442:<\/p>\n<pre><code class=\"python\"># \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     x_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     #values_type = 'absolute',     color_map='YlGn',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )  # \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b graph_contingency_tables_heatmap(     data_df_in=data_df,     title_figure = Task_Project, #title_figure_fontsize = 14,     title_axes = title_axes + '\\n(\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b)', title_axes_fontsize = 16,     x_ticklabels_list = ['Southampton', 'Cherbourg', 'Queenstown'],     values_type = 'relative',     #color_map='YlGn',     fmt = '.4f',     graph_size=(297\/INCH\/1.25, 210\/INCH\/1.25)     )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/999\/501\/cf5\/999501cf5cd40e8b8e21915c879e91ff.png\" width=\"620\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/999\/501\/cf5\/999501cf5cd40e8b8e21915c879e91ff.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7aa\/17e\/033\/7aa17e033074aafce395a5f8ccb807fb.png\" width=\"617\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7aa\/17e\/033\/7aa17e033074aafce395a5f8ccb807fb.png\"\/><\/figure>\n<h4>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 offtop: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439<\/h4>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e \u0443\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e offtop&#8217;\u0430&#8230;<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0418\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0432\u0441\u0435\u0433\u043e 4 \u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 (<strong>Pclass<\/strong>, <strong>Sex<\/strong>, <strong>Age<\/strong>, <strong>Embarked<\/strong>) \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a (<strong>Survived<\/strong>) \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e &#8212; \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u0447\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u044a\u0435\u043c\u043d\u044b\u0439. \u0427\u0442\u043e \u0436\u0435 \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 10, 20 \u0438 \u0431\u043e\u043b\u0435\u0435? \u0418 \u044d\u0442\u043e \u0432\u0441\u0435 \u043b\u0438\u0448\u044c \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 <strong>\u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (EDA)<\/strong>.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 &#171;\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c&#187; \u0432\u0441\u044e \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044f\u0445 \u0432 \u043d\u0435\u0439, \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0432\u044f\u0437\u0438 \u0438, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c \u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e. \u0422\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c &#8212; \u044d\u0442\u043e <strong>\u0433\u0440\u0430\u0444\u0438\u043a &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/strong>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0442\u0435\u0441\u043d\u043e\u0442\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0422\u0430\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 &#8212; \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435), \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0437\u043e\u0440\u0435 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0433\u043a\u0430 \u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0440\u0430\u043c\u0435\u0440\u0430 (Cramer&#8217;s V)<\/strong> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0435 &#8212; \u0441\u043c., \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, [4, \u0441.746]).<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442 \u0442\u0435\u0441\u043d\u043e\u0442\u0443 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"V \\in [0; 1]\" alt=\"V \\in [0; 1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbd\/21e\/bc8\/fbd21ebc802f03725f7fb38735cb4dc7.svg\" width=\"77\" height=\"22\"\/>. \u0414\u043b\u044f \u0435\u0433\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u0430 <strong>python<\/strong> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>scipy.stats.contingency.association<\/strong> (<a href=\"https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.stats.contingency.association.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.stats.contingency.association.html<\/a>).<\/p>\n<p>\u0422\u0435\u0441\u043d\u043e\u0442\u0443 \u0441\u0432\u044f\u0437\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u0448\u043a\u0430\u043b\u044b Rea&amp;Parker<\/strong> &#8212; \u0441\u043c.[5, \u0441.44]:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0421\u0438\u043b\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"V&lt;0.1\" alt=\"V&lt;0.1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/833\/e1c\/de0\/833e1cde0f58f7a3fd2cf974eef775e9.svg\" width=\"65\" height=\"17\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f (unessential)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0.1 \\leq V &lt; 0.2\" alt=\"0.1 \\leq V &lt; 0.2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b9c\/f44\/483\/b9cf444836eef416f299f8cfebe63448.svg\" width=\"116\" height=\"19\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u043b\u0430\u0431\u0430\u044f (weak)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0.2 \\leq V &lt; 0.4\" alt=\"0.2 \\leq V &lt; 0.4\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f83\/3f4\/280\/f833f42806f6c50d2c43b2cfbdcd5852.svg\" width=\"116\" height=\"19\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0440\u0435\u0434\u043d\u044f\u044f (middle)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0.4 \\leq V &lt; 0.6\" alt=\"0.4 \\leq V &lt; 0.6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ca\/2e1\/c87\/6ca2e1c870853c42439d6d9a35ae7658.svg\" width=\"116\" height=\"19\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u0430\u044f (relatively strong)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0.6 \\leq V &lt; 0.8\" alt=\"0.6 \\leq V &lt; 0.8\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e5b\/74b\/4e0\/e5b74b4e07c852c6f8d2da28cec6d049.svg\" width=\"116\" height=\"19\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0438\u043b\u044c\u043d\u0430\u044f (strong)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0.8 \\leq V\" alt=\"0.8 \\leq V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d73\/0fe\/b33\/d730feb330be10124ee6a2e03d9d9e0a.svg\" width=\"65\" height=\"19\"\/><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u0430\u044f (very strong)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c (<strong>Pclass, Sex, Age period, Embarked, Survived<\/strong>) (\u0432 \u0446\u0435\u043b\u044f\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435, \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (https:\/\/github.com\/AANazarov\/Statistical-methods).<\/p>\n<p><em>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap)<\/em><\/p>\n<pre><code class=\"python\"># \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0440\u0430\u043c\u0435\u0440\u0430 corr_matrix = np.eye(len(variable_list))  for i, elem_i in enumerate(variable_list):     for j, elem_j in enumerate(variable_list):         if j>i:             temp_df = dataset_df_drop.pivot_table(                 values='PassengerId',                 index=elem_i,                 columns=elem_j,                 aggfunc='count',                 fill_value=0)             corr_matrix[i, j] = sci.stats.contingency.association(temp_df, method='cramer', correction='False')             corr_matrix[j, i] = corr_matrix[i, j] print(corr_matrix)             # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 fig, axes = plt.subplots(figsize=(297\/INCH, 210\/INCH)) fig.suptitle(Task_Project, fontsize = 12) title_axes = '\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u043d\u043e\u0442\u044b \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438\\n(\u043f\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0440\u0430\u043c\u0435\u0440\u0430 V)' axes.set_title(title_axes, fontsize = 16) sns.heatmap(corr_matrix,             vmin=0, vmax=1,             cbar=True,             #center=True,             annot=True,             cmap='Reds',             fmt = '.4f',             xticklabels=variable_list,             yticklabels=variable_list) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/687\/064\/fc6\/687064fc67dfd16ade37a52c7ae2b863.png\" width=\"634\" height=\"541\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/687\/064\/fc6\/687064fc67dfd16ade37a52c7ae2b863.png\"\/><\/figure>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c: \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0440\u044b \u0441\u0432\u044f\u0437\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0440\u044b \u0441\u0432\u044f\u0437\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0442.\u0434., \u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0430 \u043f\u043e\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c.<\/p>\n<h4>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u044f\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;.<\/h4>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a (<strong>Survived<\/strong>) \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0441\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u0441 \u0434\u0432\u0443\u043c\u044f \u0438\u0437 \u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 &#8212; <strong>Pclass<\/strong> (V=0.3577) \u0438 <strong>Sex<\/strong> (V=0.5338), \u0447\u0442\u043e \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e; \u0442\u0435\u0441\u043d\u043e\u0442\u0430 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u043c\u0438\u0441\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 (<strong>Age period<\/strong> \u0438 <strong>Embarked<\/strong>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0431\u043e\u0439.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442 \u043b\u0438 \u044d\u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u044b (<strong>Age period<\/strong> \u0438 <strong>Embarked<\/strong>)? \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u0442. \u041d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u043b\u0438 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 (\u0442.\u0435. \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0433\u0438\u0431\u0435\u043b\u0438) \u043e\u0442 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 (<strong>Age period<\/strong>):<\/p>\n<ul>\n<li>\n<p>\u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 (\u0434\u043e 7 \u043b\u0435\u0442) \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0433\u0438\u0431\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 ~0.3;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c \u0441\u0442\u0430\u0440\u0448\u0435 7 \u0434\u043e 55 \u043b\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0433\u0438\u0431\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 ~0.6;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u0440\u0435\u043a\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 (55-75 \u043b\u0435\u0442) \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0433\u0438\u0431\u0435\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e ~0.7.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0435\u0441\u0442\u044c, \u043d\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 V \u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0438\u0445 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 (\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430).<\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0433\u0440\u0430\u0444\u0438\u043a \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0430\u0431\u044b\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0430. \u0422\u0430\u043a \u043b\u0438 \u044d\u0442\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 <strong>Embarked<\/strong> \u0438 <strong>Survived<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0431\u043e\u0439 (V=0.1980). \u0412\u044b\u0448\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0432\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u043d\u0430 \u0441\u0443\u0434\u043d\u043e \u0432 \u0428\u0435\u0440\u0431\u0443\u0440\u0435 (Cherbourg), \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u043f\u043e\u0441\u0430\u0434\u043a\u0438, \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0428\u0435\u0440\u0431\u0443\u0440\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0448\u0435 \u0434\u043e\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 1 \u043a\u043b\u0430\u0441\u0441\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0430\u043d\u0441\u043e\u0432 \u0441\u043f\u0430\u0441\u0442\u0438\u0441\u044c. \u0410 \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 <strong>Embarked<\/strong> \u0438 <strong>Pclass<\/strong> \u0442\u0430\u043a\u0436\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c V=0.2558.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 V \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0412\u0441\u0435 \u044d\u0442\u043e \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e <strong>\u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 (EDA)<\/strong> &#8212; \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0440\u0435\u0434\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043c, \u0442\u0430\u043a \u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 &#171;\u043d\u0430 \u0433\u043b\u0430\u0437\u043e\u043a&#187; &#8212; \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u043e\u043b\u043e\u0442\u0443\u044e \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 &#8212; \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043e\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u0433\u043e \u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"python\"># \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0440\u0430\u043c\u0435\u0440\u0430 corr_matrix = np.eye(len(variable_list))  for i, elem_i in enumerate(variable_list):     for j, elem_j in enumerate(variable_list):         if j>i:             temp_df = dataset_df.pivot_table(                 values='PassengerId',                 index=elem_i,                 columns=elem_j,                 aggfunc='count',                 fill_value=0)             corr_matrix[i, j] = sci.stats.contingency.association(temp_df, method='cramer', correction='False')             corr_matrix[j, i] = corr_matrix[i, j] print(corr_matrix)             # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 fig, axes = plt.subplots(figsize=(297\/INCH, 210\/INCH)) fig.suptitle(Task_Project, fontsize = 12) title_axes = '\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u043d\u043e\u0442\u044b \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438\\n(\u043f\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0440\u0430\u043c\u0435\u0440\u0430 V)\\n(\u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439)' axes.set_title(title_axes, fontsize = 13) sns.heatmap(corr_matrix,             vmin=0, vmax=1,             cbar=True,             #center=True,             annot=True,             cmap='Reds',             fmt = '.4f',             xticklabels=variable_list,             yticklabels=variable_list) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf1\/2ad\/318\/bf12ad3183bf23289df6ef3586911d31.png\" width=\"634\" height=\"541\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf1\/2ad\/318\/bf12ad3183bf23289df6ef3586911d31.png\"\/><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c. \u042d\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043d\u0430\u043c, \u043a\u0430\u043a <strong>\u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0434 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c<\/strong>. \u0411\u0443\u0434\u044c\u0442\u0435 \u0431\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438!<\/p>\n<p><em><u>\u0418\u0422\u041e\u0413\u0418<\/u><\/em><\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438:<\/p>\n<ul>\n<li>\n<p>\u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <strong>python<\/strong> \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c <strong>\u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (EDA)<\/strong> \u0432 <strong>DataScience<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0440\u044f\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043e\u0434\u043d\u0430\u043a\u043e, \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043a\u0438\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043c\u043e\u0436\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a <strong>\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>, \u0447\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<p><a href=\"https:\/\/github.com\/AANazarov\/Statistical-methods\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub<\/a><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c <strong>DataScience<\/strong> \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p><em><u>\u041b\u0418\u0422\u0415\u0420\u0410\u0422\u0423\u0420\u0410<\/u><\/em><\/p>\n<ol>\n<li>\n<p>C.R. Bilder and T.M. Loughin. Analysis of Categorical Data with R. (2014). Boca Raton: Chapman &amp; Hall\/CRC Press. 547 pp.<\/p>\n<\/li>\n<li>\n<p>A.Agresti. Categorical data analysis (2013). 3rd Edition, John Wiley &amp; Sons, Inc., New Jersey, xvi + 714 pp.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u043a\u0430\u0435\u0432\u0430 \u041e.\u0410. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. &#8212; \u041e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. 2014\u20191(4). &#8212; \u0441.270-275. <a href=\"https:\/\/cyberleninka.ru\/article\/n\/razrabotka-vizualnogo-metoda-issledovaniya-zavisimosti-kategorialnyh-peremennyh-na-osnove-tablits-sopryazhennosti\/viewer\" rel=\"noopener noreferrer nofollow\">https:\/\/cyberleninka.ru\/article\/n\/razrabotka-vizualnogo-metoda-issledovaniya-zavisimosti-kategorialnyh-peremennyh-na-osnove-tablits-sopryazhennosti\/viewer<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0435\u043d\u0434\u0430\u043b\u043b \u041c., \u0421\u0442\u044e\u0430\u0440\u0442 \u0410. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0438 \u0441\u0432\u044f\u0437\u0438 \/ \u043f\u0435\u0440.\u0441 \u0430\u043d\u0433\u043b. &#8212; \u041c.: \u0413\u043b.\u0440\u0435\u0434.\u0444\u0438\u0437.-\u043c\u0430\u0442.\u043b\u0438\u0442. \u0438\u0437\u0434-\u0432\u0430 &#171;\u041d\u0430\u0443\u043a\u0430&#187;, 1973. &#8212; 899 \u0441.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0440\u0436\u0438\u0431\u043e\u0432\u0441\u043a\u0438\u0439 \u0410.\u041c., \u0423\u043d\u0433\u0443\u0440\u044f\u043d\u0443 \u0422.\u041d. \u0410\u043d\u0430\u043b\u0438\u0437 \u0431\u0438\u043e\u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c SPSS. &#8212; \u0410\u0440\u0445\u0430\u043d\u0433\u0435\u043b\u044c\u0441\u043a: \u0418\u0437\u0434-\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430, 2017. \u2013 293 \u0441.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/733954\/\"> https:\/\/habr.com\/ru\/articles\/733954\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u043c\u044b<\/h3>\n<p>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 DataScience. \u041a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u0432 [1], \u043c\u044b \u0436\u0438\u0432\u0435\u043c \u0432 \u043c\u0438\u0440\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 &#8212; \u043e\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u0430 \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u0434\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441\u043e\u0446\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0427\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437 <strong>\u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (contingency tables)<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0438\u0445 <strong>\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/strong>. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e &#8212; \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <strong>python<\/strong>, \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u044e\u0430\u043d\u0441\u044b &#8212; \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 <strong>python<\/strong>. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0435\u0441\u0442\u044c \u043e \u0447\u0435\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c&#8230;<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0437\u043e\u0440\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a\u0438 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187; (heatmap).<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0439 (\u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &#8212; \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/hr-portal.ru\/statistica\/gl7\/gl7.php\" rel=\"noopener noreferrer nofollow\">https:\/\/hr-portal.ru\/statistica\/gl7\/gl7.php<\/a>) &#8212; \u043d\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445, \u0438\u0431\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u044a\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u044a\u044f\u0442\u043d\u043e\u0435, \u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u0432\u043e\u043b\u0435\u043d \u0441\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0431\u0435 \u043f\u043e \u0434\u0443\u0448\u0435.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h4>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043e\u0431\u0437\u043e\u0440\u0430\u0445, \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f <strong>my_module__stat.py<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub (<a href=\"https:\/\/github.com\/AANazarov\/MyModulePython\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/AANazarov\/MyModulePython<\/a>).<\/p>\n<p>\u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>df_detection_values<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u0432 <strong>DataFrame<\/strong>: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043d\u0430 \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 (<strong>heatmap<\/strong>) \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u044f\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 (\u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <strong>my_module__stat.py<\/strong>):<\/p>\n<ul>\n<li>\n<p><strong>graph_contingency_tables_hist_3D<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0445 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_mosaicplot_sm<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>make_color_mosaicplot_dict<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict) \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>graph_contingency_tables_mosaicplot_sm<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_bar_freqint<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>graph_contingency_tables_heatmap<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 &#171;\u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b&#187;.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043f\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<h4>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h4>\n<p><strong>\u0422\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u043d\u044b\u043c\u0438 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u043d\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0443\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0437\u0430\u0438\u0447\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c. \u0418\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <strong>python<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d<\/strong> (<a href=\"https:\/\/matplotlib.org\/stable\/api\/_as_gen\/mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/api\/_as_gen\/mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d.html<\/a>); \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u043e\u0441\u044f\u043c\u0438 \u0438 \u043f\u0440.); \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/3d_bars.html\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/3d_bars.html<\/a>, <a href=\"https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/hist3d.html#\" rel=\"noopener noreferrer nofollow\">https:\/\/matplotlib.org\/stable\/gallery\/mplot3d\/hist3d.html#<\/a>, <a href=\"https:\/\/coderslegacy.com\/python\/3d-bar-chart-matplotlib\/\" rel=\"noopener noreferrer nofollow\">https:\/\/coderslegacy.com\/python\/3d-bar-chart-matplotlib\/<\/a>, <a href=\"https:\/\/pythonprogramming.net\/3d-bar-chart-matplotlib-tutorial\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pythonprogramming.net\/3d-bar-chart-matplotlib-tutorial\/<\/a>.<\/p>\n<pre><code class=\"python\">def graph_contingency_tables_hist_3D(     data_df_in: pd.core.frame.DataFrame = None,     data_XY_list_in: list = None,     title_figure = None, title_figure_fontsize = 14,     title_axes = None, title_axes_fontsize = 16,     rows_label = None, cols_label = None, vertical_label = None, label_fontsize = 14,      rows_ticklabels_list = None, cols_ticklabels_list = None,     tick_fontsize = 11, rows_tick_rotation = 0, cols_tick_rotation = 0,      legend = None, legend_fontsize = 14,     labelpad = 20,     color=None,     tight_layout=True,     graph_size = (297\/INCH, 210\/INCH),     file_name = None):          \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0445 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c      Args:         data_df_in (pd.core.frame.DataFrame, optional): \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - dataframe). Defaults to None.         data_XY_list_in (list, optional):               \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0438\u043f - list). Defaults to None.         title_figure (_type_, optional):                \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to None.         title_figure_fontsize (int, optional):          \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure). Defaults to 14.         title_axes (_type_, optional):                  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to None.         title_axes_fontsize (int, optional):            \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes). Defaults to 16.         rows_label (_type_, optional):                  \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 (\u043f\u043e \u0441\u0440\u043e\u043a\u0430\u043c). Defaults to None.         cols_label (_type_, optional):                  \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to None.         vertical_label (_type_, optional):              \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438. Defaults to None.         label_fontsize (int, optional):                 \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043e\u0441\u0435\u0439. Defaults to 14.         rows_ticklabels_list (_type_, optional):        \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c). Defaults to None.         cols_ticklabels_list (_type_, optional):        \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to None.         tick_fontsize (int, optional):                  \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439. Defaults to 11.         rows_tick_rotation (int, optional):             \u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c). Defaults to 0.         cols_tick_rotation (int, optional):             \u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u0438 (\u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c). Defaults to 0.         legend (_type_, optional):                      \u0422\u0435\u043a\u0441\u0442 \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to None.         legend_fontsize (int, optional):                \u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043b\u0435\u0433\u0435\u043d\u0434\u044b. Defaults to 14.         labelpad (int, optional):                       \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043e\u0441\u044c\u044e \u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438. Defaults to 20.         color (_type_, optional):                       \u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to None.         tight_layout (bool, optional):                  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430\/\u043d\u0435\u0442, True\/False). Defaults to True.         graph_size (tuple, optional):                   \u0420\u0430\u0437\u043c\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. Defaults to (297\/INCH, 210\/INCH).         file_name (_type_, optional):                   \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. Defaults to None.     \"\"\"               # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (Figure) \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (Axes)     fig = plt.figure(figsize=graph_size)     ax = plt.axes(projection = \"3d\")     #ax = fig.gca(projection='3d')     fig.suptitle(title_figure, fontsize = title_figure_fontsize)     ax.set_title(title_axes, fontsize = title_axes_fontsize)              # \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if data_df_in is not None:         data = np.array(data_df_in)         NumOfCols = data_df_in.shape[1]         NumOfRows = data_df_in.shape[0]     else:         data = np.array(data_XY_list_in)         NumOfCols = np.shape(data)[1]         NumOfRows = np.shape(data)[0]                      # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     xpos = np.arange(0, NumOfCols, 1)     ypos = np.arange(0, NumOfRows, 1)              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0442\u043a\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442     xpos, ypos = np.meshgrid(xpos + 0.5, ypos + 0.5)     xpos = xpos.flatten()     ypos = ypos.flatten()          # \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u043b\u044f zpos \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u0443\u043b\u044f     zpos = np.zeros(NumOfCols * NumOfRows)              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     dx = np.ones(NumOfRows * NumOfCols) * 0.5     dy = np.ones(NumOfCols * NumOfRows) * 0.5              # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     dz = data.flatten()                  # \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430     if not color:         ax.bar3d(xpos, ypos, zpos, dx, dy, dz)     else:         ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color=color)                  # \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0441\u0435\u0439     x_label = cols_label if cols_label else ''     y_label = rows_label if rows_label else ''     z_label = vertical_label if vertical_label else ''          ax.set_xlabel(x_label, fontsize = label_fontsize)     ax.set_ylabel(y_label, fontsize = label_fontsize)     ax.set_zlabel(z_label, fontsize = label_fontsize)          # \u043c\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439     x_ticklabels_list = cols_ticklabels_list if cols_ticklabels_list \\         else list(data_df.columns) if (data_df is not None) else ''     y_ticklabels_list = rows_ticklabels_list if rows_ticklabels_list \\         else list(data_df.index) if data_df is not None else ''          #<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-385073","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385073"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385073\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}