{"id":454208,"date":"2025-04-01T17:09:46","date_gmt":"2025-04-01T17:09:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=454208"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=454208","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e XGBoost: \u043e\u0442 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u0440\u0430\u043c\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u0440\u043c\u0430\u0445 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041c\u0438\u0445\u0430\u0438\u043b \u0427\u0438\u0440\u043a\u043e\u0432, \u044f data scientist \u0432 R-Style Softlab \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043a\u0435\u0439\u0441\u043e\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e XGBoost, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f BI-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043f\u0442\u0438\u0446\u0435\u0444\u0430\u0431\u0440\u0438\u043a\u0438.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1fc\/f22\/1cd\/1fcf221cdbe844b96f467f9c4e4d2c80.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1fc\/f22\/1cd\/1fcf221cdbe844b96f467f9c4e4d2c80.png\"\/><\/figure>\n<h2>\u041f\u0440\u043e\u0435\u043a\u0442, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b \u043f\u0440\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u043c \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c XGBoost \u2014 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0435\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f Python 3.12, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (Scikit-learn, XGBoost, CatBoost), \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (pandas, Seaborn) \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (Optuna).<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0438\u0437\u0443\u0447\u0430\u043b \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438\u0437 265 214 \u0441\u0442\u0440\u043e\u043a \u0438 36 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u0430 \u043f\u043e\u0447\u0442\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0433\u043e\u0434\u0430, \u043c\u043d\u043e\u0433\u043e \u0443\u0437\u043d\u0430\u043b \u043e \u043a\u0443\u0440\u0438\u0446\u0430\u0445, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0440\u043c\u0430 \u0438 \u0432\u043e\u0434\u044b, \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0445 \u0432 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u0445, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445.\u00a0<\/p>\n<p>\u041a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0434\u0430\u043b\u0435\u043a\u0438 \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u0430: \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 (\u043f\u0440\u0438\u0432\u0435\u0442 \u0441 \u041c\u0430\u0440\u0441\u0430?). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0443\u0431\u043e\u044e \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u043f\u0442\u0438\u0446\u044b, \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043c\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 20%.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0430:\u00a0<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0443 \u043e\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">df = df.dropna()<\/code><\/pre>\n<p>\u041a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0431\u043e\u043b\u0435\u0435 80%) \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"python\">df = df.drop(['\u0423\u0431\u043e\u0439\u041f\u0440\u043e\u0434\u0430\u0436\u0430\u0413\u043e\u043b\u043e\u0432\u044b', '\u0417\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u0412\u0435\u0441', '\u0417\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u0413\u043e\u043b\u043e\u0432\u044b', '\u0423\u0431\u043e\u0439\u0412\u0435\u0441', '\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u041f\u043b\u0430\u043d\u043e\u0432\u044b\u0439\u0423\u0431\u043e\u0439\u0412\u0435\u0441',        '\u041f\u043b\u0430\u043d\u043e\u0432\u044b\u0439\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u0420\u0430\u043d\u043d\u0438\u0439\u0423\u0431\u043e\u0439\u0412\u0435\u0441', '\u0420\u0430\u043d\u043d\u0438\u0439\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u0423\u0431\u043e\u0439\u041f\u0440\u043e\u0434\u0430\u0436\u0430\u0412\u0435\u0441'], axis=1)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u00ab\u0414\u0430\u0442\u0430\u00bb \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442:<\/p>\n<pre><code class=\"python\">df['\u0414\u0430\u0442\u0430'] = pd.to_datetime(df['\u0414\u0430\u0442\u0430'])<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">preview = df.loc[:, ~df.columns.isin(['ID\u0421\u0435\u0440\u0438\u044f', '\u0414\u0430\u0442\u0430'])] corr_matrix = preview.corr() plt.figure(figsize=(15, 10)) sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', fmt='.2f') plt.title('\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430') plt.show()<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. <\/strong>\u041d\u0443\u043b\u0435\u0432\u044b\u0435 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043c\u0435\u0434\u0438\u0430\u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043a \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c, \u0447\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">median_value_humid = df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'].median() median_value_temp = df['\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'].median() median_value_vent = df['\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'].median() df.loc[df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] == 0, '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] = median_value_humid df.loc[df['\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'] == 0, '\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'] = median_value_temp  df.loc[df['\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'] == 0, '\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'] = median_value_vent df.loc[df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] &gt; 100, '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] = median_value_humid<\/code><\/pre>\n<h2>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u00a0<\/h2>\n<p>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u044b\u043b\u0430 \u00ab\u0412\u0435\u0441\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433\u00bb.\u00a0<\/p>\n<p>\u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438:\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb8\/2d1\/027\/cb82d10271ba119185181b37f0529b46.png\" width=\"1600\" height=\"1220\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb8\/2d1\/027\/cb82d10271ba119185181b37f0529b46.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043b\u0430\u0431\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0441 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0438 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0441\u0438\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 (\u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430Max\u00bb, \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430Min\u00bb, \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431\u00bb). \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e \u0440\u0438\u0441\u043a \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u044f \u0432\u0437\u044f\u043b \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431\u00bb. \u0421\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u00ab\u0421\u0440\u0435\u0434\u043d\u0438\u0439\u0412\u0435\u0441\u041d\u043e\u0440\u043c\u0430\u00bb \u0438 \u00ab\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f\u00bb \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u0441\u0430, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u043e\u0442 \u0434\u043d\u044f \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f. \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043b\u043e \u0431\u044b \u00ab\u0443\u0442\u0435\u0447\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb (data leakage), \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u0431\u044b \u043a \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u043e\u0432\u0443\u0448\u043a\u0430 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0430\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439:\u00a0<\/p>\n<ul>\n<li>\n<p>ID<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431<\/p>\n<\/li>\n<li>\n<p>\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0440\u043c<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u043b\u043e\u0432\u044b\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 (\u043e\u043d\u0430 \u0436\u0435 \u2014 \u00ab\u0412\u0435\u0441\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433\u00bb)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0431\u044b\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e (80%) \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e (20%) \u0432\u044b\u0431\u043e\u0440\u043a\u0438:\u00a0<\/p>\n<pre><code class=\"python\">features = ['\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f', '\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431', '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431', '\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f','\u041a\u043e\u0440\u043c', '\u0412\u043e\u0434\u0430', '\u0413\u043e\u043b\u043e\u0432\u044b\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433'] target = ['\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441'] X = df[features] y = df[target] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<\/code><\/pre>\n<h2>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433 \u0438 \u0432\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432\u00a0<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u0442\u0438\u0446), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (baseline) \u044f \u0432\u044b\u0431\u0440\u0430\u043b XGBoost \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043b\u0435\u0441\u0430), \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u2014 \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u0434\u0432\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430: CatBoostRegressor \u0438 \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u043b Random Forest Regressor, \u0430 \u0432 \u0440\u043e\u043b\u0438 \u043c\u0435\u0442\u0430-\u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043d\u0430\u043c XGBoostRegressor.<\/p>\n<p>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433 \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439), \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u00ab\u0443\u0447\u0438\u0442\u0441\u044f\u00bb \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0435\u0451. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0430\u0433\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \ud83d\ude43 \u2014 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430!<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b\u00a0<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (\u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439) \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u0442\u043a\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u2013 \u0441\u0443\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0438\u043f\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.\u00a0<\/p>\n<p><strong>XGBoost (Extreme Gradient Boosting).<\/strong> \u042d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u043c \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u043e\u043c: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 L1 (Lasso) \u0438 L2 (Ridge) \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0436\u0435 XGBoost \u0441\u0442\u0440\u043e\u0438\u0442 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b.<\/p>\n<p><strong>Catboost. <\/strong>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0441\u0445\u043e\u0436\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443, \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c\u0438: \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044f\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (one-hot, label encoding) \u2013 \u043e\u043d \u0441\u0430\u043c \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442; \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>\u043e\u0441\u043e\u0431\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u0442\u0435\u0447\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043b\u0435\u0441.\u00a0 <\/strong>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0435\u043c \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0441\u0442\u0440\u043e\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u0442 \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f (\u0434\u043b\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438).\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p>1. \u0411\u0443\u0442\u0441\u0442\u0440\u044d\u043f\u0438\u043d\u0433 (Bootstrap sampling). \u041a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0437\u0430\u043c\u0435\u043d\u043e\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u2013 \u043d\u0435 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432\u043e\u0432\u0441\u0435.<\/p>\n<p>2. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (Random feature selection). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (feature bagging). \u042d\u0442\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>3. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 (Ensemble of decision trees). \u041a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0435\u0437 \u043e\u0431\u0440\u0435\u0437\u043a\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b (deep trees). \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0431\u0443\u0442\u0441\u0442\u0440\u044d\u043f\u0438\u043d\u0433\u0443 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c\u0443 \u0432\u044b\u0431\u043e\u0440\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438.<\/p>\n<p>4. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 (Ensemble learning). \u0423\u0441\u0440\u0435\u0434\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432.<\/p>\n<h2>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043f\u0435\u0440\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h2>\n<h3>XGBoost<\/h3>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u043e\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c XGBRegressor:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">XGB_model = XGBRegressor(random_state=42, n_jobs=-1, eval_metric='rmse')<\/code><\/pre>\n<p>\u0433\u0434\u0435 random_state=42 \u2013 \u0437\u0430\u0434\u0430\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, n_jobs=-1 \u2013 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430), eval_metric=&#8217;rmse&#8217; \u2013 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 (RMSE \u2013 \u043a\u043e\u0440\u0435\u043d\u044c \u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438).<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">XGB_model.fit(X_train, y_train) y_pred = XGB_model predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred) r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b XGBoost<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 2945.97<\/p>\n<\/li>\n<li>\n<p>MAE: 1498.84<\/p>\n<\/li>\n<\/ul>\n<h3>CatBoost<\/h3>\n<pre><code class=\"python\">cb_model = CatBoostRegressor(silent=True, random_state=22) cb_model.fit(X_train, y_train) y_pred = cb_model.predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred)   r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b CatBoost<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 2787.50<\/p>\n<\/li>\n<li>\n<p>MAE: 1404.66<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">base_models = [('rf', RandomForestRegressor(random_state=42, n_jobs=-1))]<\/code><\/pre>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u0430-\u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0441\u0430\u043c StackingRegressor<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">final_model = XGBRegressor(random_state=42, n_jobs=-1, eval_metric='rmse') stacking = StackingRegressor(estimators=base_models, final_estimator=final_model)<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">pipeline = Pipeline(steps=[('stacking', stacking)]) pipeline.fit(X_train, y_train) y_pred = pipeline.predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred) r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 3037.86<\/p>\n<\/li>\n<li>\n<p>MAE: 1379.53<\/p>\n<\/li>\n<\/ul>\n<h2>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Optuna<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Optuna. \u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u043d\u0438\u0437\u0438\u0442\u044c MSE \u0437\u0430 \u0441\u0447\u0435\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>Optuna \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>n_estimators (\u0447\u0438\u0441\u043b\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438),<\/p>\n<\/li>\n<li>\n<p>learning_rate (\u0448\u0430\u0433 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f),<\/p>\n<\/li>\n<li>\n<p>max_depth (\u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432),<\/p>\n<\/li>\n<li>\n<p>min_child_weight (\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u0443\u0437\u043b\u0430),<\/p>\n<\/li>\n<li>\n<p>subsample (\u0434\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430),<\/p>\n<\/li>\n<li>\n<p>colsample_bytree (\u0434\u043e\u043b\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b Optuna \u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435: \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p>XGBRegressor \u2014 9,7%,<\/p>\n<\/li>\n<li>\n<p>CatBoost \u2014 9,3%,<\/p>\n<\/li>\n<li>\n<p>StackingRegressor \u2014 10,2%.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 27 860 \u0433\u0440\u0430\u043c\u043c\u043e\u0432. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u0430\u0436\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0434\u043e 9-10% \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0445 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/700\/0c6\/08f\/7000c608f30ed43e0a7caed752d29358.png\" width=\"1522\" height=\"918\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/700\/0c6\/08f\/7000c608f30ed43e0a7caed752d29358.png\"\/><\/figure>\n<h2>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\u00a0<\/h2>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u043e \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b. \u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043a\u043e\u0440\u043c \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0432\u043e\u0434\u043e\u0439 \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3c\/fc7\/0d8\/c3cfc70d801909e4772e2d849e95677f.png\" width=\"1564\" height=\"924\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c3c\/fc7\/0d8\/c3cfc70d801909e4772e2d849e95677f.png\"\/><\/figure>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u0441 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438\u00a0<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043f\u0430\u0440\u0442\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b. \u041d\u0430 \u043d\u0438\u0445 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441 \u0444\u0430\u043a\u0442\u043e\u043c. \u041f\u0440\u043e\u0434\u0435\u043b\u0430\u0432 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (\u043a\u0430\u043a \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c), \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Catboost:<\/p>\n<pre><code class=\"python\">x = data[features] y_pred = cb.predict(x) data['\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u0432\u0435\u0441'] = y_pred data['\u041e\u0448\u0438\u0431\u043a\u0430'] = abs(data['\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u0432\u0435\u0441'] - data['\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441'])\/data['\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0439 \u0432\u0435\u0441'] * 100<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0438:<\/p>\n<pre><code>dz = data.groupby('ID')['\u041e\u0448\u0438\u0431\u043a\u0430'].mean().reset_index()<\/code><\/pre>\n<p>ID. \u00a0 \u00a0 \u041e\u0448\u0438\u0431\u043a\u0430<\/p>\n<p>589 \u00a0 \u00a0 4.376792<\/p>\n<p>1027 \u00a0 4.554168<\/p>\n<p>2499 \u00a0 3.376872<\/p>\n<p>6395 \u00a0 6.476118<\/p>\n<p>6407 \u00a0 7.115308<\/p>\n<p>6410 \u00a0 4.380329<\/p>\n<p>6411 \u00a0 3.547634<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442 3 \u0434\u043e 7%, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d49\/3b5\/235\/d493b523538414f5f33b2fdc14043aaf.png\" width=\"1481\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d49\/3b5\/235\/d493b523538414f5f33b2fdc14043aaf.png\"\/><\/figure>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<\/h3>\n<p>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 09.12.2020 \u043f\u043e 23.07.2024. \u0414\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043b \u043f\u0430\u0440\u0442\u0438\u0438, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430 \u0434\u0430\u0442\u0443 23.07.2024. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u0434\u043d\u044e \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f, \u0432\u044b\u0431\u0440\u0430\u043b 17 \u043f\u0430\u0440\u0442\u0438\u0439, \u0433\u0434\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u043f\u0442\u0438\u0446\u044b \u0431\u044b\u043b \u043c\u0435\u043d\u0435\u0435 40 \u0434\u043d\u0435\u0439, \u0438 \u0434\u0430\u043b\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445 \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0451\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u0421\u043b\u0438\u044f\u043d\u0438\u0435 (\u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044e) \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u043f\u0442\u0438\u0447\u043d\u0438\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0442\u0438\u044e \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0442\u0438\u0447\u043d\u0438\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0447\u0451\u0442 \u043f\u0430\u0434\u0435\u0436\u0430 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u044f\u043c: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u043b\u043e\u0432 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0442\u0438\u0447\u043d\u0438\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0434\u0435\u043d\u044c \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u043c\u0430 \u0438 \u0432\u043e\u0434\u044b, \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438).<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0440\u0430\u0441\u0447\u0451\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e ID \u043f\u0430\u0440\u0442\u0438\u0438 \u0438 \u0434\u043d\u044e \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0447\u0451\u0442 \u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u043f\u0430\u0434\u0435\u0436\u0430 (\u0443\u0431\u044b\u043b\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u043b\u043e\u0432) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0447\u0451\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0434\u0435\u0436\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d \u0440\u0430\u0441\u0447\u0451\u0442:<\/p>\n<ul>\n<li>\n<p>\u0421\u0440\u0435\u0434\u043d\u0438\u0445 \u0442\u0435\u043c\u043f\u043e\u0432 \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043a\u043e\u0440\u043c\u0430 \u0438 \u0432\u043e\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u043b\u043e\u0432 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0432\u0435\u0441\u0430. \u041f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0432\u0435\u0441 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043a\u043e\u043b\u043e\u043d\u043a\u043e\u0439 \u0441 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u043e\u0439 \u0434\u0430\u0442\u043e\u0439.<\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0434\u043d\u044f (2024-07-22) \u0431\u044b\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043a\u0430\u043a \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0443\u0442\u0451\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u044f\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f8\/3e3\/721\/6f83e3721cd7d89c42e72d076c4e93cd.png\" width=\"1600\" height=\"784\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6f8\/3e3\/721\/6f83e3721cd7d89c42e72d076c4e93cd.png\"\/><\/figure>\n<h3>\u041a\u0440\u0430\u0442\u043a\u0438\u0435 \u0438\u0442\u043e\u0433\u0438\u00a0<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0441\u0442\u0438\u0433 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u2013 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441, \u043e \u0447\u0435\u043c \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043e\u043b\u0438\u0434\u043d\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 R\u00b2 \u0438 \u043d\u0438\u0437\u043a\u0438\u0439 RMSE \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430. \u041f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0439 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f CatBoost, XGBoost \u0438 \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043b\u0435\u0441\u0430 \u0432 \u043e\u0434\u0438\u043d \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c.\u00a0\u00a0<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e joblib \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 .pkl, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0447\u0435\u0440\u0435\u0437 FastAPI. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0440\u0430\u0437 \u0432 \u0441\u0443\u0442\u043a\u0438 \u0434\u043b\u044f \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u0430.\u00a0<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u0434\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0441\u0430 \u043f\u0442\u0438\u0446\u044b, \u043d\u043e \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430 \u043f\u0438\u0449\u0438 \u0438 \u0432\u043e\u0434\u044b, \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/894260\/\"> https:\/\/habr.com\/ru\/articles\/894260\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u0440\u0430\u043c\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u0440\u043c\u0430\u0445 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041c\u0438\u0445\u0430\u0438\u043b \u0427\u0438\u0440\u043a\u043e\u0432, \u044f data scientist \u0432 R-Style Softlab \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043a\u0435\u0439\u0441\u043e\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e XGBoost, \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f BI-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043f\u0442\u0438\u0446\u0435\u0444\u0430\u0431\u0440\u0438\u043a\u0438.\u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041f\u0440\u043e\u0435\u043a\u0442, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u043f\u0442\u0438\u0446\u044b \u043f\u0440\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u043c \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c XGBoost \u2014 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0435\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f Python 3.12, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (Scikit-learn, XGBoost, CatBoost), \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (pandas, Seaborn) \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (Optuna).<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0438\u0437\u0443\u0447\u0430\u043b \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438\u0437 265 214 \u0441\u0442\u0440\u043e\u043a \u0438 36 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u0430 \u043f\u043e\u0447\u0442\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0433\u043e\u0434\u0430, \u043c\u043d\u043e\u0433\u043e \u0443\u0437\u043d\u0430\u043b \u043e \u043a\u0443\u0440\u0438\u0446\u0430\u0445, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0440\u043c\u0430 \u0438 \u0432\u043e\u0434\u044b, \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0445 \u0432 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u0445, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445.\u00a0<\/p>\n<p>\u041a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0434\u0430\u043b\u0435\u043a\u0438 \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u0430: \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 (\u043f\u0440\u0438\u0432\u0435\u0442 \u0441 \u041c\u0430\u0440\u0441\u0430?). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0443\u0431\u043e\u044e \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u043f\u0442\u0438\u0446\u044b, \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043c\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 20%.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0430:\u00a0<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0443 \u043e\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">df = df.dropna()<\/code><\/pre>\n<p>\u041a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0431\u043e\u043b\u0435\u0435 80%) \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"python\">df = df.drop(['\u0423\u0431\u043e\u0439\u041f\u0440\u043e\u0434\u0430\u0436\u0430\u0413\u043e\u043b\u043e\u0432\u044b', '\u0417\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u0412\u0435\u0441', '\u0417\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u0413\u043e\u043b\u043e\u0432\u044b', '\u0423\u0431\u043e\u0439\u0412\u0435\u0441', '\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u041f\u043b\u0430\u043d\u043e\u0432\u044b\u0439\u0423\u0431\u043e\u0439\u0412\u0435\u0441',        '\u041f\u043b\u0430\u043d\u043e\u0432\u044b\u0439\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u0420\u0430\u043d\u043d\u0438\u0439\u0423\u0431\u043e\u0439\u0412\u0435\u0441', '\u0420\u0430\u043d\u043d\u0438\u0439\u0423\u0431\u043e\u0439\u0413\u043e\u043b\u043e\u0432\u044b', '\u0423\u0431\u043e\u0439\u041f\u0440\u043e\u0434\u0430\u0436\u0430\u0412\u0435\u0441'], axis=1)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u00ab\u0414\u0430\u0442\u0430\u00bb \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442:<\/p>\n<pre><code class=\"python\">df['\u0414\u0430\u0442\u0430'] = pd.to_datetime(df['\u0414\u0430\u0442\u0430'])<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">preview = df.loc[:, ~df.columns.isin(['ID\u0421\u0435\u0440\u0438\u044f', '\u0414\u0430\u0442\u0430'])] corr_matrix = preview.corr() plt.figure(figsize=(15, 10)) sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', fmt='.2f') plt.title('\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430') plt.show()<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. <\/strong>\u041d\u0443\u043b\u0435\u0432\u044b\u0435 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043c\u0435\u0434\u0438\u0430\u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043a \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c, \u0447\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">median_value_humid = df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'].median() median_value_temp = df['\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'].median() median_value_vent = df['\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'].median() df.loc[df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] == 0, '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] = median_value_humid df.loc[df['\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'] == 0, '\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431'] = median_value_temp  df.loc[df['\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'] == 0, '\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f'] = median_value_vent df.loc[df['\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] &gt; 100, '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431'] = median_value_humid<\/code><\/pre>\n<h2>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u00a0<\/h2>\n<p>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u044b\u043b\u0430 \u00ab\u0412\u0435\u0441\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433\u00bb.\u00a0<\/p>\n<p>\u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438:\u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043b\u0430\u0431\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0441 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0438 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0441\u0438\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 (\u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430Max\u00bb, \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430Min\u00bb, \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431\u00bb). \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e \u0440\u0438\u0441\u043a \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u044f \u0432\u0437\u044f\u043b \u00ab\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431\u00bb. \u0421\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u00ab\u0421\u0440\u0435\u0434\u043d\u0438\u0439\u0412\u0435\u0441\u041d\u043e\u0440\u043c\u0430\u00bb \u0438 \u00ab\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f\u00bb \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u0441\u0430, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u043e\u0442 \u0434\u043d\u044f \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f. \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043b\u043e \u0431\u044b \u00ab\u0443\u0442\u0435\u0447\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb (data leakage), \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u0431\u044b \u043a \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u043e\u0432\u0443\u0448\u043a\u0430 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0430\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439:\u00a0<\/p>\n<ul>\n<li>\n<p>ID<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431<\/p>\n<\/li>\n<li>\n<p>\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0440\u043c<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u043b\u043e\u0432\u044b\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 (\u043e\u043d\u0430 \u0436\u0435 \u2014 \u00ab\u0412\u0435\u0441\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433\u00bb)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0431\u044b\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e (80%) \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e (20%) \u0432\u044b\u0431\u043e\u0440\u043a\u0438:\u00a0<\/p>\n<pre><code class=\"python\">features = ['\u0414\u0435\u043d\u044c\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u043d\u0438\u044f', '\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\u0420\u0430\u0431', '\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u0420\u0430\u0431', '\u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0446\u0438\u044f','\u041a\u043e\u0440\u043c', '\u0412\u043e\u0434\u0430', '\u0413\u043e\u043b\u043e\u0432\u044b\u041d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439\u0418\u0442\u043e\u0433'] target = ['\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441'] X = df[features] y = df[target] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<\/code><\/pre>\n<h2>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433 \u0438 \u0432\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432\u00a0<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u0442\u0438\u0446), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (baseline) \u044f \u0432\u044b\u0431\u0440\u0430\u043b XGBoost \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043b\u0435\u0441\u0430), \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u2014 \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u0434\u0432\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430: CatBoostRegressor \u0438 \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u043b Random Forest Regressor, \u0430 \u0432 \u0440\u043e\u043b\u0438 \u043c\u0435\u0442\u0430-\u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043d\u0430\u043c XGBoostRegressor.<\/p>\n<p>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433 \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439), \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u00ab\u0443\u0447\u0438\u0442\u0441\u044f\u00bb \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0435\u0451. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0430\u0433\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \ud83d\ude43 \u2014 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430!<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b\u00a0<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (\u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439) \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u0442\u043a\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u2013 \u0441\u0443\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0438\u043f\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.\u00a0<\/p>\n<p><strong>XGBoost (Extreme Gradient Boosting).<\/strong> \u042d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u043c \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u043e\u043c: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 L1 (Lasso) \u0438 L2 (Ridge) \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0436\u0435 XGBoost \u0441\u0442\u0440\u043e\u0438\u0442 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b.<\/p>\n<p><strong>Catboost. <\/strong>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0441\u0445\u043e\u0436\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443, \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c\u0438: \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044f\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (one-hot, label encoding) \u2013 \u043e\u043d \u0441\u0430\u043c \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442; \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>\u043e\u0441\u043e\u0431\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u0442\u0435\u0447\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043b\u0435\u0441.\u00a0 <\/strong>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0435\u043c \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0441\u0442\u0440\u043e\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u0442 \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f (\u0434\u043b\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438).\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p>1. \u0411\u0443\u0442\u0441\u0442\u0440\u044d\u043f\u0438\u043d\u0433 (Bootstrap sampling). \u041a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0437\u0430\u043c\u0435\u043d\u043e\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u2013 \u043d\u0435 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432\u043e\u0432\u0441\u0435.<\/p>\n<p>2. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (Random feature selection). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (feature bagging). \u042d\u0442\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>3. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 (Ensemble of decision trees). \u041a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0435\u0437 \u043e\u0431\u0440\u0435\u0437\u043a\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b (deep trees). \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0431\u0443\u0442\u0441\u0442\u0440\u044d\u043f\u0438\u043d\u0433\u0443 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c\u0443 \u0432\u044b\u0431\u043e\u0440\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438.<\/p>\n<p>4. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 (Ensemble learning). \u0423\u0441\u0440\u0435\u0434\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432.<\/p>\n<h2>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043f\u0435\u0440\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h2>\n<h3>XGBoost<\/h3>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u043e\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c XGBRegressor:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">XGB_model = XGBRegressor(random_state=42, n_jobs=-1, eval_metric='rmse')<\/code><\/pre>\n<p>\u0433\u0434\u0435 random_state=42 \u2013 \u0437\u0430\u0434\u0430\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, n_jobs=-1 \u2013 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430), eval_metric=&#8217;rmse&#8217; \u2013 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 (RMSE \u2013 \u043a\u043e\u0440\u0435\u043d\u044c \u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438).<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">XGB_model.fit(X_train, y_train) y_pred = XGB_model predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred) r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b XGBoost<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 2945.97<\/p>\n<\/li>\n<li>\n<p>MAE: 1498.84<\/p>\n<\/li>\n<\/ul>\n<h3>CatBoost<\/h3>\n<pre><code class=\"python\">cb_model = CatBoostRegressor(silent=True, random_state=22) cb_model.fit(X_train, y_train) y_pred = cb_model.predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred)   r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b CatBoost<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 2787.50<\/p>\n<\/li>\n<li>\n<p>MAE: 1404.66<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">base_models = [('rf', RandomForestRegressor(random_state=42, n_jobs=-1))]<\/code><\/pre>\n<ul>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u0430-\u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0441\u0430\u043c StackingRegressor<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">final_model = XGBRegressor(random_state=42, n_jobs=-1, eval_metric='rmse') stacking = StackingRegressor(estimators=base_models, final_estimator=final_model)<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">pipeline = Pipeline(steps=[('stacking', stacking)]) pipeline.fit(X_train, y_train) y_pred = pipeline.predict(X_test) rmse = mean_squared_error(y_test, y_pred, squared=False) mae = mean_absolute_error(y_test, y_pred) r2 = r2_score(y_test, y_pred) print(f\"R^2: {r2:.2f}\") print(f\"RMSE: {rmse:.2f}\") print(f\"MAE: {mae:.2f}\")<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong><\/p>\n<ul>\n<li>\n<p>R\u00b2: 0.99<\/p>\n<\/li>\n<li>\n<p>RMSE: 3037.86<\/p>\n<\/li>\n<li>\n<p>MAE: 1379.53<\/p>\n<\/li>\n<\/ul>\n<h2>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Optuna<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Optuna. \u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u043d\u0438\u0437\u0438\u0442\u044c MSE \u0437\u0430 \u0441\u0447\u0435\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>Optuna \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>n_estima<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-454208","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454208","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=454208"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454208\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}