{"id":290300,"date":"2018-10-04T11:20:02","date_gmt":"2018-10-04T07:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290300"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290300","title":{"rendered":"\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043d\u0430 Python. \u0427\u0430\u0441\u0442\u044c 1"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5de\/fed\/62e\/5defed62ea348f6e02365e283415b2fb.png\"><\/p>\n<p>  <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434<a href=\"https:\/\/towardsdatascience.com\/a-complete-machine-learning-walk-through-in-python-part-one-c62152f39420\"> A Complete Machine Learning Project Walk-Through in Python: Part One<\/a>.<\/i><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0448\u044c \u043a\u043d\u0438\u0433\u0443 \u0438\u043b\u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0448\u044c \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u043f\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0447\u0443\u0432\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0431\u043e\u0439 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u0435\u0434\u0438\u043d\u043e. \u0412\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u0443\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u044b \u043e\u0431\u0440\u0435\u0442\u0451\u0442\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u0441\u0444\u0435\u0440\u0435 data science.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0446\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0451\u043c \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u0430\u043f\u044b:<\/p>\n<ol>\n<li>\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0420\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/li>\n<li>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0413\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u041e\u0446\u0435\u043d\u043a\u0430 \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/li>\n<\/ol>\n<p>  \u0412\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u044d\u0442\u0430\u043f\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0442 \u043e\u0434\u0438\u043d \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438 \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 Python.<a href=\"https:\/\/github.com\/WillKoehrsen\/machine-learning-project-walkthrough\"> \u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442<\/a> \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 GitHub, \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u0435\u0436\u0438\u0442<a href=\"https:\/\/github.com\/WillKoehrsen\/machine-learning-project-walkthrough\/blob\/master\/Machine%20Learning%20Project%20Part%201.ipynb\"> \u0437\u0434\u0435\u0441\u044c.<\/a> \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430.<\/p>\n<h2>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043e\u0431\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f<a href=\"http:\/\/www.nyc.gov\/html\/gbee\/html\/plan\/ll84_scores.shtml\"> \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0431 \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0437\u0434\u0430\u043d\u0438\u0439<\/a> \u0432 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0435.<\/p>\n<p>  \u041d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u043b\u043b\u043e\u0432 Energy Star Score \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u0434\u0430\u043d\u0438\u044f, \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0431\u0430\u043b\u043b.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0435 \u0431\u0430\u043b\u043b\u044b Energy Star Score, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439:<\/p>\n<ul>\n<li>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f (Supervised): \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u0446\u0435\u043b\u044c, \u0438 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e \u0432\u0442\u043e\u0440\u044b\u043c.<\/li>\n<li>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f (Regression): \u0431\u0430\u043b\u043b Energy Star Score \u2014 \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f.<\/li>\n<\/ul>\n<p>  \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u0430\u044f\u200a \u2014\u200a \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0433\u043b\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Energy Star Score \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c\u0443, \u200a\u2014 \u200a\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f\u200a \u2014\u200a \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u0435\u0451 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b. \u0417\u043d\u0430\u044f \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u043c\u0435\u0440\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h2>\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0414\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, \u0431\u0435\u0437 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0438 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043d\u0430\u043c\u0435\u043a \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b<a href=\"http:\/\/stat.ethz.ch\/R-manual\/R-devel\/library\/datasets\/html\/mtcars.html\"> mtcars<\/a> \u0438<a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/iris\"> iris<\/a>). \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u043b\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443, \u0438\u0445 \u043d\u0443\u0436\u043d\u043e<a href=\"https:\/\/www.springboard.com\/blog\/data-wrangling\/\"> \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438<\/a> \u043a \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443. \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f, \u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u0434\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (dataframe) Pandas \u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u0445:<\/p>\n<pre><code>import pandas as pd import numpy as np  # Read in data into a dataframe  data = pd.read_csv('data\/Energy_and_Water_Data_Disclosure_for_Local_Law_84_2017__Data_for_Calendar_Year_2016_.csv')  # Display top of dataframe data.head()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4ac\/637\/b86\/4ac637b8682b2fcacddd155004681a0d.png\"><br \/>  <i>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/i><\/p>\n<p>  \u042d\u0442\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 60 \u043a\u043e\u043b\u043e\u043d\u043e\u043a. \u0414\u0430\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>Energy Star Score<\/code>, \u043d\u043e \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0438. \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u044f \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041d\u043e \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445, \u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a86\/c00\/ab2\/a86c00ab2d64629e644e7186c78724f7.png\"><\/p>\n<p>  \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u00abLocal Law 84\u00bb. \u041c\u044b \u043d\u0430\u0448\u043b\u0438<a href=\"http:\/\/www.nyc.gov\/html\/gbee\/html\/plan\/ll84.shtml\"> \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0432 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0435 \u0437\u0430\u043a\u043e\u043d\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0432\u0441\u0435\u0445 \u0437\u0434\u0430\u043d\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438<a href=\"http:\/\/www.nyc.gov\/html\/gbee\/downloads\/misc\/nyc_benchmarking_disclosure_data_definitions_2017.pdf\"> \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a<\/a>. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043d\u0435 \u0442\u043e\u0440\u043e\u043f\u0438\u043b\u0438\u0441\u044c \u0438 \u043d\u0435 \u0443\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0430\u0436\u043d\u043e\u0435!<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 Energy Star Score, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<blockquote><p>\u0420\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0438 \u043e\u0442 1 \u0434\u043e 100, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c\u0438 \u0437\u0434\u0430\u043d\u0438\u0439 \u043e\u0442\u0447\u0451\u0442\u043e\u0432 \u043e\u0431 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u0437\u0430 \u0433\u043e\u0434.<a href=\"https:\/\/www.energystar.gov\/buildings\/facility-owners-and-managers\/existing-buildings\/use-portfolio-manager\/interpret-your-results\/what\"> Energy Star Score<\/a> \u2014 \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0437\u0434\u0430\u043d\u0438\u0439.<\/p><\/blockquote>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u00abNot Available\u00bb. \u042d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 Python, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <code>object<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f, Pandas \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0451 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0443, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445. \u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>dataframe.info()<\/code>:<\/p>\n<pre><code># See the column data types and non-missing values data.info()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/db3\/b4d\/013\/db3b4d013ca25d7e5ac483f0c24fa1e4.png\"><\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0447\u0438\u0441\u043b\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ft\u00b2), \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e <code>float<\/code>)!<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u00abNot Available\u00bb \u043d\u0430 <i>not a number<\/i> (<code>np.nan<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 \u0442\u0438\u043f <code>float<\/code>:<\/p>\n<pre><code># Replace all occurrences of Not Available with numpy not a number data = data.replace({'Not Available': np.nan})  # Iterate through the columns for col in list(data.columns):     # Select columns that should be numeric     if ('ft\u00b2' in col or 'kBtu' in col or 'Metric Tons CO2e' in col or 'kWh' in          col or 'therms' in col or 'gal' in col or 'Score' in col):         # Convert the data type to float         data[col] = data[col].astype(float)<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 \u0443 \u043d\u0430\u0441 \u0441\u0442\u0430\u043d\u0443\u0442 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<h4>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>  \u041d\u0430\u0440\u044f\u0434\u0443 \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u2014 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0438 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c, \u043b\u0438\u0431\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 (<a href=\"https:\/\/github.com\/WillKoehrsen\/machine-learning-project-walkthrough\/blob\/master\/Machine%20Learning%20Project%20Part%201.ipynb\">\u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c<\/a>).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0b0\/5da\/a40\/0b05daa40ba77acca25ed859856759f2.png\"><br \/>  <i>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 \u043d\u0430 <u>StackOverflow<\/u>.<\/i><\/p>\n<p>  \u0423\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u0438 \u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u043e\u043d\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0435 \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u0443 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u0440\u043e\u0433, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (<a href=\"https:\/\/discuss.analyticsvidhya.com\/t\/what-should-be-the-allowed-percentage-of-missing-values\/2456\">\u0432\u043e\u0442 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435<\/a>), \u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043f\u0443\u0441\u0442\u044b\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043b\u0443\u0447\u0448\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435, \u043d\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0443\u0434\u0430\u043b\u0438\u043c \u00ab\u043b\u0438\u0448\u043d\u0438\u0435\u00bb \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u044f\u0441\u044c<a href=\"https:\/\/www.itl.nist.gov\/div898\/handbook\/prc\/section1\/prc16.htm\"> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439<\/a>:<\/p>\n<ul>\n<li>\u041d\u0438\u0436\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044f \u2212 3 \u2217 \u0438\u043d\u0442\u0435\u0440\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0430\u0445.<\/li>\n<li>\u0412\u044b\u0448\u0435 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044f + 3 \u2217 \u0438\u043d\u0442\u0435\u0440\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0430\u0445.<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434, \u0443\u0434\u0430\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 \u043d\u0430 Github. \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0443 \u043d\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 11 000 \u0437\u0434\u0430\u043d\u0438\u0439 \u0438 49 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0421\u043a\u0443\u0447\u043d\u044b\u0439, \u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u044d\u0442\u0430\u043f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e!<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B0%D0%B7%D0%B2%D0%B5%D0%B4%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%B0%D0%BD%D0%B0%D0%BB%D0%B8%D0%B7_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85\"> \u0420\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> (\u0420\u0410\u0414) \u2014 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432 \u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u0438\u0449\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438, \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u043b\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438.<\/p>\n<p>  \u041a\u043e\u0440\u043e\u0442\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0420\u0410\u0414 \u2014 \u044d\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430, \u0437\u0430\u0442\u0435\u043c \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u0412\u044b\u0432\u043e\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435, \u0438\u043b\u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0443 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044f \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h4>\u041e\u0434\u043d\u043e\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/h4>\n<p>  \u041d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2014 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Energy Star Score (\u0432 \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043e \u0432 <code>score<\/code>), \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0438 \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>matplotlib<\/code>.<\/p>\n<pre><code>import matplotlib.pyplot as plt # Histogram of the Energy Star Score plt.style.use('fivethirtyeight') plt.hist(data['score'].dropna(), bins = 100, edgecolor = 'k'); plt.xlabel('Score'); plt.ylabel('Number of Buildings');  plt.title('Energy Star Score Distribution');<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f82\/bf3\/84a\/f82bf384af1bd0c407f1e680d0b47263.png\"><\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e! \u0411\u0430\u043b\u043b Energy Star Score \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u043c, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u043b\u043b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0437\u0434\u0430\u043d\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0441\u0448\u0438\u0439 \u0438 \u043d\u0438\u0437\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e \u043d\u0435\u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0434\u0430\u043d\u0438\u0439 (\u0434\u043b\u044f Energy Star Score \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u0430\u043b\u043b\u0430, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u00ab\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c\u0438 \u0437\u0434\u0430\u043d\u0438\u0439 \u043e\u0442\u0447\u0451\u0442\u043e\u0432\u00bb, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u043a \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0437\u0434\u0430\u043d\u0438\u0439 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0451\u043c \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438, \u044d\u0442\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0438\u0445 \u043e\u0446\u0435\u043d\u043a\u0430\u0445 \u043d\u0430 \u044d\u043a\u0437\u0430\u043c\u0435\u043d\u0430\u0445. \u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0430\u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0437\u0434\u0430\u043d\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0438\u0435 \u0431\u0430\u043b\u043b\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0445 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u043b\u043b\u044b, \u0430 \u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0446\u0435\u043d\u043a\u0438. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u0443 \u0431\u0430\u043b\u043b\u043e\u0432 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043d\u043e \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439<\/h4>\n<p>  \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0420\u0410\u0414 \u2014 \u043f\u043e\u0438\u0441\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u043d\u0430\u0448\u0435\u0439 \u0446\u0435\u043b\u044c\u044e. \u041a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441 \u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439) \u043d\u0430 \u0446\u0435\u043b\u044c \u2014 \u044d\u0442\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Seaborn.<\/p>\n<p>  <a href=\"https:\/\/towardsdatascience.com\/histograms-and-density-plots-in-python-f6bda88f5ac0\">\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u043e\u0439 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439<\/a>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 Energy Star Score, \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0439 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0437\u0434\u0430\u043d\u0438\u044f (\u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u0434\u0430\u043d\u0438\u0439 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 100 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438):<\/p>\n<pre><code># Create a list of buildings with more than 100 measurements types = data.dropna(subset=['score']) types = types['Largest Property Use Type'].value_counts() types = list(types[types.values &gt; 100].index)  # Plot of distribution of scores for building categories figsize(12, 10)  # Plot each building for b_type in types:     # Select the building type     subset = data[data['Largest Property Use Type'] == b_type]          # Density plot of Energy Star Scores     sns.kdeplot(subset['score'].dropna(),                label = b_type, shade = False, alpha = 0.8);      # label the plot plt.xlabel('Energy Star Score', size = 20); plt.ylabel('Density', size = 20);  plt.title('Density Plot of Energy Star Scores by Building Type', size = 28);<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/23a\/718\/fd3\/23a718fd3139123b609e2521ffe46e3c.png\"><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0438\u043f \u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u043b\u043b\u043e\u0432. \u041e\u0444\u0438\u0441\u043d\u044b\u0435 \u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0431\u0430\u043b\u043b, \u0430 \u043e\u0442\u0435\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u0439. \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0438\u043f \u0437\u0434\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430\u0448\u0443 \u0446\u0435\u043b\u044c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c one-hot \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0437\u0434\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 Energy Star Score \u043f\u043e \u0440\u0430\u0439\u043e\u043d\u0430\u043c \u0433\u043e\u0440\u043e\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/224\/c69\/820\/224c69820a5c0362f804e37ae7d5de55.png\"><\/p>\n<p>  \u0420\u0430\u0439\u043e\u043d \u043d\u0435 \u0442\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0431\u0430\u043b\u043b, \u043a\u0430\u043a \u0442\u0438\u043f \u0437\u0434\u0430\u043d\u0438\u044f. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0439\u043e\u043d\u0430\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<a href=\"http:\/\/www.statisticshowto.com\/probability-and-statistics\/correlation-coefficient-formula\/\"> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430<\/a>. \u042d\u0442\u043e \u043c\u0435\u0440\u0430 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 +1 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 -1 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pearson_correlation_coefficient\"> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0b3\/455\/654\/0b34556548ab206112024fb0e8f69c01.png\"><\/p>\n<p>  \u0425\u043e\u0442\u044f \u044d\u0442\u043e\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0441 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412 Pandas \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043b\u044e\u0431\u044b\u043c\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438 \u0432 \u043a\u0430\u0434\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (dataframe):<\/p>\n<pre><code># Find all correlations with the score and sort  correlations_data = data.corr()['score'].sort_values()<\/code><\/pre>\n<p>  \u0421\u0430\u043c\u044b\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0441 \u0446\u0435\u043b\u044c\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b62\/181\/178\/b62181178669962fccf7caa472d9e2e8.png\"><\/p>\n<p>  \u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/598\/47f\/14a\/59847f14a4d8afe1ce8ff237c5d3fa36.png\"><\/p>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0438 \u0446\u0435\u043b\u044c\u044e, \u043f\u0440\u0438\u0447\u0451\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c EUI (\u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u044d\u0442\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u043b\u0435\u0433\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f).<a href=\"https:\/\/www.energystar.gov\/buildings\/facility-owners-and-managers\/existing-buildings\/use-portfolio-manager\/understand-metrics\/what-energy\"> EUI \u200a(Energy Use Intensity<\/a>, \u200a\u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438) \u2014\u200a \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0451\u043d\u043d\u043e\u0439 \u0437\u0434\u0430\u043d\u0438\u0435\u043c, \u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u0444\u0443\u0442 \u043f\u043b\u043e\u0449\u0430\u0434\u0438. \u042d\u0442\u0430 \u0443\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0438 \u0447\u0435\u043c \u043e\u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435. \u041b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u044b: \u0435\u0441\u043b\u0438 EUI \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u043e Energy Star Score \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043d\u0438\u0436\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h4>\u0414\u0432\u0443\u0445\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/h4>\n<p>  \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041a \u0446\u0432\u0435\u0442\u0430\u043c \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c Energy Star Score \u0438 EUI, \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0437\u0434\u0430\u043d\u0438\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/974\/204\/7de\/9742047ded29c74a9a8e6df9bf6396d1.png\"><\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 -0,7. \u041f\u043e \u043c\u0435\u0440\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f EUI \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f Energy Star Score, \u044d\u0442\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0443 \u0437\u0434\u0430\u043d\u0438\u0439 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0448 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f<a href=\"https:\/\/towardsdatascience.com\/visualizing-data-with-pair-plots-in-python-f228cf529166\"> Pairs Plot (\u043f\u0430\u0440\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a)<\/a>. \u042d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Seaborn \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>PairGrid <\/code>\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0440\u0430\u0441\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435, \u0441 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043f\u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u0438, \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u044f\u0434\u0440\u0430 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435.<\/p>\n<pre><code># Extract the columns to plot plot_data = features[['score', 'Site EUI (kBtu\/ft\u00b2)',                        'Weather Normalized Source EUI (kBtu\/ft\u00b2)',                        'log_Total GHG Emissions (Metric Tons CO2e)']]  # Replace the inf with nan plot_data = plot_data.replace({np.inf: np.nan, -np.inf: np.nan})  # Rename columns  plot_data = plot_data.rename(columns = {'Site EUI (kBtu\/ft\u00b2)': 'Site EUI',                                          'Weather Normalized Source EUI (kBtu\/ft\u00b2)': 'Weather Norm EUI',                                         'log_Total GHG Emissions (Metric Tons CO2e)': 'log GHG Emissions'})  # Drop na values plot_data = plot_data.dropna()  # Function to calculate correlation coefficient between two columns def corr_func(x, y, **kwargs):     r = np.corrcoef(x, y)[0][1]     ax = plt.gca()     ax.annotate(\"r = {:.2f}\".format(r),                 xy=(.2, .8), xycoords=ax.transAxes,                 size = 20)  # Create the pairgrid object grid = sns.PairGrid(data = plot_data, size = 3)  # Upper is a scatter plot grid.map_upper(plt.scatter, color = 'red', alpha = 0.6)  # Diagonal is a histogram grid.map_diag(plt.hist, color = 'red', edgecolor = 'black')  # Bottom is correlation and density plot grid.map_lower(corr_func); grid.map_lower(sns.kdeplot, cmap = plt.cm.Reds)  # Title for entire plot plt.suptitle('Pairs Plot of Energy Data', size = 36, y = 1.02); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5fa\/4cc\/94f\/5fa4cc94f9b91df5ad4fda37aa3ae1f0.png\"><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u043e\u0438\u0449\u0435\u043c \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u044f\u0434\u043e\u0432 \u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e <code>Weather Norm EUI<\/code> \u0438 <code>score<\/code>, \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0449\u0435\u043c \u0440\u044f\u0434 <code>Weather Norm EUI<\/code> \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <code>score<\/code>, \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u043e\u0438\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 -0,67. \u042d\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442, \u043d\u043e \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h2>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432<\/h2>\n<p>  <a href=\"https:\/\/elitedatascience.com\/feature-engineering-best-practices\">\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432<\/a> \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0442\u0434\u0430\u0447\u0443 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li><a href=\"https:\/\/machinelearningmastery.com\/discover-feature-engineering-how-to-engineer-features-and-how-to-get-good-at-it\/\">\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/a> \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0437 \u0441\u044b\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0445 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c, \u0441\u043a\u0430\u0436\u0435\u043c, \u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c, \u0438\u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c, \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c one-hot \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0437 \u0441\u044b\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li><a href=\"https:\/\/machinelearningmastery.com\/an-introduction-to-feature-selection\/\">\u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/a> \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0432 \u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u043e\u0431\u043e\u0431\u0449\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0434\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u00ab\u043b\u0438\u0448\u043d\u0435\u0433\u043e\u00bb, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435.<\/li>\n<\/ul>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0432\u0441\u044e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u043d\u0430 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b!<\/p>\n<p>  \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c (\u043a\u0432\u0430\u0440\u0442\u0430\u043b \u0438 \u0442\u0438\u043f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438) one-hot \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0437\u044f\u0442\u0438\u0435 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u043e\u0442 \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/hackernoon.com\/what-is-one-hot-encoding-why-and-when-do-you-have-to-use-it-e3c6186d008f\">One-hot \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0442\u0438\u043f \u00ab\u043e\u0444\u0438\u0441\u00bb, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0444\u0438\u0441\u043d\u043e\u0435, \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u0435\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a 1, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435 \u043e\u0444\u0438\u0441\u043d\u043e\u0435, \u0442\u043e 0.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044f\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<a href=\"https:\/\/datascience.stackexchange.com\/questions\/21650\/feature-transformation-on-input-data\"> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u043a\u043e\u0440\u043d\u0438, \u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u044b \u0438\u043b\u0438 \u0435\u0449\u0451 \u043a\u0430\u043a-\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438<\/a>, \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0437\u043d\u0430\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0438\u043a. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0438\u0445 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u044b, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0432\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a \u043d\u0438\u043c one-hot \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043e\u0431\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432 \u043e\u0434\u043d\u043e. \u0421\u0443\u0434\u044f \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043a\u0443\u0447\u0430 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e \u0432 Pandas \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e!<\/p>\n<pre><code># Copy the original data features = data.copy()  # Select the numeric columns numeric_subset = data.select_dtypes('number')  # Create columns with log of numeric columns for col in numeric_subset.columns:     # Skip the Energy Star Score column     if col == 'score':         next     else:         numeric_subset['log_' + col] = np.log(numeric_subset[col])          # Select the categorical columns categorical_subset = data[['Borough', 'Largest Property Use Type']]  # One hot encode categorical_subset = pd.get_dummies(categorical_subset)  # Join the two dataframes using concat # Make sure to use axis = 1 to perform a column bind features = pd.concat([numeric_subset, categorical_subset], axis = 1)<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 11 000 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 (\u0437\u0434\u0430\u043d\u0438\u0439) \u0441\u043e 110 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438 (\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438). \u041d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Energy Star Score, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u0443\u0434\u0430\u043b\u0438\u043c \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432<\/h4>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f 110 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a EUI \u0438 Weather Normalized Site EUI, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0432\u0435\u043d 0,997.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4ab\/c4f\/ad8\/4abc4fad887ef202d8d40961a8b02c34.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D1%83%D0%BB%D1%8C%D1%82%D0%B8%D0%BA%D0%BE%D0%BB%D0%BB%D0%B8%D0%BD%D0%B5%D0%B0%D1%80%D0%BD%D0%BE%D1%81%D1%82%D1%8C\"> \u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u044b\u043c\u0438<\/a>. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0442\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442<a href=\"https:\/\/www.quora.com\/Why-is-multicollinearity-bad-in-laymans-terms-In-feature-selection-for-a-regression-model-intended-for-use-in-prediction-why-is-it-a-bad-thing-to-have-multicollinearity-or-highly-correlated-independent-variables\"> \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u043e\u0431\u0449\u0430\u0442\u044c \u0438 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439<\/a>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043e\u0434\u043d\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u0430 \u043d\u0435 \u043e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0441 \u0446\u0435\u043b\u044c\u044e, \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0431\u044b \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438!<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u2014 \u0444\u0430\u043a\u0442\u043e\u0440 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 (<a href=\"http:\/\/www.statisticshowto.com\/variance-inflation-factor\/\">variance inflation factor<\/a>). \u041c\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0412-\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 (thebcorrelation coefficient). \u041e\u0442\u0431\u0440\u043e\u0441\u0438\u043c \u043e\u0434\u043d\u0443 \u043f\u0430\u0440\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0435\u0441\u043b\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 0,6. \u041a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 (\u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043d\u0430<a href=\"https:\/\/stackoverflow.com\/a\/43104383\"> Stack Overflow<\/a>).<\/p>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0440\u043e\u0433\u0438, \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<a href=\"http:\/\/www.dictionary.com\/browse\/empirical\"> \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u043d\u043e<\/a>, \u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0443 \u043d\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c 64 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u0438 \u043e\u0434\u043d\u0430 \u0446\u0435\u043b\u044c.<\/p>\n<pre><code># Remove any columns with all na values features  = features.dropna(axis=1, how = 'all') print(features.shape) (11319, 65)<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c<\/h2>\n<p>  \u041c\u044b \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u0418 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c (naive baseline) \u2014 \u043d\u0435\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0438\u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0438\u043b\u0438 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435. \u042d\u0442\u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u0437\u0430\u0434\u0430\u044e\u0442 \u0431\u0430\u0440\u044c\u0435\u0440, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0438\u0439 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432\u043e\u0437\u044c\u043c\u0451\u043c<a href=\"https:\/\/en.wikipedia.org\/wiki\/Mean_absolute_error\"> \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 (mae)<\/a> \u0432 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430\u0445. \u0414\u043b\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0439 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a, \u043d\u043e \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f<a href=\"https:\/\/www.coursera.org\/learn\/machine-learning-projects\/lecture\/wIKkC\/single-number-evaluation-metric\"> \u0441\u043e\u0432\u0435\u0442<\/a> \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043e\u0434\u043d\u0443 \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0438 \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438. \u0410 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440\u044b:<\/p>\n<ol>\n<li>\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u2014 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0446\u0435\u043b\u0438.<\/li>\n<li>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440, \u0442\u043e \u043d\u0435 \u0432\u0438\u0434\u0438\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u041c\u044b \u0437\u043d\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<\/ol>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 70 % \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 30 %:<\/p>\n<pre><code># Split into 70% training and 30% testing set X, X_test, y, y_test = train_test_split(features, targets,                                          test_size = 0.3,                                          random_state = 42)<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f:<\/p>\n<pre><code># Function to calculate mean absolute error def mae(y_true, y_pred):     return np.mean(abs(y_true - y_pred))  baseline_guess = np.median(y)  print('The baseline guess is a score of %0.2f' % baseline_guess) print(\"Baseline Performance on the test set: MAE = %0.4f\" % mae(y_test, baseline_guess))<\/code><\/pre>\n<p>  <b>The baseline guess is a score of 66.00<br \/>  Baseline Performance on the test set: MAE = 24.5164<\/b><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 25 \u043f\u0443\u043d\u043a\u0442\u043e\u0432. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 1 \u0434\u043e 100, \u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 25 % \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0438\u0439 \u0431\u0430\u0440\u044c\u0435\u0440 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438!<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412\u044b \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0438 \u043f\u0435\u0440\u0432\u044b\u0445 \u044d\u0442\u0430\u043f\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b:<\/p>\n<ol>\n<li>\u041e\u0447\u0438\u0441\u0442\u0438\u043b\u0438 \u0438 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u044b\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0412\u044b\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/li>\n<\/ol>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b.<\/p>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<a href=\"http:\/\/scikit-learn.org\/stable\/\"> Scikit-Learn<\/a> \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0451 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443.<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/425253\/\"> https:\/\/habr.com\/post\/425253\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5de\/fed\/62e\/5defed62ea348f6e02365e283415b2fb.png\"><\/p>\n<p>  <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434<a href=\"https:\/\/towardsdatascience.com\/a-complete-machine-learning-walk-through-in-python-part-one-c62152f39420\"> A Complete Machine Learning Project Walk-Through in Python: Part One<\/a>.<\/i><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0448\u044c \u043a\u043d\u0438\u0433\u0443 \u0438\u043b\u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0448\u044c \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u043f\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0447\u0443\u0432\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0431\u043e\u0439 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u0435\u0434\u0438\u043d\u043e. \u0412\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u0443\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u044b \u043e\u0431\u0440\u0435\u0442\u0451\u0442\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u0441\u0444\u0435\u0440\u0435 data science.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0446\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\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-290300","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290300","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=290300"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290300\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}