{"id":404317,"date":"2024-06-29T17:38:11","date_gmt":"2024-06-29T17:38:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=404317"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=404317","title":{"rendered":"<span>Titanic Survivors Data Research<\/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<p><strong>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430<\/strong><\/p>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u0412\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/pas-zhukov\/Titanic-Survivors-Data-Research\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430 (\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 ML-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/www.kaggle.com\/competitions\/titanic\/data\" rel=\"noopener noreferrer nofollow\">kaggle.com<\/a> [1]), \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u0442\u043e\u0439 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0435. \u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Python, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430 Pandas. \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0435 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e 0.78 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 [1]. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 pyTorch.<\/p>\n<hr\/>\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h3>\n<ol>\n<li>\n<p><a href=\"#intro\" rel=\"noopener noreferrer nofollow\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#analys\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> <\/p>\n<ol>\n<li>\n<p><a href=\"#source_d\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#factors\" rel=\"noopener noreferrer nofollow\">\u0424\u0430\u043a\u0442\u043e\u0440\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0448\u0430\u043d\u0441\u044b \u0432\u044b\u0436\u0438\u0442\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#sex\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#age\" rel=\"noopener noreferrer nofollow\">\u0412\u043e\u0437\u0440\u0430\u0441\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#names\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u0435\u043d\u0430 \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#cabin\" rel=\"noopener noreferrer nofollow\">\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rel\" rel=\"noopener noreferrer nofollow\">\u0420\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#tickets\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u043b\u0435\u0442\u044b \u0438 \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p><a href=\"#model\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/a> <\/p>\n<ol>\n<li>\n<p><a href=\"#features\" rel=\"noopener noreferrer nofollow\">\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (features)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#prepr\" rel=\"noopener noreferrer nofollow\">Data preprocessing<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#net\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#learning\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p><a href=\"#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#links\" rel=\"noopener noreferrer nofollow\">\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <\/h3>\n<p>15 \u0430\u043f\u0440\u0435\u043b\u044f 1912 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043a\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u0445\u043e\u0434\u0430 \u00ab\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u00bb, \u0441\u0442\u0430\u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0430. \u0417\u0430 \u0441\u0442\u043e \u043b\u0435\u0442 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0442\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u043b\u0430\u0439\u043d\u0435\u0440\u0430, \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"http:\/\/Kaggle.com\" rel=\"noopener noreferrer nofollow\">Kaggle.com<\/a> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435 [1], \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u0435\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430\u0445 \u0441 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430. \u041a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430 \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u044b \u0432\u044b\u0436\u0438\u0432\u0430\u043b\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0448\u0430\u043d\u0441\u043e\u043c, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435, \u0438 \u044d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0426\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432\u044b\u0436\u0438\u043b \u043e\u043d \u043f\u043e\u0441\u043b\u0435 \u043a\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<hr\/>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 <\/h3>\n<p>\u0426\u0435\u043b\u044c\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 &#171;\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445&#187; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (feature engineering) \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <code>Data_Investigation.ipynb<\/code>.<\/p>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 <\/h4>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 .csv \u0444\u0430\u0439\u043b\u0430, \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (891 \u0441\u0442\u0440\u043e\u043a\u0430, 12 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432), \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043d\u0438\u0436\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432: \u043a\u043b\u0430\u0441\u0441, \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0441\u0443\u043f\u0440\u0443\u0433+\u0431\u0440\u0430\u0442\u044c\u044f\\\u0441\u0435\u0441\u0442\u0440\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438+\u0434\u0435\u0442\u0438, \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0435\u0442\u0430, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430, \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b, \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0436\u0438\u043b \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<pre><code>import pandas as pd  # \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 df = pd.read_csv('train.csv') # \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435! df <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/980\/bd8\/50a\/980bd850acfa4a1a474c0216475145d6.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 - \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 - \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/980\/bd8\/50a\/980bd850acfa4a1a474c0216475145d6.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 &#8212; \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432\u0438\u0443\u0437\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043c. \u0432 \u0444\u0430\u0439\u043b\u0435 <code>Data_Investigation.ipynb<\/code>):<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 20% \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 80% \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0430\u044e\u0442\u0430\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423 15 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423 2 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423 4 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043d\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0424\u0430\u043a\u0442\u043e\u0440\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0448\u0430\u043d\u0441\u044b \u0432\u044b\u0436\u0438\u0442\u044c <\/h4>\n<p>\u0417\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u0442\u043e \u043b\u0435\u0442 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b, \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445. \u0412 [2] \u0438 [3] \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \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<ol>\n<li>\n<p><strong>\u041f\u043e\u043b<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e 75% \u0436\u0435\u043d\u0449\u0438\u043d \u0438 16% \u043c\u0443\u0436\u0447\u0438\u043d [2]).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u043e\u0437\u0440\u0430\u0441\u0442<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e 52% \u0434\u0435\u0442\u0435\u0439 [2]).<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e \u0438\u0437 1 \u043a\u043b\u0430\u0441\u0441\u0430 62%, \u0438\u0437 2 &#8212; 41%, \u0438\u0437 3 &#8212; 25% [2]).<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0438 \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u044d\u0432\u0430\u043a\u0443\u0430\u0446\u0438\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432. \u041f\u043e \u043f\u0440\u0438\u043a\u0430\u0437\u0443 \u043a\u0430\u043f\u0438\u0442\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432 \u0448\u043b\u044e\u043f\u043a\u0438 \u0441\u0430\u0436\u0430\u043b\u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u0438 \u0434\u0435\u0442\u0435\u0439 [4, 5].<\/p>\n<p>\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0430\u043b\u043e\u0441\u044c \u0432 \u043e\u0431\u0449\u0435\u0439 \u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 1 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0434 \u0432\u0442\u043e\u0440\u044b\u043c \u0438 \u0442\u0440\u0435\u0442\u044c\u0438\u043c, \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0434 \u0442\u0440\u0435\u0442\u044c\u0438\u043c [2]. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u044e\u0442\u044b 1 \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438\u0441\u044c \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a \u043f\u0430\u043b\u0443\u0431\u0435 [2].<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043b\u0438 2 \u043b\u0438\u0444\u0442\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 &#8212; 1 \u043b\u0438\u0444\u0442, \u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u043b\u0438\u0444\u0442\u044b \u043d\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 [2].<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043f\u0430\u0440\u043e\u0445\u043e\u0434\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u0432\u0430\u043a\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0434\u044f\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u0438 \u0441\u0442\u044e\u0430\u0440\u0434\u044b. \u041f\u0440\u0438\u0447\u0435\u043c \u0432 1 \u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u044e\u0430\u0440\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u044e\u0442, \u0430 \u0432\u043e 2 \u0438 3 &#8212; \u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 [7]. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0441\u0442\u044e\u0430\u0440\u0434\u044b \u0438\u043c\u0435\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0438\u0447\u043d\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u0438 \u0432\u044b\u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 [7], \u0430 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0441\u0442\u044e\u0430\u0440\u0434\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0432\u0430\u043b\u0438 \u0434\u0432\u0435\u0440\u0438 \u0432 \u043a\u0430\u044e\u0442\u044b [6], \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0430\u043b\u0443\u0431\u0443.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\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 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b <\/h4>\n<p>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0434\u043b\u044f \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435.<\/p>\n<pre><code>import matplotlib.pyplot as plt import numpy as np  # \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 males_total = len(df.loc[(df['Sex'] == 'male')]) females_total = len(df.loc[(df['Sex'] == 'female')]) males_survived = len(df.loc[((df['Sex'] == 'male') &amp; (df['Survived'] == 1))]) females_survived = len(df.loc[((df['Sex'] == 'female') &amp; (df['Survived'] == 1))])  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c survivors_counts = {     '\u0412\u044b\u0436\u0438\u043b\u0438': [males_survived, females_survived],     '\u041f\u043e\u0433\u0438\u0431\u043b\u0438': [males_total-males_survived, females_total-females_survived] }  fig, ax = plt.subplots() bottom = np.zeros(2)  for key, count in survivors_counts.items():     p = ax.bar(('\u041c\u0443\u0436\u0447\u0438\u043d\u044b', '\u0416\u0435\u043d\u0449\u0438\u043d\u044b'), count, width=0.6, label=key, bottom=bottom)     bottom += count     ax.bar_label(p, label_type='center')  ax.set_title('\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430') ax.set_ylabel('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a') ax.legend() plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/305\/8d9\/7af\/3058d97afaf602e0af42d0b20f86d7dd.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/305\/8d9\/7af\/3058d97afaf602e0af42d0b20f86d7dd.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u0430, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u043c \u0440\u0430\u043d\u0435\u0435 [2, 3]:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u043c\u0443\u0436\u0447\u0438\u043d: 18.89%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0436\u0435\u043d\u0449\u0438\u043d: 74.2%<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u0430\u044e\u0442\u044b (\u043a\u043e\u0434 \u0441\u043c. \u0432 \u0444\u0430\u0439\u043b\u0435 <code>Data_Investigation.ipynb<\/code>). <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/7f7\/439\/9db\/7f74399db13f1579c16ea573ddff1273.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b\" title=\"\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7f7\/439\/9db\/7f74399db13f1579c16ea573ddff1273.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 1 \u043a\u043b\u0430\u0441\u0441\u0430: 62.96%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 2 \u043a\u043b\u0430\u0441\u0441\u0430: 47.28%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 3 \u043a\u043b\u0430\u0441\u0441\u0430: 24.24%<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u043d\u0438\u043c\u0438 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 (\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438), \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c.<\/p>\n<h4>\u0412\u043e\u0437\u0440\u0430\u0441\u0442 <\/h4>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445, \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c.<\/p>\n<pre><code>from collections import Counter  #\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0438 \u043f\u0430\u0441\u0441\u0436\u0438\u0440\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b survivors = df.loc[(df['Survived'] == 1)] male_survivors = df.loc[((df['Sex'] == 'male') &amp; (df['Survived'] == 1))] female_survivors = df.loc[((df['Sex'] == 'female') &amp; (df['Survived'] == 1))]  #\u0427\u0438\u0441\u043b\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u0432 num_of_ages = len(dict(Counter(survivors['Age'])).keys())  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fig, axs = plt.subplots(2,2) fig.set_figwidth(20) fig.set_figheight(10) names = [['\u0412\u0441\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u044b', '\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435'], ['\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u043c\u0443\u0436\u0447\u0438\u043d\u044b', '\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u0436\u0435\u043d\u0449\u0438\u043d\u044b']] for i, surv in enumerate([[df, survivors], [male_survivors, female_survivors]]):     for j, subsurv in enumerate(surv):         axs[i][j].hist(subsurv['Age'], bins=num_of_ages)         axs[i][j].set_title(names[i][j])         axs[i][j].set_xlabel('\u0412\u043e\u0437\u0440\u0430\u0441\u0442, \u043b\u0435\u0442')         axs[i][j].set_ylabel('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a')         axs[i][j].set_ylim(0,30)         axs[i][j].set_xlim(0,70) plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ef7\/da3\/3cb\/ef7da33cba39aa52cb927f503db00b7e.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 - \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 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 - \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 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ef7\/da3\/3cb\/ef7da33cba39aa52cb927f503db00b7e.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 &#8212; \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 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c 2 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u044b: \u043e\u0434\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0442\u044f\u043c, \u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u043b\u044e\u0434\u044f\u043c \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c 20-30 \u043b\u0435\u0442. \u041f\u0440\u0438\u0447\u0435\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u0445\u043e\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438 \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u03bc, \u043f\u0430\u0434\u0430\u044e\u0442 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<br \/> \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u0441\u043f\u0430\u0441\u043b\u0438\u0441\u044c.<\/p>\n<pre><code>import numpy as np  children = df.loc[((df['Age'] &lt; np.float64(18.0)) &amp; (df['Age'] > 0))] survivors_children = df.loc[((df['Age'] &lt; np.float64(18.0)) &amp; (df['Survived'] == 1) &amp; (df['Age'] > 0))] print(f'\u041f\u0430\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0434\u043e 18 \u043b\u0435\u0442 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c {round(len(survivors_children)*100\/len(children), 2)}%') <\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u0430\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0434\u043e 18 \u043b\u0435\u0442 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c 53.98%.\\<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0434\u0435\u0442\u0435\u0439 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0447\u0451\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0442\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c \u0434\u0435\u0442\u0435\u0439 \u0434\u043e 5 \u043b\u0435\u0442.<\/p>\n<pre><code>df.loc[((df['Survived'] == 1) &amp; (df['Age'] > 0) &amp; (df['Age'] &lt; 18))].Age.hist() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/8fb\/a55\/377\/8fba5537717deb78a3457c3dfa1f1950.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 5 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u0434\u0435\u0442\u0435\u0439\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 5 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u0434\u0435\u0442\u0435\u0439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8fb\/a55\/377\/8fba5537717deb78a3457c3dfa1f1950.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 5 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u0434\u0435\u0442\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<h4>\u0418\u043c\u0435\u043d\u0430 \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 <\/h4>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0435 \u0434\u043b\u044f 1912 \u0433\u043e\u0434\u043f \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a &#171;Mr&#187;, &#171;Mrs&#187;, &#171;Miss&#187;, &#171;Sir&#187;, &#171;Master&#187; \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u042d\u0442\u0438 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 [8]. \u0410\u0432\u0442\u043e\u0440 [9] \u0432 \u0445\u043e\u0434\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430&#187; \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043e\u0442\u0440\u0430\u0436\u0451\u043d\u043d\u044b\u0439 \u0432 \u0438\u043c\u0435\u043d\u0438, \u0442\u0435\u0441\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c, \u0438 \u044d\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d. \u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u0440\u043e\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c.<\/p>\n<pre><code>#\u041f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0442\u0438\u0442\u0443\u043b\u043e\u0432 titles = (\"Capt.\",\"Col.\",\"Major.\",\"Sir.\",\"Lady.\",\"Rev.\",\"Dr.\",\"Don.\",\"Jonkheer.\",\"Countess.\",\"Mrs.\",\"Ms.\",\"Mr.\",\"Mme.\",\"Mlle.\",\"Miss.\",\"Master.\")  #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u0442\u0443\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 titled_names = [] for name in df.Name:     for title in titles:         if title in name.split(' '):             titled_names.append(title)             break   #\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 - \u0422\u0438\u0442\u0443\u043b df.insert(12, 'Title', titled_names)  #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \"\u0442\u0438\u0442\u0443\u043b: \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u0432\" ages = dict.fromkeys(titles, []) for i, title in enumerate(df.Title):     if not pd.isna(df.Age[i]):         ages[title] = ages[title] + [df.Age[i]]  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fig, ax = plt.subplots(figsize=(15,5)) ax.boxplot(ages.values(), labels=titles, vert=True) ax.set_ylabel('\u0412\u043e\u0437\u0440\u0430\u0441\u0442') plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/206\/d4e\/47a\/206d4e47a8dc8cbf7ee06cbdcc680e32.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u0442\u0443\u043b\u0430\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u0442\u0443\u043b\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/206\/d4e\/47a\/206d4e47a8dc8cbf7ee06cbdcc680e32.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u0442\u0443\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430. \u0412\u043e\u0437\u0440\u0430\u0441\u0442 \u043b\u044e\u0434\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 \u0435\u0433\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0438, \u043d\u043e \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0433\u0438\u0431\u043b\u0438 \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u0438 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u044d\u0442\u0438\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430.<\/p>\n<pre><code>noage = df.loc[(pd.isna(df['Age']))] fig, ax = plt.subplots(1, 2, figsize=(10,5)) ax[0].hist(noage.Survived, bins=2, cumulative=-1) ax[1].hist(noage.Sex, bins=2) ax[0].set_ylabel('\u041a\u043e\u043b-\u0432\u043e\u043b \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445') <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/a58\/4d3\/dff\/a584d3dff36f594fd7c8c25693879e53.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 7 - \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u0438 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u043b\u044e\u0434\u0435\u0439 \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 7 - \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u0438 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u043b\u044e\u0434\u0435\u0439 \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a58\/4d3\/dff\/a584d3dff36f594fd7c8c25693879e53.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 7 &#8212; \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u0438 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u043b\u044e\u0434\u0435\u0439 \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0443\u0436\u0447\u0438\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a <code>have_age<\/code>, \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\\\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043c\u0443\u0436\u0447\u0438\u043d\u044b \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u0448\u0430\u043d\u0441\u044b \u043f\u043e\u0433\u0438\u0431\u043d\u0443\u0442\u044c \u0431\u0443\u0434\u0443\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0443 \u043c\u0443\u0436\u0447\u0438\u043d\u044b, \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0442\u0438\u0442\u0443\u043b\u043e\u043c.<\/p>\n<pre><code>for i, age in enumerate(df.Age):     if pd.isna(age):         df.Age[i] = np.median(ages[df.Title[i]]) <\/code><\/pre>\n<p>\u0412\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430<br \/> \u0410\u0432\u0442\u043e\u0440 [9] \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0438\u0442\u0443\u043b\u044b \u0432 5 \u0433\u0440\u0443\u043f\u043f: Aristocratic, Mr, Mrs, Miss \u0438 Master (\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 [8] \u0433\u0440\u0443\u043f\u043f\u044b), \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u0442\u0443\u043b\u043e\u043c.<\/p>\n<pre><code># \u0413\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f aristocratic = (\"Capt.\", \"Col.\", \"Don.\", \"Dr.\",                 \"Jonkheer.\", \"Lady.\", \"Major.\",                 \"Rev.\", \"Sir.\", \"Countess.\") mrs = (\"Ms.\") miss = (\"Mlle.\", 'Mme.')  # \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0442\u0438\u0442\u0443\u043b\u044b for i, title in enumerate(df.Title):     if title in aristocratic:         df.Title[i] = 'Aristocratic.'     elif title in miss:         df.Title[i] = 'Miss.'     elif title in mrs:         df.Title[i] = 'Mrs.'  # \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0434\u043e\u043b\u044e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0442\u0438\u0442\u0443\u043b\u043e\u0432 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0438\u0442\u0441\u044f title_survive_percent = dict.fromkeys(set(df.Title), None) for title in title_survive_percent.keys():     title_survive_percent[title] = len(df.loc[((df['Title'] == title) &amp; (df['Survived'] == 1))]) \/ len(df.loc[(df['Title'] == title)])  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fig, ax = plt.subplots() ax.bar(title_survive_percent.keys(), title_survive_percent.values()) ax.set_ylabel('\u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445') ax.set_title('\u0412\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430') plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/b7a\/5aa\/37b\/b7a5aa37b06f5b738f35afeee7f13574.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 8 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 8 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b7a\/5aa\/37b\/b7a5aa37b06f5b738f35afeee7f13574.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 8 &#8212; \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0442\u0438\u0442\u0443\u043b \u0434\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0436\u0438\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h4>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b <\/h4>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u043a\u0430\u044e\u0442\u044b \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f 80% \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432. \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u0414\u043b\u044f \u0442\u0435\u0445 \u0436\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043d\u043e\u043c\u0435\u0440 \u043f\u0430\u043b\u0443\u0431\u044b \u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0431\u043e\u0440\u0442\u0443 \u0431\u044b\u043b\u0430 \u043a\u0430\u044e\u0442\u0430 (\u0431\u0443\u043a\u0432\u0430 \u0432 \u043d\u043e\u043c\u0435\u0440\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u043b\u0443\u0431\u0435, \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0435\u0432\u043e\u043c\u0443 \u0431\u043e\u0440\u0442\u0443 [7]). \u041e\u0434\u043d\u0430\u043a\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u044d\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435 \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 [9].<\/p>\n<p>\u0421\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043a\u0430\u044e\u0442\u0430\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u043f\u0438\u0441\u043a\u0443, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u043d\u0430 \u0442\u0435\u043b\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0435\u0433\u043e \u0441\u0442\u044e\u0430\u0440\u0442\u0430 \u0413\u0435\u0440\u0431\u0435\u0440\u0442\u0430 \u041a\u0435\u0439\u0432\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u044b\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u044b \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 [10]. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0430\u043c\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0430\u044e\u0442\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430.<\/p>\n<pre><code># \u0412\u044b\u0434\u0435\u043b\u0438\u043c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u0433\u0440\u0443\u043f\u043f\u044b have_cabin = df.loc[(pd.notna(df['Cabin']))] have_cabin_survived = df.loc[((pd.notna(df['Cabin'])) &amp; (df['Survived'] == 1))] no_cabin = df.loc[(pd.isna(df['Cabin']))] no_cabin_survived = df.loc[((pd.isna(df['Cabin'])) &amp; (df['Survived'] == 1))]  # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043b\u044e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 fig, ax = plt.subplots() ax.bar(('\u0415\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440', '\u041d\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u0430'), (len(have_cabin_survived)\/len(have_cabin), len(no_cabin_survived)\/len(no_cabin))) ax.set_ylabel('\u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445') ax.set_title('\u0412\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043a\u0430\u044e\u0442\u044b') plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ec3\/ab5\/28b\/ec3ab528b01c3b5068bd98fb3484b136.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 9 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0431\u0438\u043d\u044b\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 9 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0431\u0438\u043d\u044b\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ec3\/ab5\/28b\/ec3ab528b01c3b5068bd98fb3484b136.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 9 &#8212; \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0431\u0438\u043d\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0431\u0438\u043d\u044b \u0443 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c. \u0412 [9] \u0430\u0432\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u043a\u043b\u0430\u0441\u0441\u0443 \u043a\u0430\u044e\u0442\u044b, \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h4>\u0420\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 <\/h4>\n<p>\u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 &#171;\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u0438+\u0434\u0435\u0442\u0438&#187; \u0438 &#171;\u0421\u0443\u043f\u0440\u0443\u0433+\u0431\u0440\u0430\u0442\u044c\u044f\\\u0441\u0435\u0441\u0442\u0440\u044b&#187; \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u0437\u043d\u0430\u043a &#171;\u0421\u0435\u043c\u044c\u044f&#187;, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a &#171;\u041f\u0430\u0441\u0441\u0430\u0436\u0438\u0440 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043e\u0434\u0438\u043d&#187; [9, 11, 12, 13, 14]. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u0437\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438.<\/p>\n<pre><code># \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a family #df.insert(13, 'Family', np.array(df.SibSp, int) + np.array(df.Parch, int))   sibsp_total = dict(Counter(df.SibSp)) parch_total = dict(Counter(df.Parch)) family_total = dict(Counter(df.Family)) sibsp_survived = dict(Counter(df.loc[(df['Survived'] == 1)].SibSp)) parch_survived = dict(Counter(df.loc[(df['Survived'] == 1)].Parch)) family_survived = dict(Counter(df.loc[(df['Survived'] == 1)].Family)) relatives = (family_total, sibsp_total, parch_total) relatives_survived = (family_survived, sibsp_survived, parch_survived)  fig, axs = plt.subplots(1, 3, figsize=(15,5)) xlabs = ('\u041f\u043e\u043b\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432', '\u0421\u0443\u043f\u0440\u0443\u0433+\u0431\u0440\u0430\u0442\u044c\u044f\\\u0441\u0435\u0441\u0442\u0440\u044b', '\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u0438+\u0434\u0435\u0442\u0438')  for i in range(3):     probs = []     for rel, amount in relatives_survived[i].items():         probs.append(amount \/ relatives[i][rel])     axs[i].bar(relatives_survived[i].keys(), probs)     axs[i].set_ylabel('\u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445')     axs[i].set_xlabel(xlabs[i]) plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/dd3\/55f\/43c\/dd355f43cea16de3f1647a4387a8780f.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 10 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 10 - \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd3\/55f\/43c\/dd355f43cea16de3f1647a4387a8780f.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 10 &#8212; \u0414\u043e\u043b\u044f \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<pre><code>import seaborn as sns  # \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a is_alone is_alone = [] for fam in df.Family:     if fam == 0:         is_alone.append(1)     else:         is_alone.append(0) df.insert(14, 'is_alone', is_alone)  # Correlation heatmap sns.heatmap(df[['Survived', 'SibSp', 'Parch', 'Family', 'is_alone']].corr(), annot=True, vmin=-1, vmax=1, cmap=sns.diverging_palette(0, 500, as_cmap=True)) <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/c0b\/8f4\/df0\/c0b8f4df00fd1fb60ce5c44d5fdde497.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 11 - \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 &quot;\u0441\u0435\u043c\u0435\u0439\u043d\u044b\u0445&quot; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 11 - \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 &quot;\u0441\u0435\u043c\u0435\u0439\u043d\u044b\u0445&quot; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0b\/8f4\/df0\/c0b8f4df00fd1fb60ce5c44d5fdde497.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 11 &#8212; \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 &#171;\u0441\u0435\u043c\u0435\u0439\u043d\u044b\u0445&#187; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u044b\u0448\u0435, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0445\u043e\u0442\u044c \u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0441\u043b\u0430\u0431\u043e. \u0411\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a &#8216;Family&#8217; \u0438 &#8216;is_alone&#8217;.<\/p>\n<h4>\u0411\u0438\u043b\u0435\u0442\u044b \u0438 \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <\/h4>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043a\u0430\u044e\u0442\u044b, \u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438.<\/p>\n<pre><code>sns.heatmap(df[['Survived', 'Fare', 'Pclass']].corr(), annot=True, vmin=-1, vmax=1) <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/05a\/0f9\/4bd\/05a0f94bda7f896ef35fae41b09a158f.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 12 - \u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u0430\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 12 - \u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u0430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/05a\/0f9\/4bd\/05a0f94bda7f896ef35fae41b09a158f.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 12 &#8212; \u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u043c \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043e\u0447\u0438\u0441\u0442\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u043e\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code>fare = dict.fromkeys((1,2,3), []) for i, price in enumerate(df.Fare):     fare[df.Pclass[i]] = fare[df.Pclass[i]] + [price]   fig, ax = plt.subplots(figsize=(15,5)) ax.boxplot(fare.values(), labels=(1,2,3), vert=True) ax.set_ylabel('\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430') ax.set_xlabel('\u041a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b') ax.set_ylim(-5, 250) plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/2a5\/946\/314\/2a5946314b66eb193852e60767d7e32f.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 13 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u0430\u044e\u0442\u044b\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 13 - \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u0430\u044e\u0442\u044b\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2a5\/946\/314\/2a5946314b66eb193852e60767d7e32f.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 13 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u0430\u044e\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0451 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438. \u0417\u0430\u043c\u0435\u043d\u0438\u043c \u0431\u0438\u043b\u0435\u0442\u044b \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code>for i, fare in enumerate(df.Fare):     if np.isclose(fare, .0):         df.Fare[i] = np.median(fares[df.Pclass[i]]) <\/code><\/pre>\n<p>\u00ab\u0417\u0434\u0435\u0441\u044c \u0438 \u0440\u0430\u043d\u0435\u0435 &#8212; \u0438\u0434\u0435\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u043c\u0438-\u0442\u043e \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435, \u0438 \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445\/\u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0442.\u043a. \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0443\u0432\u0435\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0434\u0430\u0432\u0430\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b [14].\u00bb<\/p>\n<p>\u041d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0435\u0442\u0430 \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044e \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<p>\u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0438\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0435\u0442\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430.<\/p>\n<pre><code>for i, emb in enumerate(df.Embarked):     if pd.isna(emb): df.Embarked[i] = 'S' <\/code><\/pre>\n<h3>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 <\/h3>\n<h4>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (features) <\/h4>\n<p>\u041f\u043e\u043b, \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u0442\u0438\u0442\u0443\u043b, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0431\u0438\u043d\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u043b\u0435\u043d\u043e\u0432 \u0441\u0435\u043c\u044c\u0438, \u043e\u0434\u0438\u043d \u043b\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430, \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u044b\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u044b \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a\u0438\u043c\u0438 \u0441\u0442\u0430\u043b\u0438: Sex, Pclass, Age, Have_Age, Title(\u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e), Have_Cabin, Family, Is_Alone, Fare, Embarked(\u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e).<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432.<\/p>\n<pre><code>import pandas as pd import numpy as np  TITLES = (\"Capt.\",\"Col.\",\"Major.\",\"Sir.\",\"Lady.\",\"Rev.\",\"Dr.\",\"Don.\",\"Jonkheer.\",\"Countess.\",\"Mrs.\",\"Ms.\",\"Mr.\",\"Mme.\",\"Mlle.\",\"Miss.\",\"Master.\", \"Dona.\") ARISTOCRATIC = (\"Capt.\", \"Col.\", \"Don.\", \"Dr.\",                 \"Jonkheer.\", \"Lady.\", \"Major.\",                 \"Rev.\", \"Sir.\", \"Countess.\", 'Dona') MRS = (\"Ms.\") MISS = (\"Mlle.\", 'Mme.')  for file in ('train', 'test'):      # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b     dataset = pd.read_csv(f'{file}.csv')      # \u041a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b     dataset = dataset.replace({'female' : 1, 'male': 0})      # \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432     dataset.Fare.fillna(0, inplace = True)     fares = dict.fromkeys((1,2,3), [])     for i, price in enumerate(dataset.Fare):         fares[dataset.Pclass[i]] = fares[dataset.Pclass[i]] + [price]     for i, fare in enumerate(dataset.Fare):         if np.isclose(fare, .0):             dataset.loc[i, 'Fare'] = np.median(fares[dataset.Pclass[i]])      #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u0442\u0443\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430     titled_names = []     for name in dataset.loc[:, 'Name']:         for title in TITLES:             if title in name.split(' '):                 titled_names.append(title)                 break      # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 Title     dataset.insert(1, 'Title', titled_names)      #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \"\u0442\u0438\u0442\u0443\u043b: \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u0432\"     ages = dict.fromkeys(TITLES, [])     for i, title in enumerate(dataset.Title):         if not pd.isna(dataset.Age[i]):             ages[title] = ages[title] + [dataset.Age[i]]                  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0421\u0435\u043c\u044c\u044f     dataset['Family'] = dataset.Parch + dataset.SibSp      # \u041a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438     dataset['Is_Alone'] = dataset.Family == 0     dataset['Have_Cabin'] = pd.notna(dataset.Cabin)     dataset['Have_age'] = pd.notna(dataset.Age)     dataset = dataset.replace({True: 1, False: 0})      # \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430     for i, age in enumerate(dataset.loc[:, 'Age']):         if pd.isna(age):             dataset.loc[i, 'Age'] = np.median(ages[dataset.Title[i]])      # \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0442\u0438\u0442\u0443\u043b\u044b     for i, title in enumerate(dataset.Title):         if title in ARISTOCRATIC:             dataset.loc[i, 'Title'] = 'Aristocratic.'         elif title in MISS:             dataset.loc[i, 'Title'] = 'Miss.'         elif title in MRS:             dataset.loc[i, 'Title'] = 'Mrs.'      # \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f     dataset.Embarked.fillna(dataset.Embarked.mode()[0], inplace = True)      # \u041a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0440\u0442 \u0438 \u0442\u0438\u0442\u0443\u043b\u044b     dataset = dataset.join(pd.get_dummies(dataset.Embarked, prefix='Emb'))     dataset = dataset.join(pd.get_dummies(dataset.Title, prefix='Title'))      # \u0427\u0438\u0441\u0442\u0438\u043c \u043e\u0442 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     dataset = dataset.drop(columns=['Ticket', 'Name', 'SibSp', 'Parch', 'Cabin', 'Title', 'Embarked'])      # \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 Survived \u0432 \u043a\u043e\u043d\u0435\u0446     try:         dataset.insert(dataset.shape[1] - 1, 'Survived', dataset.pop('Survived'))     except KeyError:         ...      dataset.to_csv(f'clear_{file}.csv', index=False) <\/code><\/pre>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<pre><code>train_set = pd.read_csv('clear_train.csv')  fig, ax = plt.subplots(figsize=(15,15)) sns.heatmap(train_set.corr(), annot=True, vmin=-1, vmax=1, ax=ax) <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/21d\/574\/4a9\/21d5744a9d05dbbd56058899d08a7483.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 14 - \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 14 - \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/21d\/574\/4a9\/21d5744a9d05dbbd56058899d08a7483.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 14 &#8212; \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<h4>Data preprocessing <\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0447\u0435\u0435\u043a \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/363\/ab7\/3a9\/363ab73a993bd3f4c2efe3ea623abb78.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 15 - \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 15 - \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/363\/ab7\/3a9\/363ab73a993bd3f4c2efe3ea623abb78.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 15 &#8212; \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>data_functions.py<\/code> \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code>def normalize_data(train_vector: np.ndarray, test_vector: np.ndarray) -> tuple[np.ndarray, np.ndarray]:      train_arr, test_arr = train_vector, test_vector     united_arr = np.concatenate((train_arr, test_arr))      mean = np.mean(united_arr, axis=0)     std_deviation = np.std(united_arr, axis=0)      train_X = (train_arr - mean) \/ std_deviation     test_X = (test_arr - mean) \/ std_deviation      return train_X, test_X <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b Dataset \u0438\u0437 pyTorch (\u0441\u043c. \u0444\u0430\u0439\u043b <code>data_functions.py<\/code>).<\/p>\n<h4>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 <\/h4>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u043b\u043e\u0439: 16 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u043b\u043e\u0439: 512 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 (\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 ReLU).<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0442\u0447-\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 512 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>Dropout-\u0441\u043b\u043e\u0439 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 0.3 (30%).<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u043b\u043e\u0439: 2048 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 (\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 ReLU).<\/p>\n<\/li>\n<li>\n<p>Dropout-\u0441\u043b\u043e\u0439 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 0.3 (30%).<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u043b\u043e\u0439: 512 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 (\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 ReLU).<\/p>\n<\/li>\n<li>\n<p>Dropout-\u0441\u043b\u043e\u0439 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 0.3 (30%).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u043b\u043e\u0439: 2 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 (\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 Softmax).<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u044d\u0442\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u0444\u0430\u0439\u043b <code>networks.py<\/code>):<\/p>\n<pre><code>import torch.nn as nn import torch.nn.functional as F   class Net(nn.Module):     def __init__(self):         super(Net, self).__init__()          self.layer_1 = nn.Linear(16, 512)         self.b_norm = nn.BatchNorm1d(512)         self.layer_2 = nn.Linear(512, 2048)         self.layer_3 = nn.Linear(2048, 512)         self.layer_4 = nn.Linear(512, 2)          self.dropout = nn.Dropout(0.3)      def forward(self, x):         x = self.layer_1(x)         x = F.relu(x)         x = self.dropout(x)         x = self.b_norm(x)          x = self.layer_2(x)         x = F.relu(x)         x = self.dropout(x)          x = self.layer_3(x)         x = F.relu(x)         x = self.dropout(x)          x = self.layer_4(x)         x = F.softmax(x)          return x <\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ba1\/87a\/555\/ba187a555e9375be1f8f6549cdc5f7c2.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 16 - \u0421\u0445\u0435\u043c\u0430, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 16 - \u0421\u0445\u0435\u043c\u0430, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ba1\/87a\/555\/ba187a555e9375be1f8f6549cdc5f7c2.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 16 &#8212; \u0421\u0445\u0435\u043c\u0430, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432, \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u043b\u043e\u0438 \u0434\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0435\u0445\u043d\u0438\u043a\u0438 \u0431\u0430\u0442\u0447-\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 Dropout \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (overfitting). \u0412 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 Softmax \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 (\u0432\u044b\u0436\u0438\u043b\/\u043f\u043e\u0433\u0438\u0431).<\/p>\n<h4>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 <\/h4>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>learning.py<\/code>. \u0421 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0443\u0441\u043f\u0435\u0445\u043e\u0432 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <strong>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 0.9<\/strong>.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">num_epochs<\/p>\n<\/td>\n<td>\n<p align=\"left\">1500<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">batch_size<\/p>\n<\/td>\n<td>\n<p align=\"left\">64<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (batch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">learning_rate<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.01<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (learning rate)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">weight_decay<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.01<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 (L2 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">validation_split<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">optimizer<\/p>\n<\/td>\n<td>\n<p align=\"left\">Adam<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0438\u043f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">annealing_factor<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.6<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0424\u0430\u043a\u0442\u043e\u0440 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (LR annealing)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">loss_function<\/p>\n<\/td>\n<td>\n<p align=\"left\">CrossEntropyLoss<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0438\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d LR Annealing, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d \u0444\u0430\u043a\u0442\u043e\u0440 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f 0.6 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 (patience) \u0440\u0430\u0432\u043d\u043e\u0435 100. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u043b\u043e\u0441\u044c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 100 \u044d\u043f\u043e\u0445, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/new-ui.neptune.ai\/pas-zhukov\/Titanic-Kaggle\/runs\/details?viewId=standard-view&amp;detailsTab=charts&amp;shortId=TIT-26&amp;type=run\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/a>, \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <a href=\"https:\/\/www.kaggle.com\/paszhukov\/competitions\" rel=\"noopener noreferrer nofollow\">0.787<\/a>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/1bf\/f53\/162\/1bff53162ba8712c33b69c72e8eff06c.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 17 - \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438\" title=\"\" width=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1bf\/f53\/162\/1bff53162ba8712c33b69c72e8eff06c.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 17 &#8212; \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/c16\/6aa\/626\/c166aa626ff66b8f7713c732bd3d4d0b.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 18 - \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438\" title=\"\" width=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c16\/6aa\/626\/c166aa626ff66b8f7713c732bd3d4d0b.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 18 &#8212; \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/b5a\/7f0\/947\/b5a7f09476eabd8d9f70d04297b9e0b6.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 19 - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c  \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438\" title=\"\" width=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b5a\/7f0\/947\/b5a7f09476eabd8d9f70d04297b9e0b6.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 19 &#8212; \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c  \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/583\/aaf\/3ef\/583aaf3ef12f4398508e26f703096053.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 20 - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0430 \u0432\u0430\u043b\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438\" title=\"\" width=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/583\/aaf\/3ef\/583aaf3ef12f4398508e26f703096053.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 20 &#8212; \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0430 \u0432\u0430\u043b\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0432 \u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <\/h3>\n<p>\u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u044b\u043b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u0430\u0440\u043e\u0445\u043e\u0434\u0430 &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a&#187;, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e \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\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0435. \u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 0.78.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430, \u0431\u044b\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438: \u043f\u043e\u043b \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u044e\u0442\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443, \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043b\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440 \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043a\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 \u0441 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u0437 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0438\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044f, \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 <\/h3>\n<ol>\n<li>\n<p>Kaggle. Titanic: Machine Learning from Disaster [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/www.kaggle.com\/competitions\/titanic\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.kaggle.com\/competitions\/titanic\/<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0445\u043c\u0430\u043d\u043e\u0432, \u0410. \u0412. \u041a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430: \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e-\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0448\u0430\u043d\u0441\u044b \u043d\u0430 \u0441\u043f\u0430\u0441\u0435\u043d\u0438\u0435 \/ \u0410. \u0412. \u0420\u0430\u0445\u043c\u0430\u043d\u043e\u0432 \/\/ \u0412\u0435\u0441\u0442\u043d\u0438\u043a \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430. \u0421\u0435\u0440\u0438\u044f 18. \u0421\u043e\u0446\u0438\u043e\u043b\u043e\u0433\u0438\u044f \u0438 \u043f\u043e\u043b\u0438\u0442\u043e\u043b\u043e\u0433\u0438\u044f. \u2014 2016. \u2014 \u2116 22. \u2014 \u0421. 62-82.<\/p>\n<\/li>\n<li>\n<p>Encyclopedia Titanica. Titanic Statistics [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/www.encyclopedia-titanica.org\/titanic-statistics.html\" rel=\"noopener noreferrer nofollow\">https:\/\/www.encyclopedia-titanica.org\/titanic-statistics.html<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>Gleicher, D. The Rescue of the Third Class on the Titanic: A Revisionist History \/ David Gleicher. \u2014 International Maritime Economic History Association, 2006. \u2014 (Research in Maritime History, No. 31). \u2014 ISBN 978-0-9738934-1-0.<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u0440\u0434, \u0423. A Night to Remember \/ \u0423\u043e\u043b\u0442\u0435\u0440 \u041b\u043e\u0440\u0434. \u2014 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a: St. Martin&#8217;s Griffin, 2005. \u2014 ISBN 978-0-8050-7764-3.<\/p>\n<\/li>\n<li>\n<p>Barczewski, S. Titanic: A Night Rememb \/ Stephanie Barczewski. \u2014 \u041b\u043e\u043d\u0434\u043e\u043d: Continuum International Publishing Group, 2006. \u2014 ISBN 978-1-85285-500-0.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0443\u0431\u0430\u0447\u0435\u043a, \u041c. \u0421. \u0422\u0438\u0442\u0430\u043d\u0438\u043a \/ \u041c\u0438\u043b\u043e\u0448 \u0413\u0443\u0431\u0430\u0447\u0435\u043a. \u2014 \u041c\u0438\u043d\u0441\u043a: \u041f\u043e\u043f\u0443\u0440\u0440\u0438, 2000. \u2014 656 \u0441. \u2014 ISBN 978-985-15-1679-3.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f. English honorifics [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/en.wikipedia.org\/wiki\/English_honorifics\" rel=\"noopener noreferrer nofollow\">https:\/\/en.wikipedia.org\/wiki\/English_honorifics<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>\u0425\u0430\u0431\u0440. \u0422\u0438\u0442\u0430\u043d\u0438\u043a \u043d\u0430 Kaggle: \u0432\u044b \u043d\u0435 \u0434\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/habr.com\/en\/company\/mlclass\/blog\/270973\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/company\/mlclass\/blog\/270973\/<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>Encyclopedia Titanica. The Cave List [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/www.encyclopedia-titanica.org\/the-cave-list.html\" rel=\"noopener noreferrer nofollow\">https:\/\/www.encyclopedia-titanica.org\/the-cave-list.html<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>\u0425\u0430\u0431\u0440. \u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u0434\u0430\u0447\u0438 \u0422\u0438\u0442\u0430\u043d\u0438\u043a \u043d\u0430 Kaggle (Baseline) [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/habr.com\/en\/post\/655955\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/post\/655955\/<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>ITnan. Kaggle \u0438 Titanic \u2014 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/itnan.ru\/post.php?c=1&amp;p=274171\" rel=\"noopener noreferrer nofollow\">https:\/\/itnan.ru\/post.php?c=1&amp;p=274171<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>Neurohive. \u0420\u0430\u0437\u0431\u043e\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u00ab\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u00bb \u043d\u0430 Kaggle \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/neurohive.io\/ru\/osnovy-data-science\/razbor-resheniya-zadachi-titanik-na-kaggle-dlya-nachinajushhih\/\" rel=\"noopener noreferrer nofollow\">https:\/\/neurohive.io\/ru\/osnovy-data-science\/razbor-resheniya-zadachi-titanik-na-kaggle-dlya-nachinajushhih\/<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/p>\n<\/li>\n<li>\n<p>Kaggle. Titanic Solution &#8212; a Beginner&#8217;s Guide (Russian) [\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441]. \u2014 \u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <a href=\"https:\/\/www.kaggle.com\/code\/adavydenko\/titanic-solution-a-beginner-s-guide-russian\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.kaggle.com\/code\/adavydenko\/titanic-solution-a-beginner-s-guide-russian\/<\/a>. \u2014 \u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f: 02.04.2022.<\/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\/726454\/\"> https:\/\/habr.com\/ru\/articles\/726454\/<\/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<p><strong>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430<\/strong><\/p>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u0412\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/pas-zhukov\/Titanic-Survivors-Data-Research\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430 (\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 ML-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/www.kaggle.com\/competitions\/titanic\/data\" rel=\"noopener noreferrer nofollow\">kaggle.com<\/a> [1]), \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u0442\u043e\u0439 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0435. \u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Python, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430 Pandas. \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0435 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e 0.78 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 [1]. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 pyTorch.<\/p>\n<hr\/>\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h3>\n<ol>\n<li>\n<p><a href=\"#intro\" rel=\"noopener noreferrer nofollow\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#analys\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> <\/p>\n<ol>\n<li>\n<p><a href=\"#source_d\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#factors\" rel=\"noopener noreferrer nofollow\">\u0424\u0430\u043a\u0442\u043e\u0440\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0448\u0430\u043d\u0441\u044b \u0432\u044b\u0436\u0438\u0442\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#sex\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#age\" rel=\"noopener noreferrer nofollow\">\u0412\u043e\u0437\u0440\u0430\u0441\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#names\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u0435\u043d\u0430 \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#cabin\" rel=\"noopener noreferrer nofollow\">\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rel\" rel=\"noopener noreferrer nofollow\">\u0420\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#tickets\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u043b\u0435\u0442\u044b \u0438 \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p><a href=\"#model\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/a> <\/p>\n<ol>\n<li>\n<p><a href=\"#features\" rel=\"noopener noreferrer nofollow\">\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (features)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#prepr\" rel=\"noopener noreferrer nofollow\">Data preprocessing<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#net\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#learning\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p><a href=\"#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#links\" rel=\"noopener noreferrer nofollow\">\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <\/h3>\n<p>15 \u0430\u043f\u0440\u0435\u043b\u044f 1912 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043a\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u0445\u043e\u0434\u0430 \u00ab\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u00bb, \u0441\u0442\u0430\u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0430. \u0417\u0430 \u0441\u0442\u043e \u043b\u0435\u0442 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0442\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u043b\u0430\u0439\u043d\u0435\u0440\u0430, \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"http:\/\/Kaggle.com\" rel=\"noopener noreferrer nofollow\">Kaggle.com<\/a> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435 [1], \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u0435\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430\u0445 \u0441 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430. \u041a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430 \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u044b \u0432\u044b\u0436\u0438\u0432\u0430\u043b\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0448\u0430\u043d\u0441\u043e\u043c, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435, \u0438 \u044d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0426\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432\u044b\u0436\u0438\u043b \u043e\u043d \u043f\u043e\u0441\u043b\u0435 \u043a\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<hr\/>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 <\/h3>\n<p>\u0426\u0435\u043b\u044c\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 &#171;\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445&#187; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (feature engineering) \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <code>Data_Investigation.ipynb<\/code>.<\/p>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 <\/h4>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 .csv \u0444\u0430\u0439\u043b\u0430, \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (891 \u0441\u0442\u0440\u043e\u043a\u0430, 12 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432), \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043d\u0438\u0436\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432: \u043a\u043b\u0430\u0441\u0441, \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0441\u0443\u043f\u0440\u0443\u0433+\u0431\u0440\u0430\u0442\u044c\u044f\\\u0441\u0435\u0441\u0442\u0440\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438+\u0434\u0435\u0442\u0438, \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0435\u0442\u0430, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430, \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u044e\u0442\u044b, \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0436\u0438\u043b \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<pre><code>import pandas as pd  # \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 df = pd.read_csv('train.csv') # \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435! df <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 &#8212; \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432\u0438\u0443\u0437\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043c. \u0432 \u0444\u0430\u0439\u043b\u0435 <code>Data_Investigation.ipynb<\/code>):<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 20% \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 80% \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0430\u044e\u0442\u0430\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423 15 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423 2 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0440\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423 4 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043d\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0424\u0430\u043a\u0442\u043e\u0440\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0448\u0430\u043d\u0441\u044b \u0432\u044b\u0436\u0438\u0442\u044c <\/h4>\n<p>\u0417\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u0442\u043e \u043b\u0435\u0442 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b, \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445. \u0412 [2] \u0438 [3] \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \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<ol>\n<li>\n<p><strong>\u041f\u043e\u043b<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e 75% \u0436\u0435\u043d\u0449\u0438\u043d \u0438 16% \u043c\u0443\u0436\u0447\u0438\u043d [2]).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u043e\u0437\u0440\u0430\u0441\u0442<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e 52% \u0434\u0435\u0442\u0435\u0439 [2]).<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b<\/strong> (\u0432\u044b\u0436\u0438\u043b\u043e \u0438\u0437 1 \u043a\u043b\u0430\u0441\u0441\u0430 62%, \u0438\u0437 2 &#8212; 41%, \u0438\u0437 3 &#8212; 25% [2]).<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0438 \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u044d\u0432\u0430\u043a\u0443\u0430\u0446\u0438\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432. \u041f\u043e \u043f\u0440\u0438\u043a\u0430\u0437\u0443 \u043a\u0430\u043f\u0438\u0442\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432 \u0448\u043b\u044e\u043f\u043a\u0438 \u0441\u0430\u0436\u0430\u043b\u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u0438 \u0434\u0435\u0442\u0435\u0439 [4, 5].<\/p>\n<p>\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0430\u043b\u043e\u0441\u044c \u0432 \u043e\u0431\u0449\u0435\u0439 \u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 1 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0434 \u0432\u0442\u043e\u0440\u044b\u043c \u0438 \u0442\u0440\u0435\u0442\u044c\u0438\u043c, \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0434 \u0442\u0440\u0435\u0442\u044c\u0438\u043c [2]. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u044e\u0442\u044b 1 \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438\u0441\u044c \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a \u043f\u0430\u043b\u0443\u0431\u0435 [2].<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043b\u0438 2 \u043b\u0438\u0444\u0442\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 &#8212; 1 \u043b\u0438\u0444\u0442, \u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u043b\u0438\u0444\u0442\u044b \u043d\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 [2].<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043f\u0430\u0440\u043e\u0445\u043e\u0434\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u0432\u0430\u043a\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0434\u044f\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u0438 \u0441\u0442\u044e\u0430\u0440\u0434\u044b. \u041f\u0440\u0438\u0447\u0435\u043c \u0432 1 \u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u044e\u0430\u0440\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u044e\u0442, \u0430 \u0432\u043e 2 \u0438 3 &#8212; \u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 [7]. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0441\u0442\u044e\u0430\u0440\u0434\u044b \u0438\u043c\u0435\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0438\u0447\u043d\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u0438 \u0432\u044b\u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 [7], \u0430 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0441\u0442\u044e\u0430\u0440\u0434\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0432\u0430\u043b\u0438 \u0434\u0432\u0435\u0440\u0438 \u0432 \u043a\u0430\u044e\u0442\u044b [6], \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0430\u043b\u0443\u0431\u0443.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\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 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b <\/h4>\n<p>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0434\u043b\u044f \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435.<\/p>\n<pre><code>import matplotlib.pyplot as plt import numpy as np  # \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 males_total = len(df.loc[(df['Sex'] == 'male')]) females_total = len(df.loc[(df['Sex'] == 'female')]) males_survived = len(df.loc[((df['Sex'] == 'male') &amp; (df['Survived'] == 1))]) females_survived = len(df.loc[((df['Sex'] == 'female') &amp; (df['Survived'] == 1))])  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c survivors_counts = {     '\u0412\u044b\u0436\u0438\u043b\u0438': [males_survived, females_survived],     '\u041f\u043e\u0433\u0438\u0431\u043b\u0438': [males_total-males_survived, females_total-females_survived] }  fig, ax = plt.subplots() bottom = np.zeros(2)  for key, count in survivors_counts.items():     p = ax.bar(('\u041c\u0443\u0436\u0447\u0438\u043d\u044b', '\u0416\u0435\u043d\u0449\u0438\u043d\u044b'), count, width=0.6, label=key, bottom=bottom)     bottom += count     ax.bar_label(p, label_type='center')  ax.set_title('\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430') ax.set_ylabel('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a') ax.legend() plt.show() <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u0430, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u043c \u0440\u0430\u043d\u0435\u0435 [2, 3]:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u043c\u0443\u0436\u0447\u0438\u043d: 18.89%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0436\u0435\u043d\u0449\u0438\u043d: 74.2%<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u0430\u044e\u0442\u044b (\u043a\u043e\u0434 \u0441\u043c. \u0432 \u0444\u0430\u0439\u043b\u0435 <code>Data_Investigation.ipynb<\/code>). <\/p>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u0430\u044e\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 1 \u043a\u043b\u0430\u0441\u0441\u0430: 62.96%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 2 \u043a\u043b\u0430\u0441\u0441\u0430: 47.28%<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0436\u0438\u043b\u043e \u0438\u0437 3 \u043a\u043b\u0430\u0441\u0441\u0430: 24.24%<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b \u0438 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u044e\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u043d\u0438\u043c\u0438 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 (\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438), \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0442\u044c.<\/p>\n<h4>\u0412\u043e\u0437\u0440\u0430\u0441\u0442 <\/h4>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445, \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c.<\/p>\n<pre><code>from collections import Counter  #\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0438 \u043f\u0430\u0441\u0441\u0436\u0438\u0440\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b survivors = df.loc[(df['Survived'] == 1)] male_survivors = df.loc[((df['Sex'] == 'male') &amp; (df['Survived'] == 1))] female_survivors = df.loc[((df['Sex'] == 'female') &amp; (df['Survived'] == 1))]  #\u0427\u0438\u0441\u043b\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u0432 num_of_ages = len(dict(Counter(survivors['Age'])).keys())  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fig, axs = plt.subplots(2,2) fig.set_figwidth(20) fig.set_figheight(10) names = [['\u0412\u0441\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u044b', '\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435'], ['\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u043c\u0443\u0436\u0447\u0438\u043d\u044b', '\u0412\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u0436\u0435\u043d\u0449\u0438\u043d\u044b']] for i, surv in enumerate([[df, survivors], [male_survivors, female_survivors]]):     for j, subsurv in enumerate(surv):         axs[i][j].hist(subsurv['Age'], bins=num_of_ages)         axs[i][j].set_title(names[i][j])         axs[i][j].set_xlabel('\u0412\u043e\u0437\u0440\u0430\u0441\u0442, \u043b\u0435\u0442')         axs[i][j].set_ylabel('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a')         axs[i][j].set_ylim(0,30)         axs[i][j].set_xlim(0,70) plt.show() <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 &#8212; \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 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c 2 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u044b: \u043e\u0434\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0442\u044f\u043c, \u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u043b\u044e\u0434\u044f\u043c \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c 20-30 \u043b\u0435\u0442. \u041f\u0440\u0438\u0447\u0435\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u0445\u043e\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438 \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u03bc, \u043f\u0430\u0434\u0430\u044e\u0442 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<br \/> \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u0441\u043f\u0430\u0441\u043b\u0438\u0441\u044c.<\/p>\n<pre><code>import numpy as np  children = df.loc[((df['Age'] &lt; np.float64(18.0)) &amp; (df['Age'] > 0))] survivors_children = df.loc[((df['Age'] &lt; np.float64(18.0)) &amp; (df['Survived'] == 1) &amp; (df['Age'] > 0))] print(f'\u041f\u0430\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0434\u043e 18 \u043b\u0435\u0442 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c {round(len(survivors_children)*100\/len(children), 2)}%') <\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u0430\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0434\u043e 18 \u043b\u0435\u0442 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c 53.98%.\\<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0434\u0435\u0442\u0435\u0439 \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0447\u0451\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0442\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043f\u0430\u0441\u043b\u043e\u0441\u044c \u0434\u0435\u0442\u0435\u0439 \u0434\u043e 5 \u043b\u0435\u0442.<\/p>\n<pre><code>df.loc[((df['Survived'] == 1) &amp; (df['Age'] > 0) &amp; (df['Age'] &lt; 18))].Age.hist() <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 5 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u0434\u0435\u0442\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<h4>\u0418\u043c\u0435\u043d\u0430 \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 <\/h4>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0435 \u0434\u043b\u044f 1912 \u0433\u043e\u0434\u043f \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a &#171;Mr&#187;, &#171;Mrs&#187;, &#171;Miss&#187;, &#171;Sir&#187;, &#171;Master&#187; \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u042d\u0442\u0438 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 [8]. \u0410\u0432\u0442\u043e\u0440 [9] \u0432 \u0445\u043e\u0434\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 &#171;\u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430&#187; \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043e\u0442\u0440\u0430\u0436\u0451\u043d\u043d\u044b\u0439 \u0432 \u0438\u043c\u0435\u043d\u0438, \u0442\u0435\u0441\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c, \u0438 \u044d\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d. \u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u043e\u0442 \u0442\u0438\u0442\u0443\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u0440\u043e\u0431\u0447\u0430\u0442\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c.<\/p>\n<pre><code>#\u041f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0442\u0438\u0442\u0443\u043b\u043e\u0432 titles = (\"Capt.\",\"Col.\",\"Major.\",\"Sir.\",\"Lady.\",\"Rev.\",\"Dr.\",\"Don.\",\"Jonkheer.\",\"Countess.\",\"Mrs.\",\"Ms.\",\"Mr.\",\"Mme.\",\"Mlle.\",\"Miss.\",\"Master.\")  #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u0442\u0443\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 titled_names = [] for name in df.Name:     for title in titles:         if title in name.split(' '):             titled_names.append(title)             break   #\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 - \u0422\u0438\u0442\u0443\u043b df.insert(12, 'Title', titled_names)  #\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \"\u0442\u0438\u0442\u0443\u043b: \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u0432\" ages = dict.fromkeys(titles, []) for i, title in enumerate(df.Title):     if not pd.isna(df.Age[i]):         ages[title] = ages[title] + [df.Age[i]]  #\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fig, ax = plt.subplots(figsize=(15,5)) ax.boxplot(ages.values(), labels=titles, vert=True) ax.set_ylabel('\u0412\u043e\u0437\u0440\u0430\u0441\u0442') plt.show() <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6 &#8212; \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u0442\u0443\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430. \u0412\u043e\u0437\u0440\u0430\u0441\u0442 \u043b\u044e\u0434\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 \u0435\u0433\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0438, \u043d\u043e \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0433\u0438\u0431\u043b\u0438 \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0433\u0438\u0431\u0448\u0438\u0445 \u0438 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0438 \u044d\u0442\u0438\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0443\u0436\u0447\u0438\u043d \u0438 \u0436\u0435\u043d\u0449\u0438\u043d \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0431\u0435\u0437 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430.<\/p>\n<pre><code>noage = df.loc[(pd.isna(df['Age']))] fig, ax =<\/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-404317","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/404317","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=404317"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/404317\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=404317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=404317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=404317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}