{"id":386996,"date":"2024-06-29T07:03:17","date_gmt":"2024-06-29T07:03:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=386996"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=386996","title":{"rendered":"<span>\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0432 Excel \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u0438 PyXLL<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e8\/332\/730\/8e83327305be76b62a2ad554e83dac7a.png\" width=\"779\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e8\/332\/730\/8e83327305be76b62a2ad554e83dac7a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a \u0441\u0442\u0430\u0440\u0442\u0443 \u043a\u0443\u0440\u0441\u0430 \u043e <a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u0438 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438<\/a> \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438, \u0430\u0432\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043a\u0430\u043a \u043c\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 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Excel. \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e? \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432; \u043f\u043e \u043c\u043d\u0435\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 PyXLL \u0434\u043e\u0441\u0442\u0443\u043f \u043a ML-\u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0447\u0435\u0440\u0435\u0437 Excel \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b. \u0412\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Excel, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043e\u043f\u044b\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0448\u0438\u0440\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 Excel, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u044b \u0432 TensorFlow. \u0412\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d<a href=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/pyxll\/pyxll-examples\/tree\/master\/machine-learning&amp;sa=D&amp;source=editors&amp;ust=1627218482138000&amp;usg=AOvVaw3LunbsatalCLZUoiiWH7ie\"> \u043d\u0430 GitHub<\/a>.<\/p>\n<hr\/>\n<p>\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Excel<a href=\"https:\/\/www.pyxll.com\/\"> PyXLL<\/a> \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 Python \u0432 Excel \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Excel \u0447\u0435\u0440\u0435\u0437 Python. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043c\u0435\u043d\u044e \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Python \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e \u0432 Excel. \u041a \u043a\u043e\u043d\u0446\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445.<\/p>\n<h2>Python \u0434\u043b\u044f Machine Learning<\/h2>\n<p>Python \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0443 \u043d\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. ML \u0438 DL \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Python \u2014 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f ML \u043d\u0430 Python.<\/p>\n<h3>Scikit-Learn<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442 scikit-learn \u2014 \u044d\u0442\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a \u043e\u0431\u0449\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c ML, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ML \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u043e\u043d\u0430 \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 Python. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0435\u0439.<\/p>\n<h3>TensorFlow<\/h3>\n<p>TensorFlow \u043e\u0442 Google. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0433\u0440\u0430\u0444\u043e\u0432 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 ML. \u041e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0432 \u0441\u0440\u0435\u0434\u0435 Google \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0435\u043c\u043d\u0438\u0446\u0435\u0439 DistBelief \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 Google. <\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, TensorFlow \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0430\u0443\u0447\u043d\u0430 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c TensorFlow \u2014 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0437\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0442\u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 Google \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<h3>Keras<\/h3>\n<p>Keras \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 Python Open Source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041e\u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445 TensorFlow, Microsoft Cognitive Toolkit \u0438\u043b\u0438 Theano \u0438 \u0438\u043c\u0435\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Keras \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u043b\u0430\u0434\u0430\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 CPU \u0438 GPU.<\/p>\n<\/li>\n<\/ul>\n<h4>PyTorch<\/h4>\n<p>PyTorch \u2014 \u044d\u0442\u043e \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 Python, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0430 NumPy \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">Deep Learning<\/a> \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u043c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h3>\n<p>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u0435\u0440\u0435\u0432\u043e \u0434\u0435\u043b\u0438\u0442 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u2014 \u043b\u0438\u0441\u0442\u044c\u044f \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445: \u043c\u043b\u0435\u043a\u043e\u043f\u0438\u0442\u0430\u044e\u0449\u0438\u0445, \u043f\u0442\u0438\u0446, \u0440\u0435\u043f\u0442\u0438\u043b\u0438\u0439, \u043d\u0430\u0441\u0435\u043a\u043e\u043c\u044b\u0445, \u043c\u043e\u043b\u043b\u044e\u0441\u043a\u043e\u0432 \u0438 \u0430\u043c\u0444\u0438\u0431\u0438\u0439. \u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/61c\/271\/e37\/61c271e37fb9c1f81986f8f80858a978.png\" width=\"700\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/61c\/271\/e37\/61c271e37fb9c1f81986f8f80858a978.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0412 \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u044f \u0437\u0430\u043b\u043e\u0436\u0438\u043b \u043c\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445. \u041c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u2014 \u044d\u0442\u043e \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c. <\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u043e\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0434\u043e \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u0432 Excel.<\/p>\n<h3>\u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u041d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 UCI Zoo Data Set \u0438\u0437 101 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e, \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 17 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f pandas, \u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u2014 scikit-learn. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e \u0444\u0440\u0435\u0439\u043c Pandas, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e. \u0417\u0430\u0442\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440\u044b. Scikit-Learn \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"python\">from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split import pandas as pd  # Read the input csv file dataset = pd.read_csv(\"zoo.csv\")  # Drop the animal names since this is not a good feature to split the data on dataset = dataset.drop(\"animal_name\", axis=1)  # Split the data into features and target features = dataset.drop(\"class\", axis=1) targets = dataset[\"class\"]  # Split the data into a training and a testing set train_features, test_features, train_targets, test_targets = \\         train_test_split(features, targets, train_size=0.75)<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 scikit-learn \u043e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438 \u043c\u043e\u0433\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 5. \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<pre><code class=\"python\"># Train the model tree = DecisionTreeClassifier(criterion=\"entropy\", max_depth=5) tree = tree.fit(train_features, train_targets)<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0442\u0440\u043e\u044f\u0442 \u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u044c. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0451 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0430 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0430.<\/p>\n<pre><code class=\"python\"># Predict the classes of new, unseen data prediction = tree.predict(test_features)  # Check the accuracy score = tree.score(test_features, test_targets) print(\"The prediction accuracy is: {:0.2f}%\".format(score * 100))<\/code><\/pre>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\"># Try predicting based on some features features = {     \"hair\": 0,     \"feathers\": 1,     \"eggs\": 1,     \"milk\": 0,     \"airbone\": 1,     \"aquatic\": 0,     \"predator\": 0,     \"toothed\": 1,     \"backbone\": 1,     \"breathes\": 1,     \"venomous\": 0,     \"fins\": 0,     \"legs\": 1,     \"tail\": 1,     \"domestic\": 0,     \"catsize\": 0 }  features = pd.DataFrame([features], columns=train_features.columns) prediction = tree.predict(features)[0] print(\"Best guess is {}\".format(prediction])<\/code><\/pre>\n<h3>\u0412\u044b\u0437\u043e\u0432\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0437 Excel<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Excel, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0437\u0434\u0435, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043b\u044e\u0434\u044f\u043c, \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043c\u0430\u0441\u0441\u0443 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Python \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0451 \u0432 Excel \u043f\u0440\u043e\u0441\u0442\u043e. \u0412 PyXLL \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Python \u0432 Excel. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\">@xl_func<\/a> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f pyxll \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0443 PyXLL \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 PyXLL, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/www.pyxll.com\/docs\/introduction.html?utm_source=datascienceplus\">\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <\/a>\u0432 PyXLL \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h4>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0435\u0451, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0435\u0440\u0435\u0432\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0421\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 pickle \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0435\u0451 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0451 \u0432 Excel \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e!<\/p>\n<pre><code class=\"python\">from pyxll import xl_func from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split import pandas as pd import os  @xl_func(\"float, int, int: object\") def ml_get_zoo_tree(train_size=0.75, max_depth=5, random_state=245245):     # Load the zoo data     dataset = pd.read_csv(os.path.join(os.path.dirname(__file__), \"zoo.csv\"))      # Drop the animal names since this is not a good feature to split the data on     dataset = dataset.drop(\"animal_name\", axis=1)      # Split the data into a training and a testing set     features = dataset.drop(\"class\", axis=1)     targets = dataset[\"class\"]      train_features, test_features, train_targets, test_targets = \\         train_test_split(features, targets, train_size=train_size, random_state=random_state)      # Train the model     tree = DecisionTreeClassifier(criterion=\"entropy\", max_depth=max_depth)     tree = tree.fit(train_features, train_targets)      # Add the feature names to the tree for use in predict function     tree._feature_names = features.columns      return tree<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\">@xl_func<\/a><a href=\"https:\/\/www.google.com\/url?q=https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source%3Ddatascienceplus&amp;sa=D&amp;source=editors&amp;ust=1627218482147000&amp;usg=AOvVaw1ozN80BWRPWGrIAd3qcGyO\">, <\/a>\u043a\u043e\u0442\u043e\u0440\u044b\u0439\u00a0\u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e PyXLL \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Python \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0442\u0430\u0442\u044c<a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\"> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439<\/a>\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Excel. <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 <code>float, int, int: object<\/code> \u2014 \u044d\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u043d\u0430 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u043d\u043e \u0431\u0435\u0437 \u044d\u0442\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0432\u043e\u0438 \u0442\u0438\u043f\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u0431\u043e\u044e. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f <code>object<\/code>  \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 Excel \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442 Python, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c Python. <\/p>\n<p>\u041a\u043e\u0434 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>pyxll.cfg<\/code>, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PyXLL, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0435\u0451. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/760\/dc8\/229\/760dc822926e995e5c79f88db81ef080.gif\" width=\"424\" height=\"252\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/760\/dc8\/229\/760dc822926e995e5c79f88db81ef080.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0441\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u2014 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043d\u043e \u043e\u0431\u0435\u0440\u043d\u0451\u043c \u0435\u0433\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c <code>@xl_func<\/code>.<\/p>\n<pre><code class=\"python\">_zoo_classifications = {     1: \"mammal\",     2: \"bird\",     3: \"reptile\",     4: \"fish\",     5: \"amphibian\",     6: \"insect\",     7: \"mollusc\" }  @xl_func(\"object tree, dict features: var\") def ml_zoo_predict(tree, features):     # Convert the features dictionary into a DataFrame with a single row     features = pd.DataFrame([features], columns=tree._feature_names)     # Get the prediction from the model     prediction = tree.predict(features)[0]     return _zoo_classifications[prediction]<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2014 \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u0421\u043b\u043e\u0432\u0430\u0440\u044c <code>_zoo_classifications<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432. <\/p>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0435\u0440\u0451\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438\u0437 <code>ml_get_zoo_tree<\/code> \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0435\u0451 \u043a\u0430\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u0412 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430, \u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u0418\u0445 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0432\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>tree.predict<\/code> \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48a\/07c\/04d\/48a07c04d4d051ff83ac85b80ae71785.gif\" width=\"460\" height=\"650\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48a\/07c\/04d\/48a07c04d4d051ff83ac85b80ae71785.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a \u043b\u044e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0446\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0430\u0439\u0442\u044b \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0427\u0451\u0440\u043d\u043e-\u0431\u0435\u043b\u044b\u0435 \u043b\u0438\u0441\u0442\u044b \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0435\u043c, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0430\u0434\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. PyXLL \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 Excel \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>xl_app<\/code>. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c Excel \u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0442\u043e\u0439, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 VBA. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0438\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<pre><code class=\"python\">from pyxll import xl_app  def show_image_in_excel(classification, figname=\"prediction_image\"):     \"\"\"Plot a figure in Excel\"\"\"     # Show the figure in Excel as a Picture object on the same sheet     # the function is being called from.     xl = xl_app()     sheet = xl.ActiveSheet      # if a picture with the same figname already exists then get the position     # and size from the old picture and delete it.     for old_picture in sheet.Pictures():         if old_picture.Name == figname:             height = old_picture.Height             width = old_picture.Width             top = old_picture.Top             left = old_picture.Left             old_picture.Delete()             break     else:         # otherwise create a new image         top_left = sheet.Cells(1, 1)         top = top_left.Top         left = top_left.Left         width, height = 100, 100      # insert the picture     filename = os.path.join(os.path.dirname(__file__), \"images\", _zoo_classifications[classification] + \".jpg\")     picture = sheet.Shapes.AddPicture(Filename=filename,                                       LinkToFile=0,  # msoFalse                                       SaveWithDocument=-1,  # msoTrue                                       Left=left,                                       Top=top,                                       Width=width,                                       Height=height)      # set the name of the new picture so we can find it next time     picture.Name = figname<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>ml_zoo_predict<\/code> \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 Excel \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 Excel, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f <code>async_call<\/code> \u0438\u0437 pyxll, \u0430 \u043d\u0438\u0436\u0435 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <code>ml_zoo_predict<\/code>:<\/p>\n<pre><code class=\"python\">from pyxll import xl_func, async_call  @xl_func(\"object tree, dict features: var\") def ml_zoo_predict(tree, features):     # Convert the features dictionary into a DataFrame with a single row     features = pd.DataFrame([features], columns=tree._feature_names)      # Get the prediction from the model     prediction = tree.predict(features)[0]      # Update the image in Excel     async_call(show_image_in_excel, prediction)      return _zoo_classifications[prediction]<\/code><\/pre>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/552\/a98\/556\/552a985564201dc8c3c2fc0eb32b5eea.gif\" width=\"698\" height=\"787\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/552\/a98\/556\/552a985564201dc8c3c2fc0eb32b5eea.gif\"\/><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u0421\u0441\u044b\u043b\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/pyxll\/pyxll-examples\/tree\/master\/machine-learning\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 Github<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.pyxll.com\/?utm_source=datascienceplus\">PyXLL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.pyxll.com\/blog\/tools-for-working-with-excel-and-python\/?utm_source=datascienceplus\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Excel \u0438 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/zoo\">\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043e\u043e\u043f\u0430\u0440\u043a\u0430 \u041a\u0430\u043b\u0438\u0444\u043e\u0440\u043d\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/scikit-learn.org\/stable\/\">SciKit-Learn<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.python-course.eu\/Decision_Trees.php\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439?<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2016\/04\/complete-tutorial-tree-based-modeling-scratch-in-python\/\">\u0423\u0447\u0435\u0431\u043d\u0438\u043a \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u042d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u2014 \u044f\u0440\u043a\u043e\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e Excel \u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c ML \u0441\u043b\u043e\u0436\u043d\u0430, \u043d\u043e \u0435\u0451 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0438\u043c\u0430 \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u044c\u0435\u0440\u0443 \u0438\u043b\u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u0448\u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0448\u0438 \u043a\u0443\u0440\u0441\u044b \u043f\u043e <a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">Machine Learning<\/a>, <a href=\"https:\/\/skillfactory.ru\/dataanalystpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DAPR&amp;utm_term=regular&amp;utm_content=250721\">\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u0438\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u043c\u0443 <a href=\"https:\/\/skillfactory.ru\/dstpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DSPR&amp;utm_term=regular&amp;utm_content=250721\">\u043a\u0443\u0440\u0441\u0443 Data Science<\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/skillfactory.ru\/courses\/?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_ALLCOURSES&amp;utm_term=regular&amp;utm_content=250721\">\u0443\u0437\u043d\u0430\u0442\u044c<\/a>, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c7b\/e30\/8aa\/c7be308aac68cf1d11cd0d0c6c54661c.png\" width=\"1000\" height=\"200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c7b\/e30\/8aa\/c7be308aac68cf1d11cd0d0c6c54661c.png\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>Data Science \u0438 Machine Learning<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/dstpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DSPR&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/dataanalystpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DAPR&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/math-stat-for-ds#syllabus?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MAT&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/math_and_ml?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MATML&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438 Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/dataengineer?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DEA&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u043f\u043e Data Engineering<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438 Deep Learning\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/ml-programma-machine-learning-online?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_ML&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u043f\u043e Machine Learning<\/a><\/p>\n<\/li>\n<\/ul>\n<p>  <strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_FPW&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_PWS&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/frontend?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_FR&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_WEBDEV&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p>  <strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/iosdev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_IOSDEV&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/android?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_ANDR&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p>  <strong>Java \u0438 C#<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_JAVA&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_QAJA&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430 JAVA<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/csharp?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_CDEV&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/game-dev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_GAMEDEV&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430 Unity<\/a><\/p>\n<\/li>\n<\/ul>\n<p>  <strong>\u041e\u0442 \u043e\u0441\u043d\u043e\u0432 \u2014 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/algo?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_algo&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/cplus?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_CPLUS&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/cybersecurity?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_HACKER&amp;utm_term=regular&amp;utm_content=250721\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u042d\u0442\u0438\u0447\u043d\u044b\u0439 \u0445\u0430\u043a\u0435\u0440<\/a><\/p>\n<\/li>\n<\/ul>\n<p>  <strong>\u0410 \u0442\u0430\u043a\u0436\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/devops?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DEVOPS&amp;utm_term=regular&amp;utm_content=250721\">\u041a\u0443\u0440\u0441 \u043f\u043e DevOps<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/569520\/\"> https:\/\/habr.com\/ru\/articles\/569520\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a \u0441\u0442\u0430\u0440\u0442\u0443 \u043a\u0443\u0440\u0441\u0430 \u043e <a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u0438 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438<\/a> \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438, \u0430\u0432\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043a\u0430\u043a \u043c\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 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Excel. \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e? \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432; \u043f\u043e \u043c\u043d\u0435\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 PyXLL \u0434\u043e\u0441\u0442\u0443\u043f \u043a ML-\u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0447\u0435\u0440\u0435\u0437 Excel \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b. \u0412\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Excel, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043e\u043f\u044b\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0448\u0438\u0440\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 Excel, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u044b \u0432 TensorFlow. \u0412\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d<a href=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/pyxll\/pyxll-examples\/tree\/master\/machine-learning&amp;sa=D&amp;source=editors&amp;ust=1627218482138000&amp;usg=AOvVaw3LunbsatalCLZUoiiWH7ie\"> \u043d\u0430 GitHub<\/a>.<\/p>\n<hr\/>\n<p>\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Excel<a href=\"https:\/\/www.pyxll.com\/\"> PyXLL<\/a> \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 Python \u0432 Excel \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Excel \u0447\u0435\u0440\u0435\u0437 Python. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043c\u0435\u043d\u044e \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Python \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e \u0432 Excel. \u041a \u043a\u043e\u043d\u0446\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445.<\/p>\n<h2>Python \u0434\u043b\u044f Machine Learning<\/h2>\n<p>Python \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0443 \u043d\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. ML \u0438 DL \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Python \u2014 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f ML \u043d\u0430 Python.<\/p>\n<h3>Scikit-Learn<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442 scikit-learn \u2014 \u044d\u0442\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a \u043e\u0431\u0449\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c ML, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ML \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u043e\u043d\u0430 \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 Python. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0435\u0439.<\/p>\n<h3>TensorFlow<\/h3>\n<p>TensorFlow \u043e\u0442 Google. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0433\u0440\u0430\u0444\u043e\u0432 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 ML. \u041e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0432 \u0441\u0440\u0435\u0434\u0435 Google \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0435\u043c\u043d\u0438\u0446\u0435\u0439 DistBelief \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 Google. <\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, TensorFlow \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0430\u0443\u0447\u043d\u0430 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c TensorFlow \u2014 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0437\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0442\u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 Google \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<h3>Keras<\/h3>\n<p>Keras \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 Python Open Source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041e\u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445 TensorFlow, Microsoft Cognitive Toolkit \u0438\u043b\u0438 Theano \u0438 \u0438\u043c\u0435\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Keras \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u043b\u0430\u0434\u0430\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 CPU \u0438 GPU.<\/p>\n<\/li>\n<\/ul>\n<h4>PyTorch<\/h4>\n<p>PyTorch \u2014 \u044d\u0442\u043e \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 Python, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0430 NumPy \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=250721\">Deep Learning<\/a> \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u043c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h3>\n<p>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u0435\u0440\u0435\u0432\u043e \u0434\u0435\u043b\u0438\u0442 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430 \u2014 \u043b\u0438\u0441\u0442\u044c\u044f \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445: \u043c\u043b\u0435\u043a\u043e\u043f\u0438\u0442\u0430\u044e\u0449\u0438\u0445, \u043f\u0442\u0438\u0446, \u0440\u0435\u043f\u0442\u0438\u043b\u0438\u0439, \u043d\u0430\u0441\u0435\u043a\u043e\u043c\u044b\u0445, \u043c\u043e\u043b\u043b\u044e\u0441\u043a\u043e\u0432 \u0438 \u0430\u043c\u0444\u0438\u0431\u0438\u0439. \u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0412 \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u044f \u0437\u0430\u043b\u043e\u0436\u0438\u043b \u043c\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445. \u041c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u2014 \u044d\u0442\u043e \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c. <\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u043e\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0434\u043e \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u0432 Excel.<\/p>\n<h3>\u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u041d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 UCI Zoo Data Set \u0438\u0437 101 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e, \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 17 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f pandas, \u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u2014 scikit-learn. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e \u0444\u0440\u0435\u0439\u043c Pandas, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e. \u0417\u0430\u0442\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440\u044b. Scikit-Learn \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"python\">from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split import pandas as pd  # Read the input csv file dataset = pd.read_csv(\"zoo.csv\")  # Drop the animal names since this is not a good feature to split the data on dataset = dataset.drop(\"animal_name\", axis=1)  # Split the data into features and target features = dataset.drop(\"class\", axis=1) targets = dataset[\"class\"]  # Split the data into a training and a testing set train_features, test_features, train_targets, test_targets = \\         train_test_split(features, targets, train_size=0.75)<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 scikit-learn \u043e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438 \u043c\u043e\u0433\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 5. \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<pre><code class=\"python\"># Train the model tree = DecisionTreeClassifier(criterion=\"entropy\", max_depth=5) tree = tree.fit(train_features, train_targets)<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0442\u0440\u043e\u044f\u0442 \u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u044c. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0451 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0430 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0430.<\/p>\n<pre><code class=\"python\"># Predict the classes of new, unseen data prediction = tree.predict(test_features)  # Check the accuracy score = tree.score(test_features, test_targets) print(\"The prediction accuracy is: {:0.2f}%\".format(score * 100))<\/code><\/pre>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\"># Try predicting based on some features features = {     \"hair\": 0,     \"feathers\": 1,     \"eggs\": 1,     \"milk\": 0,     \"airbone\": 1,     \"aquatic\": 0,     \"predator\": 0,     \"toothed\": 1,     \"backbone\": 1,     \"breathes\": 1,     \"venomous\": 0,     \"fins\": 0,     \"legs\": 1,     \"tail\": 1,     \"domestic\": 0,     \"catsize\": 0 }  features = pd.DataFrame([features], columns=train_features.columns) prediction = tree.predict(features)[0] print(\"Best guess is {}\".format(prediction])<\/code><\/pre>\n<h3>\u0412\u044b\u0437\u043e\u0432\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0437 Excel<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Excel, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0437\u0434\u0435, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043b\u044e\u0434\u044f\u043c, \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043c\u0430\u0441\u0441\u0443 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Python \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0451 \u0432 Excel \u043f\u0440\u043e\u0441\u0442\u043e. \u0412 PyXLL \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Python \u0432 Excel. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\">@xl_func<\/a> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f pyxll \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0443 PyXLL \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 PyXLL, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/www.pyxll.com\/docs\/introduction.html?utm_source=datascienceplus\">\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <\/a>\u0432 PyXLL \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h4>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0435\u0451, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0435\u0440\u0435\u0432\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0421\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 pickle \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0435\u0451 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0451 \u0432 Excel \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e!<\/p>\n<pre><code class=\"python\">from pyxll import xl_func from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split import pandas as pd import os  @xl_func(\"float, int, int: object\") def ml_get_zoo_tree(train_size=0.75, max_depth=5, random_state=245245):     # Load the zoo data     dataset = pd.read_csv(os.path.join(os.path.dirname(__file__), \"zoo.csv\"))      # Drop the animal names since this is not a good feature to split the data on     dataset = dataset.drop(\"animal_name\", axis=1)      # Split the data into a training and a testing set     features = dataset.drop(\"class\", axis=1)     targets = dataset[\"class\"]      train_features, test_features, train_targets, test_targets = \\         train_test_split(features, targets, train_size=train_size, random_state=random_state)      # Train the model     tree = DecisionTreeClassifier(criterion=\"entropy\", max_depth=max_depth)     tree = tree.fit(train_features, train_targets)      # Add the feature names to the tree for use in predict function     tree._feature_names = features.columns      return tree<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\">@xl_func<\/a><a href=\"https:\/\/www.google.com\/url?q=https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source%3Ddatascienceplus&amp;sa=D&amp;source=editors&amp;ust=1627218482147000&amp;usg=AOvVaw1ozN80BWRPWGrIAd3qcGyO\">, <\/a>\u043a\u043e\u0442\u043e\u0440\u044b\u0439\u00a0\u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e PyXLL \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Python \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0442\u0430\u0442\u044c<a href=\"https:\/\/www.pyxll.com\/docs\/userguide\/udfs.html?utm_source=datascienceplus\"> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439<\/a>\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Excel. <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 <code>float, int, int: object<\/code> \u2014 \u044d\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u043d\u0430 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u043d\u043e \u0431\u0435\u0437 \u044d\u0442\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0432\u043e\u0438 \u0442\u0438\u043f\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u0431\u043e\u044e. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f <code>object<\/code>  \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 Excel \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442 Python, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c Python. <\/p>\n<p>\u041a\u043e\u0434 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>pyxll.cfg<\/code>, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PyXLL, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0435\u0451. <\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-386996","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/386996","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=386996"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/386996\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}