{"id":482901,"date":"2026-06-09T06:24:16","date_gmt":"2026-06-09T06:24:16","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=482901"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=482901","title":{"rendered":"\u041a\u0430\u043a \u0433\u043b\u0443\u0448\u0438\u0442\u044c \u043d\u0435\u0444\u0442\u044f\u043d\u0443\u044e \u0441\u043a\u0432\u0430\u0436\u0438\u043d\u0443\u2026 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c. \u0427\u0430\u0441\u0442\u044c 2, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c ML \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/1042232\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043c\u044b \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u0435\u0439 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0435 \u0442\u043e, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0448\u0430\u043b\u0438 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041c\u041b:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0434\u0432\u0443\u0445\u043a\u043e\u043d\u0442\u0443\u0440\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443: \u043e\u0444\u043b\u0430\u0439\u043d-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 XGBoost \u0438 CatBoost \u2014 \u0438 \u043be\u0433\u043a\u0438\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0447\u0435\u0440\u0435\u0437 Flask.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e <code>.fit()<\/code> \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043b\u043e\u0441\u0441\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0438 K\u2011method \u2014 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u00ab\u0431\u043e\u0438\u0442\u0441\u044f\u00bb \u043d\u0435\u0434\u043e\u043b\u0438\u0442\u044c \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u043b\u0438\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0442\u043e\u044f\u0442 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>CatBoost<\/strong> \u043b\u0443\u0447\u0448\u0435 \u043f\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u00ab\u0441\u044b\u0440\u044b\u043c\u0438\u00bb \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438, <strong>XGBoost<\/strong> \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0434\u0430\u043b \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043c\u0430\u043b\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (~350 \u0441\u0442\u0440\u043e\u043a) \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0442\u0432\u043e\u0440\u0438\u0442 \u0445\u0430\u043e\u0441: \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043a\u0430\u0447\u0443\u0442 \u043e\u0442 \u0441\u0438\u0434\u0430 \u043a \u0441\u0438\u0434\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u043f\u201120 \u043b\u0443\u0447\u0448\u0438\u0445 random_state, \u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0441\u044c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u2014 \u043e\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u0430 K\u2011\u0441\u0435\u0442\u043a\u0438 \u2014 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0432 Airflow \u0440\u0430\u0434\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u0438, \u0430 \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u043b\u043e\u0433\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 MLflow.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p><strong>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:<\/strong> <em>\u0418\u0437-\u0437\u0430 NDA \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043c\u0435\u0441\u0442\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u043e\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043e\u0432. \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (<img decoding=\"async\" class=\"formula inline\" source=\"R^2\" alt=\"R^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg\" width=\"16\" height=\"16\" data-width=\"2.705\" data-height=\"2.047\" data-vertical-align=\"-0.048\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, MAE \u0438 \u0434\u0440.) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0412\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043a\u043e\u0434 \u2014 \u044d\u0442\u043e \u043e\u0431\u0449\u0438\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b (\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430, \u043e\u0442\u0431\u043e\u0440 random_state, \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432). \u041e\u043d\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043b\u044e\u0431\u044b\u0445 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u0441 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0448\u0438\u0431\u043a\u0438.<\/em><\/p>\n<h3>1. \u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043e\u0431\u044ae\u043c\u043e\u0432\u00bb \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043a\u0430\u043a \u201c\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c\u201d \u0442\u0430\u0440\u0433\u0435\u0442<\/h3>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u043a\u0440\u0430\u0442\u043a\u043e \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0433\u0438\u0434\u0440\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0442\u0440\u0435\u0449\u0438\u043d\u043e\u0432\u0430\u0442\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430\u0445 \u0441 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0438\u043c \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u00ab\u0438\u043d\u0442\u0443\u0438\u0446\u0438\u044e + \u044d\u043c\u043f\u0438\u0440\u0438\u043a\u0443\u00bb, \u043d\u043e \u044d\u0442\u043e \u0434\u043e\u0440\u043e\u0433\u043e (\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u044b \u0441\u0442\u043e\u044f\u0442 \u043d\u0435\u0434\u0435\u0448\u0435\u0432\u043e). \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438: \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043e\u0431\u044ae\u043c <code>V<\/code> \u0441\u043b\u043e\u0436\u043d\u043e, \u0430 \u0432\u043e\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <strong>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/strong> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f (<code>delta<\/code>) \u2014 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0441\u043a\u0432\u0430\u0436\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043b\u0443\u0448\u0430\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u041c\u044b \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043d\u044b\u043d\u0435\u0448\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043b\u0430\u0441\u0442\u0430\/\u0441\u043a\u0432\u0430\u0436\u0438\u043d\u044b. \u0422\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u201c\u0431\u043e\u043b\u0435\u0435\u201d \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u0430. \u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u0440\u0433\u0435\u0442 \u201c-30\u201d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438 \u0434\u043b\u044f \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0441 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0432 100 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438 600 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>.<\/p>\n<pre><code class=\"python\">def add_delta_targets(df, liquids=(\"\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 1\", \"\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 2\", \"\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 3\")):    for liquid in liquids:        df[f\"\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c_\u043e\u0431\u044a\u0435\u043c\u043e\u0432_{liquid}\"] = (            df[f\"\u043e\u0431\u044a\u0435\u043c_{liquid}\"] - df[f\"\u043e\u0431\u044a\u0435\u043c_{liquid} \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f\"]        )    return df<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 <strong>\u0434\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/strong>:<br \/> <code><strong>V<\/strong><\/code> \u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043e\u0431\u044ae\u043c (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0444\u043e\u043b\u0431\u044d\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e prev_volume \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442);<br \/> <code><strong>delta<\/strong><\/code> \u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u00ab\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0431\u0430\u0432\u0438\u0442\u044c\u00bb \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044e (\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439).<\/p>\n<p>\u041d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0435 \u0434\u043b\u044f <code>delta<\/code> \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: <code>final_volume = prev_volume + predicted_delta<\/code>.<\/p>\n<h3>2. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430\u043f\u043e\u0432 \u043c\u043d\u043e\u0433\u043e?<\/h3>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 ML-\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445 \u0432\u0441e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f <code>train_test_split<\/code> \u2192 <code>fit<\/code> \u2192 <code>predict<\/code>. \u0412 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u043b\u043e. \u0423 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p><strong>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435<\/strong> (\u0432\u0441\u0435\u0433\u043e ~250-400 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421 \u0448\u0443\u043c\u043e\u043c<\/strong> (\u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440, \u0441\u043c. <a href=\"https:\/\/habr.com\/ru\/articles\/1042232\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a>).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f<\/strong> (\u0434\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"R^2=0.3\" alt=\"R^2=0.3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/71\/713\/713a1c51032789f6d038107b17d28714.svg\" width=\"64\" height=\"16\" data-width=\"8.613\" data-height=\"2.185\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/71\/713\/713a1c51032789f6d038107b17d28714.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/71\/713\/713a1c51032789f6d038107b17d28714.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"R^2=0.8\" alt=\"R^2=0.8\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a8\/a89\/a890ad81b2d5972456d22c1d495d3860.svg\" width=\"64\" height=\"16\" data-width=\"8.613\" data-height=\"2.185\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a8\/a89\/a890ad81b2d5972456d22c1d495d3860.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a8\/a89\/a890ad81b2d5972456d22c1d495d3860.svg 781w\" loading=\"lazy\" decode=\"async\"\/>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u0440\u0435\u0439\u043d \u0438 \u0442\u0435\u0441\u0442, \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c \u0448\u0443\u043c \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043b\u044e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432 \u0438 \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432.<br \/> \u041c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 <strong>\u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/strong>:<\/p>\n<pre><code>[\u0414\u0430\u043d\u043d\u044b\u0435] \u2794 [\u042d\u0442\u0430\u043f 0: \u041f\u043e\u0434\u0431\u043e\u0440 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (50 split)] \u2794 [\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435]               \u2794 [\u042d\u0442\u0430\u043f 1: \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 50 random_state] \u2794 [\u042d\u0442\u0430\u043f 2: \u041e\u0442\u0431\u043e\u0440 \u0442\u043e\u043f-20 \u043c\u043e\u0434\u0435\u043b\u0435\u0439]               \u2794 [\u042d\u0442\u0430\u043f 3: \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 K-loss \u0434\u043b\u044f \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u042d\u0442\u0430\u043f 0. \u041f\u043e\u0438\u0441\u043a \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434)<\/h4>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430<\/h3>\n<p>\u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c ML \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)search = RandomizedSearchCV(model, param_grid, cv=5)search.fit(X_train, y_train)best_params = search.best_params_<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u043b\u043e\u0445\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043c\u0430\u043b\u0430 (~350), \u0435\u0441\u043b\u0438 <code>random_state=42<\/code> \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \u0443\u0448\u043b\u0438 \u0432 \u0442\u0435\u0441\u0442, \u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u2014 \u0432 \u0442\u0440\u0435\u0439\u043d), \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u00ab\u043be\u0433\u043a\u0443\u044e\u00bb \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/strong>. \u041d\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 <code>random_state<\/code> (41 \u0438 43) <code>best_params<\/code> \u043c\u043e\u0433\u0443\u0442 \u0441\u043a\u0430\u043a\u0430\u0442\u044c: \u0441\u0435\u0433\u043e\u0434\u043d\u044f <code>depth=7<\/code>, \u0437\u0430\u0432\u0442\u0440\u0430 <code>depth=4<\/code>. \u041a\u0430\u043a\u043e\u0439 \u0431\u0440\u0430\u0442\u044c?<\/p>\n<\/li>\n<\/ol>\n<h3>\u041d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043d\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 <strong>\u0434\u043b\u044f 50 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439<\/strong>. \u041a\u0430\u0436\u0434\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u2014 \u0441\u0432\u043e\u0439 <code>random_state<\/code> (\u043e\u0442 1 \u0434\u043e 50). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c <code>best_params<\/code>. 50 \u2014 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u044f: \u043f\u0440\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u0447\u0438\u0441\u043b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b, \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u2014 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0442e\u0442 \u0431\u0435\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430.<\/p>\n<pre><code class=\"python\">def _most_common_params(param_list: list[dict]) -&gt; dict:    \"\"\"\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0443 (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.\"\"\"    if not param_list:        return {}        param_frequencies: dict[str, dict[str, int]] = {}    for params in param_list:        if not params:            continue        for param, value in params.items():            param_frequencies.setdefault(param, {})            value_str = str(value)            param_frequencies[param][value_str] = \\                param_frequencies[param].get(value_str, 0) + 1        most_common_params = {}    for param, frequencies in param_frequencies.items():        # \u0411\u0435\u0440e\u043c \u0441\u0430\u043c\u043e\u0435 \u0447\u0430\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435        value_str, _ = max(frequencies.items(), key=lambda x: x[1])        # \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0447\u0438\u0441\u043b\u043e        try:            value = int(value_str)        except ValueError:            try:                value = float(value_str)            except ValueError:                value = value_str        most_common_params[param] = value    return most_common_params<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u043e:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u0435\u043d<\/strong> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>max_depth<\/code> \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435), \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u0435\u043d<\/strong> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>min_child_weight<\/code> \u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0434\u0430e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 loss), \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u043c\u043e\u0434\u0430 \u0432\u0441e \u0440\u0430\u0432\u043d\u043e \u0443\u043a\u0430\u0436\u0435\u0442 \u043d\u0430 \u00ab\u0441\u0440\u0435\u0434\u043d\u044e\u044e\u00bb \u0442\u043e\u0447\u043a\u0443, \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434 \u0448\u0443\u043c.<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 <strong>\u043e\u0442\u0431\u0440\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u044b<\/strong>: \u0435\u0441\u043b\u0438 \u0432 48 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445 \u0432\u044b\u0431\u0440\u0430\u043d\u043e <code>learning_rate=0.05<\/code>, \u0430 \u0432 \u0434\u0432\u0443\u0445 \u2014 <code>0.5<\/code> (\u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434 \u0448\u0443\u043c), \u043c\u044b \u0432\u043e\u0437\u044c\u043ce\u043c <code>0.05<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u0442\u0430\u043f 1. \u041f\u0435\u0440\u0435\u0431\u043e\u0440 random_state<\/h4>\n<p>\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041e\u0431\u0443\u0447\u0430\u0435\u043c 50 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u0435\u043d\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e <code>random_state<\/code> \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 <code>.pkl<\/code>. \u0412\u044b\u0431\u043e\u0440 50 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0442\u0435\u043c \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432: \u044d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u043e\u043f-20 \u043b\u0443\u0447\u0448\u0438\u0445 <code>random_state<\/code> \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043e\u0442\u0431\u043e\u0440\u0430. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 Jaccard similarity \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043f-20 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u043d\u0430 50 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445 Jaccard \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 0.9.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c? \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c <strong>\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 composite\u2011score (R\u00b2 + MAE).<\/p>\n<h4>\u042d\u0442\u0430\u043f 2. \u041e\u0442\u0431\u043e\u0440 \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439<\/h4>\n<p>\u0412\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u0443\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0443:<\/p>\n<pre><code class=\"python\">def calculate_composite_score(r2, mae, r2_weight=0.4, mae_weight=0.6) -&gt; float:    normalized_mae_score = 1 \/ (1 + mae) if mae &gt; 0 else 1.0    normalized_r2 = max(0, r2)    return normalized_r2 * r2_weight + normalized_mae_score * mae_weight<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<ul>\n<li>\n<p>R\u00b2 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>MAE \u2014 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u0443\u0431\u043e\u043c\u0435\u0442\u0440\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0441\u0430 (0.4 \/ 0.6) \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438: MAE \u0432\u0430\u0436\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043b\u0438\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u0432 3 \u043c\u00b3 \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043d\u044c\u0433\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u044b\u0439 \u0441\u043a\u043e\u0440, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e R\u00b2 \u0438\u043b\u0438 MAE?<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043b\u044e\u0441\u044b<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041c\u0438\u043d\u0443\u0441\u044b<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>R\u00b2<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0425\u043e\u0440\u043e\u0448 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u00ab\u043e\u0431\u044a\u044f\u0441\u043de\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438\u00bb<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0441\u0434\u0432\u0438\u0433\u0443 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>y_pred = y_true + 5<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c R\u00b2=0.9, \u043d\u043e MAE=5 \u043c\u00b3)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>MAE<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0425\u043e\u0440\u043e\u0448 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430: \u00ab\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u0430\u0435\u043c\u0441\u044f \u043d\u0430 3 \u043a\u0443\u0431\u0430\u00bb<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0442\u0440\u0435\u043d\u0434\u0430 (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0434\u0430\u0441\u0442 MAE=3 \u043c\u00b3, \u043d\u043e R\u00b2\u22480)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>Composite<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0438 \u0444\u043e\u0440\u043c\u0443, \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0435\u0441\u043e\u0432 (\u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3a\/07\/7c\/3a077ce98a5894a77d636d8e4fbf7801.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 MAE vs R2 \" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 MAE vs R2 \" width=\"450\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/3a\/07\/7c\/3a077ce98a5894a77d636d8e4fbf7801.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/3a\/07\/7c\/3a077ce98a5894a77d636d8e4fbf7801.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 MAE vs R2<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441:<\/strong> \u043e\u0442\u0431\u043e\u0440 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u2014 \u044d\u0442\u043e \u043d\u0435 \u00ab\u0443\u0442\u0435\u0447\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb (data leakage). \u041a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u043e\u043f-20 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043b\u0435\u0433\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u043e\u043b\u0434\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\"># \u041f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044fcoverage_matrix = pd.DataFrame(index=all_well_ids, columns=top_random_states)for rs in top_random_states:    train_idx, test_idx = train_test_split(df, random_state=rs)    for well_id in test_idx:        coverage_matrix.loc[well_id, rs] = True# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: \u043a\u0430\u0436\u0434\u043e\u0435 \u043b\u0438 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u0442\u0435\u0441\u0442?wells_not_in_test = coverage_matrix.any(axis=1).value_counts()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0412\u044b\u0432\u043e\u0434:<\/strong> \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u0434\u0430\u044e\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0432 \u0442\u0440\u0435\u0439\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u00ab\u0442\u0440\u0443\u0434\u043d\u044b\u0445\u00bb \u0441\u043a\u0432\u0430\u0436\u0438\u043d \u0438 \u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0438\u0445, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043b\u0435\u0433\u043a\u0438\u0435.<\/p>\n<p><strong>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0438\u0442\u043e\u0433\u0438<\/strong>: \u0434\u043b\u044f \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u0438\u0437 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438. 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 20 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u043c \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u0440\u0435\u0439\u043d \u0438 \u0442\u0435\u0441\u0442. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u043f\u043e \u044d\u0442\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c.<\/p>\n<h4>\u042d\u0442\u0430\u043f 3. K\u2011\u043c\u0435\u0442\u043e\u0434: \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438<\/h4>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0412 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0438\u0440\u0435 \u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0430 (\u0441\u043a\u0432\u0430\u0436\u0438\u043d\u0443 \u043d\u0435 \u0437\u0430\u0433\u043b\u0443\u0448\u0438\u043b\u0438, \u0433\u0430\u0437 \u043f\u043e\u0448\u0435\u043b \u043d\u0430 \u0443\u0441\u0442\u044c\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f) \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <strong>\u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u0434\u043e\u0440\u043e\u0436\u0435<\/strong>, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u043b\u0438\u0432 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0445\u043e\u0434 \u0441\u043e\u0441\u0442\u0430\u0432\u0430).<\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430 \u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u0437\u0430 \u043f\u0435\u0440\u0435\u043b\u0438\u0432, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e MSE.<\/p>\n<h3>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 K-\u043c\u0435\u0442\u043e\u0434\u0430<\/h3>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f MSE: <img decoding=\"async\" class=\"formula inline\" source=\"L = \\frac{1}{2}(y_{true} - y_{pred})^2\" alt=\"L = \\frac{1}{2}(y_{true} - y_{pred})^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7db\/7db3a8e354e8352af374aa48257ed5df.svg\" width=\"160\" height=\"32\" data-width=\"20.854\" data-height=\"4.588\" data-vertical-align=\"-1.729\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7db\/7db3a8e354e8352af374aa48257ed5df.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7db\/7db3a8e354e8352af374aa48257ed5df.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442: <img decoding=\"async\" class=\"formula inline\" source=\"g = y_{pred} - y_{true}\" alt=\"g = y_{pred} - y_{true}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ac\/ac4\/ac45b6b042522eef9936dabbb4212194.svg\" width=\"120\" height=\"12\" data-width=\"15.518\" data-height=\"1.969\" data-vertical-align=\"-0.65\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ac\/ac4\/ac45b6b042522eef9936dabbb4212194.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ac\/ac4\/ac45b6b042522eef9936dabbb4212194.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0413\u0435\u0441\u0441\u0438\u0430\u043d (\u0434\u043b\u044f XGBoost): <img decoding=\"async\" class=\"formula inline\" source=\"h = 1\" alt=\"h = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg\" width=\"40\" height=\"12\" data-width=\"5.451\" data-height=\"1.756\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg 781w\" loading=\"lazy\" decode=\"async\"\/> (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430)<\/p>\n<p><strong>\u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (\u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f MSE):<\/strong><\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"L_{asym} = \\begin{cases}  \\frac{1}{2} (y_{pred} - y_{true})^2 + K \\cdot (y_{true} - y_{pred}), &amp; y_{pred} &lt; y_{true} \\\\ \\frac{1}{2} (y_{pred} - y_{true})^2, &amp; y_{pred} \\ge y_{true} \\end{cases}\" alt=\"L_{asym} = \\begin{cases}  \\frac{1}{2} (y_{pred} - y_{true})^2 + K \\cdot (y_{true} - y_{pred}), &amp; y_{pred} &lt; y_{true} \\\\ \\frac{1}{2} (y_{pred} - y_{true})^2, &amp; y_{pred} \\ge y_{true} \\end{cases}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5c70d0a87ebcb7439e1fed26a6fdb8.svg\" width=\"480\" height=\"40\" data-width=\"60.35\" data-height=\"5.927\" data-vertical-align=\"-2.398\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5c70d0a87ebcb7439e1fed26a6fdb8.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5c70d0a87ebcb7439e1fed26a6fdb8.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442:<\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"g = \\begin{cases}  y_{pred} - y_{true} - K, &amp; y_{pred} &lt; y_{true} \\\\ y_{pred} - y_{true}, &amp; y_{pred} \\ge y_{true} \\end{cases}\" alt=\"g = \\begin{cases}  y_{pred} - y_{true} - K, &amp; y_{pred} &lt; y_{true} \\\\ y_{pred} - y_{true}, &amp; y_{pred} \\ge y_{true} \\end{cases}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ea\/ea1\/ea1a2e32bb7982d71ccf8a56ddf27cbd.svg\" width=\"288\" height=\"40\" data-width=\"36.556\" data-height=\"5.428\" data-vertical-align=\"-2.148\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ea\/ea1\/ea1a2e32bb7982d71ccf8a56ddf27cbd.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ea\/ea1\/ea1a2e32bb7982d71ccf8a56ddf27cbd.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0413\u0435\u0441\u0441\u0438\u0430\u043d \u043e\u0441\u0442\u0430e\u0442\u0441\u044f <img decoding=\"async\" class=\"formula inline\" source=\"h = 1\" alt=\"h = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg\" width=\"40\" height=\"12\" data-width=\"5.451\" data-height=\"1.756\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cf\/7cf59273303e6a05ac23480b9fb4aee0.svg 781w\" loading=\"lazy\" decode=\"async\"\/> (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430), \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f XGBoost, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u0441\u0441\u0438\u0430\u043d.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f CatBoost<\/h3>\n<p>CatBoost \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u0447\u0435\u0440\u0435\u0437 <code>obj<\/code> \u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <code>eval_metric<\/code>:<\/p>\n<pre><code class=\"python\">class RmseObjective:    \"\"\"\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f loss-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f CatBoost\"\"\"    def __init__(self, K: int):        self.K = int(K)    def calc_ders_range(self, approxes, targets, weights):        assert len(approxes) == len(targets)        if weights is not None:            assert len(weights) == len(approxes)        result = []        for index in range(len(targets)):            if approxes[index] &lt; targets[index]:                der1 = targets[index] - approxes[index] + self.K                der2 = -1            else:                der1 = targets[index] - approxes[index]                der2 = -1            if weights is not None:                der1 *= weights[index]                der2 *= weights[index]            result.append((der1, der2))        return resultclass RmseMetric:    \"\"\"\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u044f CatBoost\"\"\"    def __init__(self, K: int):        self.K = int(K)    def get_final_error(self, error, weight):        return np.sqrt(error \/ (weight + 1e-38))    def is_max_optimal(self):        return False    def evaluate(self, approxes, target, weight):        assert len(approxes) == 1        assert len(target) == len(approxes[0])        approx = approxes[0]        error_sum = 0.0        weight_sum = 0.0        for i in range(len(approx)):            w = 1.0 if weight is None else weight[i]            if approx[i] &lt; target[i]:                weight_sum += w                error_sum += w * ((approx[i] - target[i]) ** 2) + self.K * (target[i] - approx[i])            else:                weight_sum += w                error_sum += w * ((approx[i] - target[i]) ** 2)        return error_sum, weight_sum# \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u043b\u043e\u0441\u0441\u043e\u043cmodel = CatBoostRegressor(    **base_params,     loss_function=RmseObjective(K),     eval_metric=RmseMetric(K))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <code>calc_ders_range<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u043d\u0442\u0438\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 <code>der1<\/code> \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u0441\u0441\u0438\u0430\u043d <code>der2<\/code>. \u041c\u044b \u043b\u0438\u0448\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 CatBoost, \u0445\u043e\u0442\u044f \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f XGBoost<\/h3>\n<p>\u0410 \u0432\u043e\u0442 XGBoost \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e <code>(grad, hess)<\/code>:<\/p>\n<pre><code class=\"python\">class XGBoostCustomLoss:    \"\"\"\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f loss-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f XGBoost\"\"\"    def __init__(self, K: int):        self.K = int(K)    def custom_loss(self, y_pred, dtrain):        y_true = dtrain.get_label()        grad = np.zeros_like(y_true)        hess = np.ones_like(y_true)        if self.K == 0:            grad = y_pred - y_true        else:            for i in range(len(y_true)):                if y_pred[i] &lt; y_true[i]:                    grad[i] = y_pred[i] - y_true[i] - self.K                else:                    grad[i] = y_pred[i] - y_true[i]        return grad, hessclass XGBoostCustomMetric:    \"\"\"\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u044f XGBoost\"\"\"    def __init__(self, K: int):        self.K = int(K)    def custom_metric(self, y_pred, dtrain):        y_true = dtrain.get_label()        error_sum = 0.0        weight_sum = 0.0        for i in range(len(y_pred)):            w = 1.0            if y_pred[i] &lt; y_true[i]:                weight_sum += w                error_sum += w * ((y_pred[i] - y_true[i]) ** 2) + self.K * (y_true[i] - y_pred[i])            else:                weight_sum += w                error_sum += w * ((y_pred[i] - y_true[i]) ** 2)        final_error = np.sqrt(error_sum \/ (weight_sum + 1e-38))        return \"custom_rmse\", final_error# \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044fcustom_loss = XGBoostCustomLoss(K)custom_metric = XGBoostCustomMetric(K)model = xgb.train(        params,        dtrain,        num_boost_round=1000,        evals=[(dtrain, \"train\"), (dtest, \"test\")],        early_stopping_rounds=100,        obj=custom_loss.custom_loss,        custom_metric=custom_metric.custom_metric,        verbose_eval=False,    )<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 K-\u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439<\/h3>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438. \u041d\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043d\u0443\u0436\u0435\u043d \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u00bb, \u0430 <strong>\u0448\u0442\u0440\u0430\u0444 \u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0443 \u0440\u0430\u0437\u043d\u044b\u0439 \u0434\u043b\u044f \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430 \u0438 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u0430<\/strong>.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439<\/p>\n<\/th>\n<th>\n<p align=\"left\">K-\u043c\u0435\u0442\u043e\u0434<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f (0.8)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c K \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u043f\u0440\u0438 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u044b\u0445 \u0441\u043a\u0432\u0430\u0436\u0438\u043d\u0430\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c K=0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0432\u044b\u0448\u0430\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0447\u0435\u0440\u0435\u0437 K<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0440\u043e\u0433<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 (1x)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 1.5\u20132x \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u043d\u0435\u0433\u043b\u0430\u0434\u043a\u0430\u044f loss)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (<img decoding=\"async\" class=\"formula inline\" source=\"K=100\" alt=\"K=100\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/59\/597\/5977d28d2dcf76c607704e707b7c9fa5.svg\" width=\"64\" height=\"12\" data-width=\"8.422\" data-height=\"1.731\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/59\/597\/5977d28d2dcf76c607704e707b7c9fa5.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/59\/597\/5977d28d2dcf76c607704e707b7c9fa5.svg 781w\" loading=\"lazy\" decode=\"async\"\/> vs \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c 0.8, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u044b):<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u043e\u0434<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u043e\u043b\u044f \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043b\u0438\u0432 (\u043c\u00b3)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">K-\u043c\u0435\u0442\u043e\u0434 (K=100)<\/p>\n<\/td>\n<td>\n<p align=\"left\">10%<\/p>\n<\/td>\n<td>\n<p align=\"left\">5.0 \u043c\u00b3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u0432\u0430\u043d\u0442\u0438\u043b\u044c 0.8<\/p>\n<\/td>\n<td>\n<p align=\"left\">20%<\/p>\n<\/td>\n<td>\n<p align=\"left\">6.0 \u043c\u00b3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">K-\u043c\u0435\u0442\u043e\u0434 (K=50)<\/p>\n<\/td>\n<td>\n<p align=\"left\">18%<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.0 \u043c\u00b3<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0412\u044b\u0432\u043e\u0434:<\/strong> K-\u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"K=50\" alt=\"K=50\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/04\/045\/045070d90714934bbc87dcba72fdfd4f.svg\" width=\"56\" height=\"12\" data-width=\"7.291\" data-height=\"1.731\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/04\/045\/045070d90714934bbc87dcba72fdfd4f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/04\/045\/045070d90714934bbc87dcba72fdfd4f.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0434\u0430\u043b \u0442\u0443 \u0436\u0435 \u0437\u0430\u0449\u0438\u0442\u0443 \u043e\u0442 \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430 (18% &lt; 20%), \u043d\u043e \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u043c (3.0 \u043c\u00b3 \u043f\u0440\u043e\u0442\u0438\u0432 6.0 \u043c\u00b3). \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0441\u0434\u0432\u0438\u043d\u0443\u043b\u0430 \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0432\u0435\u0440\u0445\u00bb, \u0430 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u043c\u0435\u0449\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u0433\u0434\u0435 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e (\u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c).<\/p>\n<p><strong>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0438\u0442\u043e\u0433\u0438<\/strong>: \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u041a-\u043c\u0435\u0442\u043e\u0434 (\u041a \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c 20 \u043e\u0442 0 \u0434\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 600). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438\u043c\u0435\u0435\u043c \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e 20 \u043c\u043e\u0434\u0435\u043b\u044f\u043c. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 (\u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043d\u0438\u0437\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043c) \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c.<\/p>\n<h3>3. \u041f\u043e\u0434\u0431\u043e\u0440 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e K (\u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f)<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0432\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430: \u0433\u0440\u0430\u0444\u0438\u043a \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 (\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432) \u0441 \u0440\u043e\u0441\u0442\u043e\u043c <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438 \u0433\u0440\u0430\u0444\u0438\u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0438 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>.<\/p>\n<p>\u041a\u0430\u043a \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u044d\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438: \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u0438\u0437 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439. \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e <strong>\u0432\u0441\u0435<\/strong> \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b (\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043f\u043e 7 \u0440\u0430\u0437). \u0414\u043b\u044f <img decoding=\"async\" class=\"formula inline\" source=\"\u041a=0\" alt=\"\u041a=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13e\/13e90336f153c227f1992ac95042312f.svg\" width=\"40\" height=\"16\" data-width=\"5.506\" data-height=\"2.149\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13e\/13e90336f153c227f1992ac95042312f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13e\/13e90336f153c227f1992ac95042312f.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0434\u043e\u043b\u044e \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043d\u0430 1 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>) \u0438 \u0434\u043e\u043b\u044e \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u0430 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043d\u0430 2 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>). 1 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, 2 <img decoding=\"async\" class=\"formula inline\" source=\"\u043c^3\" alt=\"\u043c^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg\" width=\"16\" height=\"16\" data-width=\"2.345\" data-height=\"2.451\" data-vertical-align=\"-0.452\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fe\/fe8\/fe893c4098487c8e210e14f92cc6af9b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>  &#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u043e\u0433\u0438, \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0441\u0442\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0442\u0435\u043c\u0438, \u043a\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043b\u044e \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430 \u0438 \u0434\u043e\u043b\u044e \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u0430 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/74\/59\/ff\/7459ffc5ce305a2e2877f664a2bcc177.png\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a \" title=\"\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a \" width=\"450\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/74\/59\/ff\/7459ffc5ce305a2e2877f664a2bcc177.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/74\/59\/ff\/7459ffc5ce305a2e2877f664a2bcc177.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u0440\u0438\u0432\u044b\u0435: \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 trade-off. \u041c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u043f\u0435\u0440\u0435\u043b\u0438\u0432-\u043d\u0435\u0434\u043e\u043b\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u0439\u0442\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u043f\u0430\u0434\u0430\u0435\u0442, \u0430 \u043f\u0435\u0440\u0435\u043b\u0438\u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0440\u0430\u0441\u0442\u0435\u0442. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0430 \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0418 \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u044d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u043b\u044e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/> (\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0434\u043e\u043b\u044f \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 25% \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0446\u0435\u043b\u044c \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u043e 15%. \u0422\u043e\u0433\u0434\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/> = 15% \u2014 \u0438 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442: \u201c\u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u201d, \u043c\u044b \u0431\u0435\u0440e\u043c <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/> = 0% (\u0438\u043b\u0438 1-2% \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0448\u0443\u043c). \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u0435\u043d \u0438 \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0443\u0435\u0442\u0441\u044f \u0441 \u0431\u0438\u0437\u043d\u0435\u0441\u043e\u043c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f: \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u044f \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u0440\u0430\u0432\u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e, <strong>\u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0443<\/strong> \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e. \u201c\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u0442\u0430\u043a\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043b\u044e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0432 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"12\" height=\"12\" data-width=\"1.928\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0445\u043e\u0434 \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u0435\u0439. \u0415\u0441\u043b\u0438 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0434\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u0443\u0441\u043f\u0435\u0445\u0430.\u201d \u041d\u0430 \u043e\u043f\u044b\u0442\u043d\u043e-\u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f\u0445 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u0435\u0431\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h3>4. CatBoost vs XGBoost: \u0447\u0435\u0441\u0442\u043d\u0430\u044f \u0431\u0438\u0442\u0432\u0430 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0433 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0422\u0430\u043a \u0432\u044b\u0448\u043b\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u0414\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 CatBoost \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c <code>random_state<\/code>, \u0438 CatBoost \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"R^2\" alt=\"R^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg\" width=\"16\" height=\"16\" data-width=\"2.705\" data-height=\"2.047\" data-vertical-align=\"-0.048\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438 MAE. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u044b\u0433\u0440\u0430\u043b\u043e \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0432\u044b\u0431\u043e\u0440\u0430 \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435: \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 (\u0438 composite score \u0442\u043e\u0436\u0435) \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u0434\u043b\u044f Random Forest, LightGBM, XGBoost. Random Forest \u0438 LightGBM \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0445\u0443\u0436\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043c\u0430\u043b\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u0432\u043e\u0442 XGBoost \u043f\u043e\u043a\u0430\u0437\u0430\u043b MAE \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10% \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c CatBoost. \u0414\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0430\u044f:<\/p>\n<pre><code class=\"python\">bin_enc = ce.BinaryEncoder(cols=[\"\u043d\u043e\u043c\u0435\u0440 \u0441\u043a\u0432\u0430\u0436\u0438\u043d\u044b\", \"\u043a\u0443\u0441\u0442\"])ohe_enc = ce.OneHotEncoder(cols=[\"\u043c\u0435\u0441\u0442\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0435\", \"\u043f\u043b\u0430\u0441\u0442\"])X_encoded = ohe_enc.fit_transform(X)X_encoded = bin_enc.fit_transform(X_encoded)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u041a-\u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f XGBoost \u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b CatBoost \u0438 XGBoost. \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u041a CatBoost \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0438\u0441\u043a \u043b\u044e\u0431\u043e\u0439 \u0446\u0435\u043d\u043e\u0439, \u0447\u0442\u043e \u043d\u0430 \u043c\u0430\u043b\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u00ab\u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u0438\u00bb. \u0410 XGBoost \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u0441\u0435\u0440\u0432\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0438 \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5c\/d4\/50\/5cd4501ef253c913f957748f12f8cce5.png\" alt=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a \u0434\u043b\u044f CatBoost \u0438 XGBoost \" title=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a \u0434\u043b\u044f CatBoost \u0438 XGBoost \" width=\"650\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/5c\/d4\/50\/5cd4501ef253c913f957748f12f8cce5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/5c\/d4\/50\/5cd4501ef253c913f957748f12f8cce5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432 \u043e\u0442 \u041a \u0434\u043b\u044f CatBoost \u0438 XGBoost<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435? \u0423 XGBoost MAE \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 10% \u043d\u0438\u0436\u0435, \u0447\u0435\u043c CatBoost, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0445\u043e\u0434 \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u0435\u0439 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c. \u041e\u0434\u043d\u0430\u043a\u043e CatBoost \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0445\u0432\u043e\u0441\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a (\u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u043b\u0438\u0432) \u0443 \u043d\u0435\u0433\u043e \u043d\u0438\u0436\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u0430 \u043c\u0435\u0442\u043e\u0434\u0430: CatBoost \u2014 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043a\u0432\u0430\u0436\u0438\u043d (\u0433\u0434\u0435 \u0446\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0441\u043e\u043a\u0430), XGBoost \u2014 \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 (\u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f).<\/p>\n<h3>5. \u0418\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0447e\u0442\u0430 (Flask + \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f)<\/h3>\n<p>\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0432 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c (\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433) \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043a\u0432\u0430\u0436\u0438\u043d\u044b \u0432 UI.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043e\u0431\u044a\u0435\u043c\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u043a\u0432\u0430\u0436\u0438\u043d\u044b \u0438\u0437 \u0411\u0414).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u0438\u0437 20 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0441\u0435\u0442\u043a\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u044a\u0435\u043c\u0430 \u043e\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u0430 \u0442\u0430\u043a\u0436\u0435 Feature Importance \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c SHAP\/\u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430).<\/p>\n<\/li>\n<\/ol>\n<pre><code>[\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Flask] \u2794 [\u0417\u0430\u043f\u0440\u043e\u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439] \u2794 [\u0420\u0430\u0441\u0447\u0435\u0442 \u0410\u043d\u0441\u0430\u043c\u0431\u043b\u044f 20 \u043c\u043e\u0434\u0435\u043b\u0435\u0439] \u2794 [\u0412\u044b\u0432\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043e\u0431\u044a\u0435\u043c\u0430 \u043e\u0442 K]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/44\/4c\/5b\/444c5b7feb41cbaaf7c8e59aa29acc9f.png\" alt=\"\u0420\u0430\u0441\u0447\u0435\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \" title=\"\u0420\u0430\u0441\u0447\u0435\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \" width=\"450\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/44\/4c\/5b\/444c5b7feb41cbaaf7c8e59aa29acc9f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/44\/4c\/5b\/444c5b7feb41cbaaf7c8e59aa29acc9f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u0447\u0435\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0435\u0442 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0443 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c: \u043e\u043d \u0432\u0438\u0434\u0438\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437 (<img decoding=\"async\" class=\"formula inline\" source=\"K=0\" alt=\"K=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ef\/ef9\/ef904c9c0877f4dae6fe6c87ad7bf8cf.svg\" width=\"48\" height=\"12\" data-width=\"6.16\" data-height=\"1.731\" data-vertical-align=\"-0.186\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ef\/ef9\/ef904c9c0877f4dae6fe6c87ad7bf8cf.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ef\/ef9\/ef904c9c0877f4dae6fe6c87ad7bf8cf.svg 781w\" loading=\"lazy\" decode=\"async\"\/>) \u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0431\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f (\u0432\u044b\u0431\u0440\u0430\u0432 K &gt; 0). \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u044b \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0435 Flask-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>6. Airflow + MLflow<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u00ab\u043d\u0430\u0431\u043e\u0440 Jupyter-\u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u0432 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435\u00bb, \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0443\u044e\u0442\u0441\u044f \u0432 <strong>Apache Airflow<\/strong>:<\/p>\n<ul>\n<li>\n<p>DAG \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u044b \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f <code>V<\/code> \u0438 <code>delta<\/code> (<code>find_hyperparams<\/code>) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0448\u0430\u0433\u0438: <code>train_50_models<\/code> <img decoding=\"async\" class=\"formula inline\" source=\"\\rightarrow\" alt=\"\\rightarrow\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg\" width=\"16\" height=\"16\" data-width=\"2.262\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg 781w\" loading=\"lazy\" decode=\"async\"\/> <code>select_top_20<\/code> <img decoding=\"async\" class=\"formula inline\" source=\"\\rightarrow\" alt=\"\\rightarrow\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg\" width=\"16\" height=\"16\" data-width=\"2.262\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0a\/0a1\/0a183ed5142c1166275da8fb1cbbd43f.svg 781w\" loading=\"lazy\" decode=\"async\"\/> <code>generate_k_curves<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 (<img decoding=\"async\" class=\"formula inline\" source=\"R^2\" alt=\"R^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg\" width=\"16\" height=\"16\" data-width=\"2.705\" data-height=\"2.047\" data-vertical-align=\"-0.048\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e31\/e31b458b48dd58470b662e66b9742071.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, MAE, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0433\u0440\u0430\u0444\u0438\u043a\u0438 trade-off) \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u043e\u0433\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0435\u0441\u0442\u0440 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 <strong>MLflow<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u043d\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>\u0423\u0439\u0442\u0438 \u043e\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043e\u0432 \u043a \u0434\u0435\u043b\u044c\u0442\u0430\u043c, \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0442\u0430\u0440\u0433\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg\" width=\"16\" height=\"12\" data-width=\"2.011\" data-height=\"1.545\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a5\/a5f\/a5f3c6a11b03839d46af9fb43c97c188.svg 781w\" loading=\"lazy\" decode=\"async\"\/>-loss \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0439 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u043d\u0430 \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445, \u0440\u0435\u0448\u0438\u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u0435\u0444\u0438\u0446\u0438\u0442\u0430 \u0438 \u0448\u0443\u043c\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b XGBoost \u0438 CatBoost \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0438\u0442\u043e\u0433:<\/strong> \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0437\u043d\u0430\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u043f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u043e\u043f\u044b\u0442\u043d\u043e-\u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439. \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0440\u0438\u0441\u043a\u043e\u043c \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u0430 \u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u043c \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u0435\u0439. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0438\u0440\u0430\u0436\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0441\u0442\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u2014 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u044f NDA.<\/p>\n<\/div>\n<p>\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\/1045256\/\">https:\/\/habr.com\/ru\/articles\/1045256\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c ML \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412 \u041f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043c\u044b \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u0435\u0439 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0435 \u0442\u043e, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0448\u0430\u043b\u0438 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041c\u041b:\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0434\u0432\u0443\u0445\u043a\u043e\u043d\u0442\u0443\u0440\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443: \u043e\u0444\u043b\u0430\u0439\u043d-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 XGBoost \u0438 CatBoost \u2014 \u0438 \u043be\u0433\u043a\u0438\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0447\u0435\u0440\u0435\u0437 Flask.\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e .fit() \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043b\u043e\u0441\u0441\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0438 K\u2011method \u2014 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u00ab\u0431\u043e\u0438\u0442\u0441\u044f\u00bb \u043d\u0435\u0434\u043e\u043b\u0438\u0442\u044c \u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u043b\u0438\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0442\u043e\u044f\u0442 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.CatBoost \u043b\u0443\u0447\u0448\u0435 \u043f\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u00ab\u0441\u044b\u0440\u044b\u043c\u0438\u00bb \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438, XGBoost \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0434\u0430\u043b \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.\u041d\u0430 \u043c\u0430\u043b\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (~350 \u0441\u0442\u0440\u043e\u043a) \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0442\u0432\u043e\u0440\u0438\u0442 \u0445\u0430\u043e\u0441: \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043a\u0430\u0447\u0443\u0442 \u043e\u0442 \u0441\u0438\u0434\u0430 \u043a \u0441\u0438\u0434\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u043f\u201120 \u043b\u0443\u0447\u0448\u0438\u0445 random_state, \u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.\u0412\u0435\u0441\u044c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u2014 \u043e\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u0430 K\u2011\u0441\u0435\u0442\u043a\u0438 \u2014 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0432 Airflow \u0440\u0430\u0434\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u0438, \u0430 \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u043b\u043e\u0433\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 MLflow.\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440: \u0418\u0437-\u0437\u0430 NDA \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043c\u0435\u0441\u0442\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u043e\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043e\u0432. \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (, MAE \u0438 \u0434\u0440.) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0412\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043a\u043e\u0434 \u2014 \u044d\u0442\u043e \u043e\u0431\u0449\u0438\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b (\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430, \u043e\u0442\u0431\u043e\u0440 random_state, \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432). \u041e\u043d\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043b\u044e\u0431\u044b\u0445 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u0441 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0448\u0438\u0431\u043a\u0438.1. \u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043e\u0431\u044ae\u043c\u043e\u0432\u00bb \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043a\u0430\u043a \u201c\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c\u201d \u0442\u0430\u0440\u0433\u0435\u0442\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u043a\u0440\u0430\u0442\u043a\u043e \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0433\u0438\u0434\u0440\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0442\u0440\u0435\u0449\u0438\u043d\u043e\u0432\u0430\u0442\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430\u0445 \u0441 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0438\u043c \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u00ab\u0438\u043d\u0442\u0443\u0438\u0446\u0438\u044e + \u044d\u043c\u043f\u0438\u0440\u0438\u043a\u0443\u00bb, \u043d\u043e \u044d\u0442\u043e \u0434\u043e\u0440\u043e\u0433\u043e (\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u044b \u0441\u0442\u043e\u044f\u0442 \u043d\u0435\u0434\u0435\u0448\u0435\u0432\u043e). \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438: \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043e\u0431\u044ae\u043c V \u0441\u043b\u043e\u0436\u043d\u043e, \u0430 \u0432\u043e\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f (delta) \u2014 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0441\u043a\u0432\u0430\u0436\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043b\u0443\u0448\u0430\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u041c\u044b \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043d\u044b\u043d\u0435\u0448\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043b\u0430\u0441\u0442\u0430\/\u0441\u043a\u0432\u0430\u0436\u0438\u043d\u044b. \u0422\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u201c\u0431\u043e\u043b\u0435\u0435\u201d \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u0430. \u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u0440\u0433\u0435\u0442 \u201c-30\u201d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438 \u0434\u043b\u044f \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u0441 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0432 100  \u0438 600 .def add_delta_targets(df, liquids=(&#171;\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 1&#187;, &#171;\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 2&#187;, &#171;\u0436\u0438\u0434\u043a\u043e\u0441\u0442\u044c 3&#8243;)):    for liquid in liquids:        df[f&#187;\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c_\u043e\u0431\u044a\u0435\u043c\u043e\u0432_{liquid}&#187;] = (            df[f&#187;\u043e\u0431\u044a\u0435\u043c_{liquid}&#187;] &#8212; df[f&#187;\u043e\u0431\u044a\u0435\u043c_{liquid} \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f&#187;]        )    return df\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: V \u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043e\u0431\u044ae\u043c (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0444\u043e\u043b\u0431\u044d\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e prev_volume \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442); delta \u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u00ab\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0431\u0430\u0432\u0438\u0442\u044c\u00bb \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044e (\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439).\u041d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0435 \u0434\u043b\u044f delta \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: final_volume = prev_volume + predicted_delta.2. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430\u043f\u043e\u0432 \u043c\u043d\u043e\u0433\u043e?\u041e\u0431\u044b\u0447\u043d\u043e \u0432 ML-\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445 \u0432\u0441e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f train_test_split \u2192 fit \u2192 predict. \u0412 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u043b\u043e. \u0423 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435:\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 (\u0432\u0441\u0435\u0433\u043e ~250-400 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438).\u0421 \u0448\u0443\u043c\u043e\u043c (\u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440, \u0441\u043c. \u041f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c).\u0421 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f (\u0434\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c  \u0438\u043b\u0438 ).\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u0440\u0435\u0439\u043d \u0438 \u0442\u0435\u0441\u0442, \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c \u0448\u0443\u043c \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043b\u044e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u043e\u0432 \u0438 \u043d\u0435\u0434\u043e\u043b\u0438\u0432\u043e\u0432. \u041c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440:[\u0414\u0430\u043d\u043d\u044b\u0435] \u2794 [\u042d\u0442\u0430\u043f 0: \u041f\u043e\u0434\u0431\u043e\u0440 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (50 split)] \u2794 [\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435]               \u2794 [\u042d\u0442\u0430\u043f 1: \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 50 random_state] \u2794 [\u042d\u0442\u0430\u043f 2: \u041e\u0442\u0431\u043e\u0440 \u0442\u043e\u043f-20 \u043c\u043e\u0434\u0435\u043b\u0435\u0439]               \u2794 [\u042d\u0442\u0430\u043f 3: \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 K-loss \u0434\u043b\u044f \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438]\u042d\u0442\u0430\u043f 0. \u041f\u043e\u0438\u0441\u043a \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434)\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c ML \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a:X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)search = RandomizedSearchCV(model, param_grid, cv=5)search.fit(X_train, y_train)best_params = search.best_params_\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u043b\u043e\u0445\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043c\u0430\u043b\u0430 (~350), \u0435\u0441\u043b\u0438 random_state=42 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u044f \u0443\u0448\u043b\u0438 \u0432 \u0442\u0435\u0441\u0442, \u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u2014 \u0432 \u0442\u0440\u0435\u0439\u043d), \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u00ab\u043be\u0433\u043a\u0443\u044e\u00bb \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.\u041d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 random_state (41 \u0438 43) best_params \u043c\u043e\u0433\u0443\u0442 \u0441\u043a\u0430\u043a\u0430\u0442\u044c: \u0441\u0435\u0433\u043e\u0434\u043d\u044f depth=7, \u0437\u0430\u0432\u0442\u0440\u0430 depth=4. \u041a\u0430\u043a\u043e\u0439 \u0431\u0440\u0430\u0442\u044c?\u041d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043d\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 \u0434\u043b\u044f 50 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439. \u041a\u0430\u0436\u0434\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u2014 \u0441\u0432\u043e\u0439 random_state (\u043e\u0442 1 \u0434\u043e 50). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c best_params. 50 \u2014 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u044f: \u043f\u0440\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u0447\u0438\u0441\u043b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b, \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u2014 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0442e\u0442 \u0431\u0435\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430.def _most_common_params(param_list: list[dict]) -&gt; dict:    &#171;&#187;&#187;\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0443 (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.&#187;&#187;&#187;    if not param_list:        return {}        param_frequencies: dict[str, dict[str, int]] = {}    for params in param_list:        if not params:            continue        for param, value in params.items():            param_frequencies.setdefault(param, {})            value_str = str(value)            param_frequencies[param][value_str] = \\                param_frequencies[param].get(value_str, 0) + 1        most_common_params = {}    for param, frequencies in param_frequencies.items():        # \u0411\u0435\u0440e\u043c \u0441\u0430\u043c\u043e\u0435 \u0447\u0430\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435        value_str, _ = max(frequencies.items(), key=lambda x: x[1])        # \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0447\u0438\u0441\u043b\u043e        try:            value = int(value_str)        except ValueError:            try:                value = float(value_str)            except ValueError:                value = value_str        most_common_params[param] = value    return most_common_params\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u043e:\u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u0435\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, max_depth \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435), \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445.\u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u0435\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, min_child_weight \u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0434\u0430e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 loss), \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u043c\u043e\u0434\u0430 \u0432\u0441e \u0440\u0430\u0432\u043d\u043e \u0443\u043a\u0430\u0436\u0435\u0442 \u043d\u0430 \u00ab\u0441\u0440\u0435\u0434\u043d\u044e\u044e\u00bb \u0442\u043e\u0447\u043a\u0443, \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434 \u0448\u0443\u043c.\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0431\u0440\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u044b: \u0435\u0441\u043b\u0438 \u0432 48 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445 \u0432\u044b\u0431\u0440\u0430\u043d\u043e learning_rate=0.05, \u0430 \u0432 \u0434\u0432\u0443\u0445 \u2014 0.5 (\u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434 \u0448\u0443\u043c), \u043c\u044b \u0432\u043e\u0437\u044c\u043ce\u043c 0.05.\u042d\u0442\u0430\u043f 1. \u041f\u0435\u0440\u0435\u0431\u043e\u0440 random_state\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041e\u0431\u0443\u0447\u0430\u0435\u043c 50 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u0435\u043d\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e random_state \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 .pkl. \u0412\u044b\u0431\u043e\u0440 50 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0442\u0435\u043c \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432: \u044d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u043e\u043f-20 \u043b\u0443\u0447\u0448\u0438\u0445 random_state \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043e\u0442\u0431\u043e\u0440\u0430. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 Jaccard similarity \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043f-20 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u043d\u0430 50 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u0445 Jaccard \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 0.9.\u0417\u0430\u0447\u0435\u043c? \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 composite\u2011score (R\u00b2 + MAE).\u042d\u0442\u0430\u043f 2. \u041e\u0442\u0431\u043e\u0440 \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439\u0412\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u0443\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0443:def calculate_composite_score(r2, mae, r2_weight=0.4, mae_weight=0.6) -&gt; float:    normalized_mae_score = 1 \/ (1 + mae) if mae &gt; 0 else 1.0    normalized_r2 = max(0, r2)    return normalized_r2 * r2_weight + normalized_mae_score * mae_weightR\u00b2 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e.MAE \u2014 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u0443\u0431\u043e\u043c\u0435\u0442\u0440\u0430\u0445.\u0412\u0435\u0441\u0430 (0.4 \/ 0.6) \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438: MAE \u0432\u0430\u0436\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043b\u0438\u0432\/\u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u0432 3 \u043c\u00b3 \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043d\u044c\u0433\u0438.\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u044b\u0439 \u0441\u043a\u043e\u0440, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e R\u00b2 \u0438\u043b\u0438 MAE?\u041c\u0435\u0442\u0440\u0438\u043a\u0430\u041f\u043b\u044e\u0441\u044b\u041c\u0438\u043d\u0443\u0441\u044bR\u00b2\u0425\u043e\u0440\u043e\u0448 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u00ab\u043e\u0431\u044a\u044f\u0441\u043de\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438\u00bb\u041d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0441\u0434\u0432\u0438\u0433\u0443 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c y_pred = y_true + 5 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c R\u00b2=0.9, \u043d\u043e MAE=5 \u043c\u00b3)MAE\u0425\u043e\u0440\u043e\u0448 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430: \u00ab\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u0430\u0435\u043c\u0441\u044f \u043d\u0430 3 \u043a\u0443\u0431\u0430\u00bb\u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0442\u0440\u0435\u043d\u0434\u0430 (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0434\u0430\u0441\u0442 MAE=3 \u043c\u00b3, \u043d\u043e R\u00b2\u22480)Composite\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0438 \u0444\u043e\u0440\u043c\u0443, \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0435\u0441\u043e\u0432 (\u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438)\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 MAE vs R2\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: \u043e\u0442\u0431\u043e\u0440 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u2014 \u044d\u0442\u043e \u043d\u0435 \u00ab\u0443\u0442\u0435\u0447\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb (data leakage). \u041a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438.\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u043e\u043f-20 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043b\u0435\u0433\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u043e\u043b\u0434\u0430\u043c\u0438:# \u041f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044fcoverage_matrix = pd.DataFrame(index=all_well_ids, columns=top_random_states)for rs in top_random_states:    train_idx, test_idx = train_test_split(df, random_state=rs)    for well_id in test_idx:        coverage_matrix.loc[well_id, rs] = True# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: \u043a\u0430\u0436\u0434\u043e\u0435 \u043b\u0438 \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u0442\u0435\u0441\u0442?wells_not_in_test = coverage_matrix.any(axis=1).value_counts()\u0412\u044b\u0432\u043e\u0434: \u0442\u043e\u043f-20 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u0434\u0430\u044e\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0432 \u0442\u0440\u0435\u0439\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u00ab\u0442\u0440\u0443\u0434\u043d\u044b\u0445\u00bb \u0441\u043a\u0432\u0430\u0436\u0438\u043d \u0438 \u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0438\u0445, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043b\u0435\u0433\u043a\u0438\u0435.\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0438\u0442\u043e\u0433\u0438: \u0434\u043b\u044f \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u0438\u0437 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438. 20 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 20 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u043c \u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u0440\u0435\u0439\u043d \u0438 \u0442\u0435\u0441\u0442. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u043f\u043e \u044d\u0442\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c.\u042d\u0442\u0430\u043f 3. K\u2011\u043c\u0435\u0442\u043e\u0434: \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0412 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0438\u0440\u0435 \u043d\u0435\u0434\u043e\u043b\u0438\u0432 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0430 (\u0441\u043a\u0432\u0430\u0436\u0438\u043d\u0443 \u043d\u0435 \u0437\u0430\u0433\u043b\u0443\u0448\u0438\u043b\u0438, \u0433\u0430\u0437 \u043f\u043e\u0448\u0435\u043b \u043d\u0430 \u0443\u0441\u0442\u044c\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f) \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u0434\u043e\u0440\u043e\u0436\u0435,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-482901","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482901","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=482901"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482901\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=482901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=482901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=482901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}