{"id":293363,"date":"2019-08-14T09:00:57","date_gmt":"2019-08-14T09:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293363"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293363","title":{"rendered":"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Directum Club. \u0427\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f, \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 MailChimp \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e <a href=\"https:\/\/www.wired.com\/2016\/07\/mailchimp-sends-billion-emails-day-thats-easy-part\/\">\u0440\u0430\u0441\u0441\u044b\u043b\u0430\u044e\u0442 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434 \u043f\u0438\u0441\u0435\u043c<\/a>. \u0418\u0437 \u043d\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 <a href=\"https:\/\/mailchimp.com\/resources\/email-marketing-benchmarks\/\">20.81%<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0448\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438. \u042d\u0442\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043e\u043a\u043e\u043b\u043e 21% \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"nemnogo-teorii-o-kollaborativnoy-filtracii\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u043e \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u0434\u0435\u0435, \u0447\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-znachit-pohozhie-polzovateli\">\u0427\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u00ab\u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438\u00bb?<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vq\/99\/ci\/vq99cie0jq4j7bxktloij_zcmzu.png\" alt=\"who are you?\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0418\u0432\u0430\u043d\u0430 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e SQL Server \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0440\u043e PostgreSQL?<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u0412\u0430\u0441\u0438\u043b\u0438\u0439, \u0418\u0432\u0430\u043d, \u0418\u043d\u043d\u0430 \u0438 \u0410\u043d\u043d\u0430. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043f\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0435\u0439: \u0421\u0442\u0430\u0442\u044c\u044f 1, \u0421\u0442\u0430\u0442\u044c\u044f 2, \u0421\u0442\u0430\u0442\u044c\u044f 3, \u0421\u0442\u0430\u0442\u044c\u044f 4 \u0438 \u0421\u0442\u0430\u0442\u044c\u044f 5. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u2013 \u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u043e \u043f\u044f\u0442\u0438\u0431\u0430\u043b\u043b\u044c\u043d\u043e\u0439 \u0448\u043a\u0430\u043b\u0435. \u041d\u0443\u043b\u0451\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043e\u0446\u0435\u043d\u0435\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0412\u0430\u0441\u0438\u043b\u0438\u044e \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0438 1, 3 \u0438 4.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 1<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 1<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 2<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 3<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 4<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u0412\u0430\u0441\u0438\u043b\u0438\u0439<\/td>\n<td>4<\/td>\n<td>0<\/td>\n<td>5<\/td>\n<td>5<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\u0418\u0432\u0430\u043d<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\u0418\u043d\u043d\u0430<\/td>\n<td>4<\/td>\n<td>2<\/td>\n<td>4<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\u0410\u043d\u043d\u0430<\/td>\n<td>5<\/td>\n<td>5<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u0438\u0445 \u0432\u043a\u0443\u0441\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u041a\u0430\u043a \u0432\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u044c\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0412\u0430\u0441\u0438\u043b\u0438\u044f?<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0412\u0430\u0441\u0438\u043b\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0418\u0432\u0430\u043d\u0430 \u0438 \u0418\u043d\u043d\u044b \u0438 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0410\u043d\u043d\u044b. \u041f\u043e\u0447\u0435\u043c\u0443 \u2014 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u00ab\u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u044c\u00bb \u0412\u0430\u0441\u0438\u043b\u0438\u044f \u0438 \u0418\u0432\u0430\u043d\u0430 \u0438\u043b\u0438 \u0418\u043d\u043d\u044b \u0438 \u0410\u043d\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u2013 \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2013 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0412\u0430\u0441\u0438\u043b\u0438\u044f \u2013 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u0437 \u043f\u044f\u0442\u0438 \u0447\u0438\u0441\u0435\u043b: [4, 0, 5, 5, 0]; \u0432\u0442\u043e\u0440\u0430\u044f \u2013 \u0418\u0432\u0430\u043d\u0430 \u2013 [0, 0, 4, 5, 0]; \u0442\u0440\u0435\u0442\u044c\u044f \u2013 \u0418\u043d\u043d\u044b \u2013 [4, 2, 4, 0, 0]; \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0430\u044f \u2013 \u0410\u043d\u043d\u044b \u2013 [5, 5, 0, 0, 5].<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043c\u0435\u0440\u044b \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438\u00bb \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u00ab\u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u044c\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2013 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/mlwiki.org\/index.php\/Cosine_Similarity\">\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/a> \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vg\/qk\/ev\/vgqkevjtnkjk9rxg86r6yehgq4k.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/62d\/780\/b30\/62d780b302e74675a8db4359d1ee9281.svg\" alt=\"$1 - cos \\theta = 1 - \\frac{A \\cdot B}{||A|| \\cdot ||B||}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20d\/8ca\/ec6\/20d8caec693d8d8eaf70885e408419f6.svg\" alt=\"$B$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0435\u043a\u0442\u043e\u0440\u044b-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439; <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/483\/473\/604\/4834736045618e520b5b1313a68815dd.svg\" alt=\"$A \\cdot B$\" data-tex=\"inline\"><\/math> \u2014 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439; <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/913\/3f7\/9de\/9133f79de64a29331ef155934a7ad434.svg\" alt=\"$||A||$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a66\/ce0\/c2e\/a66ce0c2e0109324e9f56593c6b06d12.svg\" alt=\"$||B||$\" data-tex=\"inline\"><\/math> \u2014 \u0434\u043b\u0438\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0421\u043c\u044b\u0441\u043b \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0435\u0441\u043b\u0438 \u0434\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20d\/8ca\/ec6\/20d8caec693d8d8eaf70885e408419f6.svg\" alt=\"$B$\" data-tex=\"inline\"><\/math> (\u0432\u0435\u043a\u0442\u043e\u0440\u044b-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439) \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u201d, \u0442\u043e \u0443\u0433\u043e\u043b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u043b\u044e, \u0430 \u043a\u043e\u0441\u0438\u043d\u0443\u0441 \u044d\u0442\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u2013 \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435. \u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u00ab\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b\u00bb \u0434\u0432\u0443\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0412\u0430\u0441\u0438\u043b\u0438\u0435\u043c \u0438 \u0418\u0432\u0430\u043d\u043e\u043c:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/06d\/989\/521\/06d989521b5134b9755c6fe09c494a79.svg\" alt=\"$1 - cos \\theta = 1 - \\frac{4 \\cdot 0 + 0 \\cdot 0 + 5 \\cdot 4 + 5 \\cdot 5 + 0 \\cdot 0}{\\sqrt{4^2 + 0^2 + 5^2 + 5^2 + 0^2} \\cdot \\sqrt{0^2 + 0^2 + 4^2 + 5^2 + 0^2}}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0412\u0430\u0441\u0438\u043b\u0438\u0435\u043c \u0438 \u0410\u043d\u043d\u043e\u0439 \u0440\u0430\u0432\u043d\u043e 0.715. \u0422\u043e \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0412\u0430\u0441\u0438\u043b\u0438\u044f \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0418\u0432\u0430\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b \u0410\u043d\u043d\u044b.<\/p>\n<p>  <\/p>\n<h2 id=\"kak-predskazyvat-ocenki-polzovateley\">\u041a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439?<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u2014 \u0441\u0430\u043c\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"predskazannaya-ocenka---srednyaya-ocenka-sredi-pohozhih-polzovateley\">\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u2014 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0440\u0435\u0434\u0438 \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0445\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0435\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043e\u0446\u0435\u043d\u043a\u0443:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/247\/21f\/dbd\/24721fdbdab8228f9af7b1b65321b840.svg\" alt=\"$r_{u,i} = \\frac{1}{N} \\sum_{u' \\in U} r_{u', i}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7ac\/89f\/d0b\/7ac89fd0b1c2cab3b4e8610034459738.svg\" alt=\"$r_{u,i}$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u0446\u0435\u043d\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/784\/f98\/db3\/784f98db37a499162c1479600e8465ed.svg\" alt=\"$u$\" data-tex=\"inline\"><\/math>,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/62e\/2f6\/c39\/62e2f6c3953e7739e8bdce2aca3e4369.svg\" alt=\"$r_{u',i}$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ed\/13e\/7db\/0ed13e7db76c60dd2676f845f0935761.svg\" alt=\"$u\u2019$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math> \u2014\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0445\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0445\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"predskazannaya-ocenka---vzveshennaya-srednyaya-ocenka-sredi-pohozhih-polzovateley\">\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u2014 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0440\u0435\u0434\u0438 \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0445\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>  <\/p>\n<p>\u0427\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438: \u043e\u0446\u0435\u043d\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0445:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/35c\/6a8\/5c3\/35c6a85c397354f07b7214b9a77e3764.svg\" alt=\"$r_{u,i} = \\frac{\\sum_{u' \\in U} (1 - simil(u, u'))r_{u',i}}{\\sum_{u' \\in U} |1 - simil(u, u')|}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7ac\/89f\/d0b\/7ac89fd0b1c2cab3b4e8610034459738.svg\" alt=\"$r_{u,i}$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u0446\u0435\u043d\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/784\/f98\/db3\/784f98db37a499162c1479600e8465ed.svg\" alt=\"$u$\" data-tex=\"inline\"><\/math>,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/62e\/2f6\/c39\/62e2f6c3953e7739e8bdce2aca3e4369.svg\" alt=\"$r_{u',i}$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ed\/13e\/7db\/0ed13e7db76c60dd2676f845f0935761.svg\" alt=\"$u\u2019$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math> \u2014\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u201c\u043f\u043e\u0445\u043e\u0436\u0438\u0445\u201d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d73\/a2c\/7d9\/d73a2c7d9ebe9f0d41678321d0478402.svg\" alt=\"$simil(u, u')$\" data-tex=\"inline\"><\/math> \u2014 \u201c\u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u044c\u201d (\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/784\/f98\/db3\/784f98db37a499162c1479600e8465ed.svg\" alt=\"$u$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ed\/13e\/7db\/0ed13e7db76c60dd2676f845f0935761.svg\" alt=\"$u\u2019$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"kak-izmerit-kachestvo-rekomendaciy\">\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439?<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qm\/td\/xk\/qmtdxkg7njdztxa4ndw12p4cqso.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0443, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u043e\u0432\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/271\/145\/ba1\/271145ba1d0f753a0b76f20d18b8c081.svg\" alt=\"$RMSE$\" data-tex=\"inline\"><\/math>) \u2014 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u0430 \u043c\u0435\u0440\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/451\/1da\/b60\/4511dab609016997de8bde26455ce456.svg\" alt=\"$RMSE = \\sqrt{\\frac{1}{|D|} \\sum_{u,i \\in D} (\\hat{r}_{u,i} - r_{u,i})^2}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435<\/p>\n<p>  <\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c5e\/2ea\/3b6\/c5e2ea3b63d255f7a483773fe1d664b2.svg\" alt=\"$D$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/765\/c27\/e24\/765c27e245a2a4a09c7526579c720bac.svg\" alt=\"$\\hat{r}_{u,i}$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/784\/f98\/db3\/784f98db37a499162c1479600e8465ed.svg\" alt=\"$u$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0430\u0442\u044c\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>,<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7ac\/89f\/d0b\/7ac89fd0b1c2cab3b4e8610034459738.svg\" alt=\"$r_{u,i}$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/784\/f98\/db3\/784f98db37a499162c1479600e8465ed.svg\" alt=\"$u$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0430\u0442\u044c\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u0438 \u0441 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/271\/145\/ba1\/271145ba1d0f753a0b76f20d18b8c081.svg\" alt=\"$RMSE$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u0432\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043e\u0446\u0435\u043d\u043e\u043a \u0434\u043b\u044f \u0412\u0430\u0441\u0438\u043b\u0438\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 1<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 2<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 3<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 4<\/th>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f 5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u0412\u0430\u0441\u0438\u043b\u0438\u0439<\/td>\n<td>4<\/td>\n<td>0<\/td>\n<td>5<\/td>\n<td>5<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 1<\/td>\n<td>1<\/td>\n<td>3<\/td>\n<td>5<\/td>\n<td>2<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 2<\/td>\n<td>4<\/td>\n<td>1<\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043b\u0430 \u043e\u0446\u0435\u043d\u043a\u0438 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0432\u0430\u044f. \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/271\/145\/ba1\/271145ba1d0f753a0b76f20d18b8c081.svg\" alt=\"$RMSE$\" data-tex=\"inline\"><\/math>:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d9d\/fde\/14a\/d9dfde14aae0402c99a379a63a4b89c1.svg\" alt=\"$RMSE_{(1)} = \\sqrt{\\frac{(4-1)^2+(0-3)^2+(5-5)^2+(5-2)^2+(0-2)^2}{5}} = 2.489 $\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ce\/71c\/e01\/0ce71ce01cfc29160103627700ed3b62.svg\" alt=\"$RMSE_{(2)} = \\sqrt{\\frac{(4-4)^2+(0-1)^2+(5-5)^2+(5-3)^2+(0-0)^2}{5}} = 1$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043e\u043a \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<h1 id=\"realizaciya\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0430\u0439\u0442\u0430: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u0442\u0435\u0433\u0430\u0445, \u043b\u0430\u0439\u043a\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0442.\u0434.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0446\u0435\u043d\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Disclaimer<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u201c\u0432 \u043b\u043e\u0431\u201d \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>numpy<\/code> \u0438 <code>pandas<\/code>.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<pre><code class=\"python\">import pandas as pd import numpy as np import os  ratings_df = pd.read_csv('.\/input\/Ratings.csv') print('\u0412\u0441\u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445:', ratings_df.shape[0]) print('\u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438:', ratings_df[ratings_df['Rate']].shape[0]) unique_user_ids = ratings_df[ratings_df['Rate']]['UserId'].unique() print('\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:', len(unique_user_ids)) ratings_df.head()<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Output [1]<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0412\u0441\u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445: 15313<br \/>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438: 15121<br \/>  \u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: 1007<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>Id<\/th>\n<th>DocumentId<\/th>\n<th>Rate<\/th>\n<th>UserId<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>True<\/td>\n<td>5000<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>2<\/td>\n<td>878<\/td>\n<td>True<\/td>\n<td>2441<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>3<\/td>\n<td>1512<\/td>\n<td>True<\/td>\n<td>678<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>4<\/td>\n<td>1515<\/td>\n<td>True<\/td>\n<td>678<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>5<\/td>\n<td>877<\/td>\n<td>True<\/td>\n<td>5110<\/td>\n<\/tr>\n<tr>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>1007 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 15313 \u201c\u043e\u0446\u0435\u043d\u043a\u0438\u201d. \u0418\u0437 \u043d\u0438\u0445 15121 \u201c\u043b\u0430\u0439\u043a\u201d.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438: \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u043a\u043e\u043b\u043e\u043d\u043a\u0430 <strong>Id<\/strong>), \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u043a\u043e\u043b\u043e\u043d\u043a\u0430 <strong>DocumentId<\/strong>), \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e (\u043a\u043e\u043b\u043e\u043d\u043a\u0430 <strong>Rate<\/strong>) \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043a\u043e\u043b\u043e\u043d\u043a\u0430 <strong>UserId<\/strong>).<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <strong>RateInt<\/strong>. 1 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e; -1 \u2014 \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">ratings_df['RateInt'] = ratings_df['Rate'].apply(lambda x: 1 if x else -1) ratings_df.head()<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Output [2]<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>Id<\/th>\n<th>DocumentId<\/th>\n<th>Rate<\/th>\n<th>UserId<\/th>\n<th>RateInt<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>True<\/td>\n<td>5000<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>2<\/td>\n<td>878<\/td>\n<td>True<\/td>\n<td>2441<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>3<\/td>\n<td>1512<\/td>\n<td>True<\/td>\n<td>678<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>4<\/td>\n<td>1515<\/td>\n<td>True<\/td>\n<td>678<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>5<\/td>\n<td>877<\/td>\n<td>True<\/td>\n<td>5110<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439: \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from sklearn.model_selection import train_test_split train, test = train_test_split(ratings_df, test_size=0.2)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0433\u0434\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445 \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def create_matrix(df):     ratings_per_user = []     post_ids = df['DocumentId'].unique()     for user_id in tqdm_notebook(all_users_ids, '\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438'):         row = {'user_id': user_id}         ratings = df[df['UserId'] == user_id]['DocumentId'].values         for post_id in post_ids:             row[str(post_id)] = 1 if post_id in ratings else 0         ratings_per_user.append(row)     return pd.DataFrame(ratings_per_user)  train_df = create_matrix(train) test_df = create_matrix(test)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from scipy import spatial  def cos_distance(x1, x2):     return spatial.distance.cosine(x1, x2)  at_least_one_fav_post_users = list(train_valuable_df['user_id'].values)  def calculate_distances(df):     columns = df.columns[:-1]     cp = at_least_one_fav_post_users.copy()     data = []     for user_id_1 in tqdm_notebook(at_least_one_fav_post_users, '\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438'):         row = {'user_id': user_id_1}         for user_id_2 in cp:             x1 = df[df['user_id'] == user_id_1][columns].values[0]             x2 = df[df['user_id'] == user_id_2][columns].values[0]             row[str(user_id_2)] = cos_distance(x1, x2)         data.append(row)     return pd.DataFrame(data)  train_distances = calculate_distances(train_valuable_df)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u043f\u043e\u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0432\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439: \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u0435\u0434\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<h2 id=\"pervyy-sposob\">\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h2>\n<p>  <\/p>\n<p>\u0411\u0435\u0440\u0451\u043c 10 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0443 \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from tqdm import tqdm_notebook import heapq   def rmse(predicted, actual):     return ((predicted - actual) ** 2).mean() ** 0.5  def get_similar(id, n):     df = train_distances[train_distances['user_id'] == id]     d = df.to_dict('records')[0]     top_similar_ids = heapq.nsmallest(n+1, d, key=d.get)     top_similar = df[top_similar_ids]     return top_similar.to_dict('records')[0]  def get_predictions(id, n):     top_similar_users = get_similar(id, n)     top_similar_users_ids = list([int(x) for x in top_similar_users.keys()])     ratings_for_top_similar = train_df[train_df['user_id'].isin(top_similar_users_ids)]     predicted_ratings = {}     for article_id in train_df.columns[:-1]:         predicted_ratings[article_id] = ratings_for_top_similar[article_id].mean()             return predicted_ratings  rand_n_users = train_distances.sample(50)['user_id'].values err = 0  for u in tqdm_notebook(rand_n_users):     pred = get_predictions(u, 10)     err += rmse(test_df[test_df['user_id'] == u][list(pred.keys())].values, pd.DataFrame(pred, index=[0]).values)  print(err \/ len(rand_n_users))<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0440\u0430\u0432\u043d\u043e\u0439 0.855.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f<\/th>\n<th>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DIRECTUM 5.6. \u041d\u043e\u0432\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/td>\n<td>0.6364<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM 5.6 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/td>\n<td>0.6364<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 DIRECTUM 5.5<\/td>\n<td>0.6364<\/td>\n<\/tr>\n<tr>\n<td>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f DIRECTUM \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 DirectumRX<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>\u0415\u0436\u0435\u0433\u043e\u0434\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a DIRECTUM \u2013 \u0442\u0435\u043f\u0435\u0440\u044c 5.1!<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>\u041e\u0442 \u0410 \u0434\u043e \u041a. DIRECTUM 5.0 \u0441\u043d\u043e\u0432\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM Jazz \u2013 \u043d\u043e\u0432\u043e\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 DIRECTUM<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>\u0410 \u0442\u044b \u0443\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b DIRECTUM?<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM 5.6. \u0421\u0443\u043f\u0435\u0440-\u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u043f\u0430\u043f\u043a\u0430\u0445<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 ISBL \u0432 GitLab<\/td>\n<td>0.5455<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"vtoroy-sposob\">\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h2>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0415\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def get_predictions(id, n):     similar_users = get_similar(u, 10)     prediction = {}         user_ids = list(similar_users.keys())     user_similarities = []     for user_id in user_ids:         user_similarities.append(similar_users[user_id])         predicted_ratings = {}      for article_id in train_df.columns[:-1]:         prediction_for_article = 0         numerator = 0         denominator = 0          for user_id in user_ids:             rating = train_df[train_df['user_id'] == int(user_id)][article_id].values[0]             numerator += rating * (1 - similar_users[user_id])             denominator += np.abs(similar_users[user_id])                 predicted_ratings[article_id] = numerator \/ denominator     return predicted_ratings  err = 0  for u in tqdm_notebook(rand_n_users):     pred = get_predictions(u, 10)     err += rmse(test_df[test_df['user_id'] == u][list(pred.keys())].values, pd.DataFrame(pred, index=[0]).values)  print(err \/ len(rand_n_users))<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 0.866. \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u0421\u0442\u0430\u0442\u044c\u044f<\/th>\n<th>\u041e\u0446\u0435\u043d\u043a\u0430<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DIRECTUM 5.6. \u041d\u043e\u0432\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/td>\n<td>0.3095<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM 5.6 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/td>\n<td>0.3095<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 DIRECTUM 5.5<\/td>\n<td>0.3095<\/td>\n<\/tr>\n<tr>\n<td>\u041c\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0436\u0431 DIRECTUM \u2014 \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/td>\n<td>0.2833<\/td>\n<\/tr>\n<tr>\n<td>\u041e\u0442 \u0410 \u0434\u043e \u041a. DIRECTUM 5.0 \u0441\u043d\u043e\u0432\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f<\/td>\n<td>0.2809<\/td>\n<\/tr>\n<tr>\n<td>\u0415\u0436\u0435\u0433\u043e\u0434\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a DIRECTUM \u2013 \u0442\u0435\u043f\u0435\u0440\u044c 5.1!<\/td>\n<td>0.2784<\/td>\n<\/tr>\n<tr>\n<td>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f DIRECTUM \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 DirectumRX<\/td>\n<td>0.2778<\/td>\n<\/tr>\n<tr>\n<td>\u0410 \u0442\u044b \u0443\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b DIRECTUM?<\/td>\n<td>0.2778<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM 5.6. \u0421\u0443\u043f\u0435\u0440-\u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u043f\u0430\u043f\u043a\u0430\u0445<\/td>\n<td>0.2758<\/td>\n<\/tr>\n<tr>\n<td>DIRECTUM Ario \u2013 \u043d\u043e\u0432\u043e\u0435 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/td>\n<td>0.2732<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0430\u0445 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0437\u0430 \u043c\u0435\u0441\u044f\u0446 \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b \u201c\u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u201d.<\/p>\n<p>  <\/p>\n<h1 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h1>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2013 \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442\u0441\u044f. \u041e\u0434\u043d\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u0431\u043b\u043e\u0433\u0435, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435.<\/p>\n<p>  <\/p>\n<p>\u041a \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c-\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0439, \u0438 \u043d\u0430\u0439\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 (\u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043f\u0430\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c-\u043e\u0431\u044a\u0435\u043a\u0442)<\/li>\n<li>\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u2013 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (\u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u043d\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u043d\u0430\u0446\u0435\u0435\u0439)<\/li>\n<li>\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u043a\u043b\u043e\u043d\u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0442.\u043a. \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043e\u0446\u0435\u043d\u0438\u0442.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u0430\u043c\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/directum\/blog\/463609\/\"> https:\/\/habr.com\/ru\/company\/directum\/blog\/463609\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 MailChimp \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e <a href=\"https:\/\/www.wired.com\/2016\/07\/mailchimp-sends-billion-emails-day-thats-easy-part\/\">\u0440\u0430\u0441\u0441\u044b\u043b\u0430\u044e\u0442 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434 \u043f\u0438\u0441\u0435\u043c<\/a>. \u0418\u0437 \u043d\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 <a href=\"https:\/\/mailchimp.com\/resources\/email-marketing-benchmarks\/\">20.81%<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0448\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438. \u042d\u0442\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043e\u043a\u043e\u043b\u043e 21% \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043b\u043b\u0430\u0431\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-293363","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293363","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=293363"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293363\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}