{"id":323359,"date":"2021-05-18T21:00:51","date_gmt":"2021-05-18T21:00:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=323359"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=323359","title":{"rendered":"Python, \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f: \u0447\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u043e\u0441\u0442 \u0441\u043c. <a href=\"https:\/\/habr.com\/ru\/post\/557998\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>\u0425\u043e\u0442\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u0430 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0445 \u0440\u043e\u0441\u0442\u0435 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u0440\u0438\u043b\u0438 \u0441\u0438\u043b\u0443 \u0438 \u0437\u043d\u0430\u043a \u0441\u0432\u044f\u0437\u0438, \u043d\u043e \u043d\u0435 \u043d\u0430\u043a\u043b\u043e\u043d, \u0442.\u0435. \u0443\u0433\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442. \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043c\u043f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0440\u043e\u0441\u0442\u0435, \u0442\u043e \u0440\u043e\u0441\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435\u0439 <em>\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/em>, \u0430 \u0432\u0435\u0441 \u2014 <em>\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439<\/em>.<\/p>\n<p><sup>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u044d\u0442\u0438\u043c\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <\/sup><em><sup>\u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/sup><\/em><sup>. \u042d\u0442\u043e\u0442 \u0422\u0435\u0440\u043c\u0438\u043d \u0431\u044b\u043b \u0432\u0432\u0435\u0434\u0435\u043d \u0431\u0440\u0438\u0442\u0430\u043d\u0441\u043a\u0438\u043c \u044d\u0440\u0443\u0434\u0438\u0442\u043e\u043c 19-\u043e\u0433\u043e \u0432\u0435\u043a\u0430 \u0441\u044d\u0440\u043e\u043c \u0424\u0440\u044d\u043d\u0441\u0438\u0441\u043e\u043c \u0413\u044d\u043b\u0442\u043e\u043d\u043e\u043c. \u041e\u043d \u0438 \u0435\u0433\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u041a\u0430\u0440\u043b \u041f\u0438\u0440\u0441\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u0435\u043b \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438, \u0432 19-\u043e\u043c \u0432\u0435\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/sup><\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0438\u0437 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u0430\u044f \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u00ab\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439\u00bb \u0438 \u00ab\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439\u00bb \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0438\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430 \u043f\u043e\u0436\u0430\u0440\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u043d\u0430\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0436\u0430\u0440\u043e\u043c \u0443\u0449\u0435\u0440\u0431\u043e\u043c. \u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u0436\u0430\u0440\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043d\u0430\u043d\u043e\u0441\u0438\u0442 \u0443\u0449\u0435\u0440\u0431. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043c\u0430\u0448\u0438\u043d, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430, \u043a\u0430\u043a \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0443\u0449\u0435\u0440\u0431\u0430. \u0412 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0431\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0436\u0430\u0440\u0430<\/em>. \u0422\u0430\u043a\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u0441\u043f\u0443\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/em>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0442 \u043d\u0430\u0448\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<h2>\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0414\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043a\u0430\u043a <em>x<\/em>&nbsp;\u0438 <em>y<\/em>, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0440\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u043e. \u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>x<\/em>&nbsp;\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>y<\/em>&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=a+bx\" alt=\"y=a+bx\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb9\/c45\/d24\/eb9c45d24f51d970a00d60958f773c0f.svg\" width=\"75\" height=\"18\"><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>a&nbsp;<\/em>\u0438 <em>b&nbsp;<\/em>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u043e\u0447\u043d\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u043a\u0440\u0443\u0442\u0438\u0437\u043d\u0443 \u043f\u0440\u044f\u043c\u043e\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>a&nbsp;<\/em>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0441 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u044c\u044e \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439, \u0430 <em>b<\/em>&nbsp;\u2014 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c, \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u043b\u0438\u043d\u0438\u0438 \u0438\u043b\u0438 \u0443\u0433\u043b\u043e\u0432\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0448\u043a\u0430\u043b\u0430\u043c\u0438 \u043f\u043e \u0426\u0435\u043b\u044c\u0441\u0438\u044e \u0438 \u043f\u043e \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0443 a = 32<em>&nbsp;<\/em>\u0438 b = 1.8. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u043d\u0430\u0448\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>a&nbsp;<\/em>\u0438 <em>b<\/em>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=32+1.8x\" alt=\"y=32+1.8x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6de\/19a\/b02\/6de19ab02f5cd3dd4016b1facbbfb796.svg\" width=\"96\" height=\"17\"><\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f 10\u00b0\u0421 \u043f\u043e \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0443 \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e <em>x<\/em>&nbsp;\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c 10:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=32+1.8(10)=50\" alt=\"y=32+1.8(10)=50\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eef\/6ff\/46a\/eef6ff46a159c3852b31b00125af9848.svg\" width=\"154\" height=\"20\"><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0448\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e 10\u00b0\u0421 \u0440\u0430\u0432\u043d\u043e 50\u00b0F, \u0438 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 pandas, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0438\u0437 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a:<\/p>\n<pre><code class=\"python\">'''\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430''' celsius_to_fahrenheit = lambda x: 32 + (x * 1.8)  def ex_3_11(): &nbsp;&nbsp;&nbsp; '''\u0413\u0440\u0430\u0444\u0438\u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0445 \u0448\u043a\u0430\u043b''' &nbsp;&nbsp;&nbsp; df = pd.DataFrame({'C':s, 'F':s.map(celsius_to_fahrenheit)}) &nbsp;&nbsp;&nbsp; df.plot('C', 'F', legend=False, grid=True) &nbsp;&nbsp;&nbsp; plt.xlabel('\u0413\u0440\u0430\u0434\u0443\u0441\u044b \u0426\u0435\u043b\u044c\u0441\u0438\u044f') &nbsp;&nbsp;&nbsp; plt.ylabel('\u0413\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430') &nbsp;&nbsp;&nbsp; plt.show()<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0438\u0436\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c5\/d8f\/4a9\/9c5d8f4a92d5d93c3e92b8a0dd4fe239.png\" width=\"360\" height=\"295\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0441\u0438\u043d\u044f\u044f \u043b\u0438\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442 0 \u043d\u0430 \u0448\u043a\u0430\u043b\u0435 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u043f\u0440\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 32 \u043d\u0430 \u0448\u043a\u0430\u043b\u0435 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430. \u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 <em>a<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>y<\/em>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>x<\/em>&nbsp;\u0440\u0430\u0432\u043d\u043e 0.<\/p>\n<p>\u041d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u0441 \u043d\u0435\u043a\u0438\u043c \u0443\u0433\u043b\u043e\u0432\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <em>b<\/em>; \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043a 2. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0448\u043a\u0430\u043b\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0448\u0438\u0440\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0448\u043a\u0430\u043b\u044b \u0426\u0435\u043b\u044c\u0441\u0438\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0440\u044f\u043c\u0430\u044f \u0443\u0441\u0442\u0440\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438.<\/p>\n<h2>\u041e\u0441\u0442\u0430\u0442\u043a\u0438<\/h2>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u0447\u0438\u0441\u0442\u044b\u0435, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0430\u0434\u0443\u0441\u0430\u043c\u0438 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430. \u041f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0434\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c <em>y<\/em>&nbsp;\u0441\u0442\u0440\u043e\u0433\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 <em>x<\/em>. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=a+bx+\u03b5\" alt=\"y=a+bx+\u03b5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e92\/1e8\/518\/e921e851899073906f9eb9a79a585acd.svg\" width=\"102\" height=\"18\"><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c, <em>\u03b5<\/em> &nbsp;\u2014 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u0447\u043b\u0435\u043d, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <em>a<\/em>&nbsp;\u0438 <em>b<\/em>&nbsp;\u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>x<\/em>&nbsp;\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <em>y<\/em>. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>y<\/em>&nbsp;\u2014 \u044d\u0442\u043e <em>y\u0302<\/em>, \u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u043e\u0438\u043c\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\u03b5=y-y\u0302\" alt=\"\u03b5=y-y\u0302\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/03c\/f6a\/160\/03cf6a160f9197bcea932f0e7390fe8f.svg\" width=\"72\" height=\"18\"><\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c. \u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u043b\u0438\u0431\u043e \u043d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u043e\u0441\u0442\u0430, \u0442\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0434\u0438\u0435\u0442\u044b, \u0443\u0440\u043e\u0432\u043d\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043b\u0438\u0437\u043a\u043e\u0433\u043e \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\u0430).<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043b\u044f <em>a<\/em>&nbsp;\u0438 <em>b<\/em>&nbsp;\u043c\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <em>x<\/em>&nbsp;\u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u0439\u0442\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 <em>x<\/em>&nbsp;\u0438 <em>y<\/em>.<\/p>\n<h3>\u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e <em>\u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043f\u043e\u0442\u0435\u0440\u0438<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442 \u0442\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043d\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0435. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0435\u0441\u043b\u0438 \u0438\u0445 \u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0437\u0432\u0435\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438. \u0412\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0448\u0442\u0440\u0430\u0444\u0430 \u043d\u0430 \u0431<em>\u043e<\/em>\u043b\u044c\u0448\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0447\u0435\u043c \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043b.<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0430\u044f\u0441\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\u043c\u0438<\/em>, \u043e\u0442 \u0430\u043d\u0433\u043b. Ordinary Least Squares (OLS), \u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10c\/125\/4c6\/10c1254c6aee2462ca9c2142eaa36cf2.png\" width=\"195\" height=\"58\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0442\u044f \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u043b\u0435\u043d\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u043f\u0440\u0438\u0432\u0435\u0434\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7f1\/117\/54f\/7f111754f8c63582629dae762f58c7e0.png\" width=\"110\" height=\"51\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 (<em>a<\/em>) \u2014 \u044d\u0442\u043e \u0447\u043b\u0435\u043d, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>X<\/em> \u0438 <em>Y<\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"a=y \u0305-bx \u0305\" alt=\"a=y \u0305-bx \u0305\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd5\/8fe\/55e\/cd58fe55e57266d14f200d2a14e90992.svg\" width=\"91\" height=\"21\"><\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>a&nbsp;<\/em>\u0438 <em>b<\/em> \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432.<\/p>\n<h2>\u041d\u0430\u043a\u043b\u043e\u043d \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>covariance<\/code>, <code>variance <\/code>\u0438 <code>mean<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439 \u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430 \u043f\u043b\u043e\u0432\u0446\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"python\">def slope(xs, ys): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 (\u0443\u0433\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430)''' &nbsp;&nbsp;&nbsp; return xs.cov(ys) \/ xs.var()  def intercept(xs, ys):  &nbsp;&nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f (\u0441 \u043e\u0441\u044c\u044e Y)''' &nbsp;&nbsp; return ys.mean() - (xs.mean() * slope(xs, ys))  def ex_3_12(): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 (\u0443\u0433\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430)  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'] &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a&nbsp; = intercept(X, y) &nbsp;&nbsp;&nbsp; b&nbsp; = slope(X, y)  &nbsp;&nbsp;&nbsp; print('\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435: %f, \u043d\u0430\u043a\u043b\u043e\u043d: %f' % (a,b))<\/code><\/pre>\n<pre><code>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435: 1.691033, \u043d\u0430\u043a\u043b\u043e\u043d: 0.014296<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043d\u0430\u043a\u043b\u043e\u043d \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 0.0143 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 1.6910.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>\u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f <\/em>\u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0441), \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f (\u0440\u043e\u0441\u0442) \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>np.exp<\/code>, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>np.log<\/code>. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0435\u0441 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u043f\u043b\u043e\u0432\u0446\u0430 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0440\u043e\u0441\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 5.42 \u043a\u0433. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u0435\u043d\u043e \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0433\u0440\u0430\u043d\u0438\u0446 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>\u043d\u0430\u043a\u043b\u043e\u043d\u0430 <\/em>\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e <em>y&nbsp;<\/em>\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <em>x<\/em>. \u041c\u043e\u0434\u0435\u043b\u044c \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440 \u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 1.014 \u043a\u0433. \u0432\u0435\u0441\u0430 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0432\u0441\u0435\u0445 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u0430\u0445, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0440\u043e\u0441\u0442\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430, \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043f\u043e\u043b \u0438\u043b\u0438 \u0442\u0438\u043f \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>regression_line<\/code> \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442 <em>x<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <em>y\u0302<\/em>&nbsp;\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <em>a&nbsp;<\/em>\u0438 <em>b<\/em>.<\/p>\n<pre><code class=\"python\">'''\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438''' regression_line = lambda a, b: lambda x: a + (b * x)&nbsp; # \u0432\u044b\u0437\u043e\u0432\u044b fn(a,b)(x)  def ex_3_13(): &nbsp;&nbsp;&nbsp; '''\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'].apply( jitter(0.5) ) &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a, b = intercept(X, y), slope(X, y)  &nbsp;&nbsp;&nbsp; ax = pd.DataFrame(np.array([X, y]).T).plot.scatter(0, 1, s=7) &nbsp;&nbsp;&nbsp; s&nbsp; = pd.Series(range(150,210)) &nbsp;&nbsp;&nbsp; df = pd.DataFrame( {0:s, 1:s.map(regression_line(a, b))} )&nbsp;  &nbsp;&nbsp;&nbsp; df.plot(0, 1, legend=False, grid=True, ax=ax) &nbsp;&nbsp;&nbsp; plt.xlabel('\u0420\u043e\u0441\u0442, \u0441\u043c.') &nbsp;&nbsp;&nbsp; plt.ylabel('\u041b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0441') &nbsp;&nbsp;&nbsp; plt.show()<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>regression_line<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 <em>x<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <em>a<\/em> + <em>bx<\/em>.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ba\/0f2\/ae2\/2ba0f2ae2ee39f1f1285f93be1068c79.png\" width=\"360\" height=\"295\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0448\u0430 \u043e\u0446\u0435\u043d\u043a\u0430 <em>y\u0302<\/em>&nbsp;\u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>y<\/em>.<\/p>\n<pre><code class=\"python\">def residuals(a, b, xs, ys): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432''' &nbsp;&nbsp;&nbsp; estimate = regression_line(a, b)&nbsp;&nbsp;&nbsp;&nbsp; # \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 &nbsp;&nbsp;&nbsp; return pd.Series( map(lambda x, y: y - estimate(x), xs, ys) )  constantly = lambda x: 0  def ex_3_14(): &nbsp;&nbsp;&nbsp; '''\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'].apply( jitter(0.5) ) &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a, b = intercept(X, y), slope(X, y)  &nbsp;&nbsp;&nbsp; y&nbsp; = residuals(a, b, X, y) &nbsp;&nbsp;&nbsp; ax = pd.DataFrame(np.array([X, y]).T).plot.scatter(0, 1, s=12) &nbsp;&nbsp;&nbsp; s&nbsp; = pd.Series(range(150,210)) &nbsp;&nbsp;&nbsp; df = pd.DataFrame( {0:s, 1:s.map(constantly)} )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; df.plot(0, 1, legend=False, grid=True, ax=ax) &nbsp;&nbsp;&nbsp; plt.xlabel('\u0420\u043e\u0441\u0442, \u0441\u043c.') &nbsp;&nbsp;&nbsp; plt.ylabel('\u041e\u0441\u0442\u0430\u0442\u043a\u0438') &nbsp;&nbsp;&nbsp; plt.show()<\/code><\/pre>\n<p><em>\u0413\u0440\u0430\u0444\u0438\u043a \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432<\/em><strong> <\/strong>\u2014 \u044d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043d\u0430 \u043e\u0441\u0438 <em>Y<\/em> \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u043e\u0441\u0438 <em>X<\/em>. \u0415\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u0442 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438, \u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u0430 \u043a \u043d\u0430\u0448\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bac\/7ba\/e60\/bac7bae6017e041b3b23b31672bf9b48.png\" width=\"360\" height=\"295\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0433\u0440\u0430\u0444\u0438\u043a \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u043f\u043e-\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c. \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430. \u0412 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u0438\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u0435.<\/p>\n<h2>\u0414\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041f\u0435\u0440\u0432\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043b\u0438\u0431\u043e \u0441 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0413\u0440\u0430\u0444\u0438\u043a \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a.<\/p>\n<p>\u041b\u0435\u0432\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0447\u0435\u043c \u043f\u0440\u0430\u0432\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430. \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0432\u0435\u0441\u0430 \u0441\u0440\u0435\u0434\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0440\u043e\u0441\u043b\u044b\u0445 \u0441\u043f\u043e\u0440\u0442\u0441\u043c\u0435\u043d\u043e\u0432. \u041a\u043e\u0433\u0434\u0430 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>\u0433\u0435\u0442\u0435\u0440\u043e\u0441\u043a\u0435\u0434\u0430\u0441\u0442\u0438\u0447\u043d\u044b<\/em>, \u0442.\u0435. \u0438\u0445 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043d\u0435\u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u0430. \u042d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b, \u0438 \u0447\u0442\u043e \u0438\u0445 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u043c\u0438. <\/p>\n<p>\u0413\u0435\u0442\u0435\u0440\u043e\u0441\u043a\u0435\u0434\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u0430 \u0438 \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0441\u043b\u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043d\u0430 \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0439, \u0442\u043e \u043e\u043d\u0430 \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u0431\u044b \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u0431\u044b \u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<h2>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0438 \u0438 R-\u043a\u0432\u0430\u0434\u0440\u0430\u0442<\/h2>\n<p>\u0425\u043e\u0442\u044f \u0438\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442.\u0435. \u0445\u043e\u0440\u043e\u0448\u043e \u043a \u043d\u0438\u043c \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u0430, \u0431\u044b\u043b\u043e \u0431\u044b \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0438. <em>R<\/em><sup>2<\/sup>, \u0438\u043b\u0438 <em>R-\u043a\u0432\u0430\u0434\u0440\u0430\u0442<\/em>, \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043c\u0435\u0436\u0434\u0443 0 \u0438 1 \u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u043d\u0443\u044e \u0434\u043e\u043b\u044e \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e, \u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 <em>R<\/em><sup>2<\/sup>&nbsp;\u043a 1, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u0430 \u043a \u0442\u043e\u0447\u043a\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0432 Y \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 X. <em>R<\/em><sup>2<\/sup> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0438\u0436\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/22e\/102\/51a\/22e10251ab841ff9288f1255236aded9.png\" width=\"132\" height=\"51\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c <em>var<\/em>(<em>\u03b5<\/em>)&nbsp;\u2014 \u044d\u0442\u043e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0438 <em>var<\/em>(<em>Y<\/em>)<em>&nbsp;<\/em>\u2014 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0432 <em>Y<\/em>. \u0412 \u0446\u0435\u043b\u044f\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u043c\u044b\u0441\u043b\u0430 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0443\u0433\u0430\u0434\u0430\u0442\u044c \u0447\u0435\u0439-\u0442\u043e \u0432\u0435\u0441. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043e\u0431 \u0438\u0441\u043f\u044b\u0442\u0443\u0435\u043c\u044b\u0445, \u0442\u043e \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c. \u0422\u0430\u043a\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u0433\u0430\u0434\u043a\u0438 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c \u0432\u0435\u0441\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <em>var<\/em>(<em>Y<\/em>)<em>, <\/em>\u0442.\u0435. \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u0430 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u0441\u043e\u043e\u0431\u0449\u0438\u043b \u0432\u0430\u043c \u0438\u0445 \u0440\u043e\u0441\u0442, \u0442\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0432\u044b \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438, \u0447\u0442\u043e <em>a<\/em> + <em>bx<\/em>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0430\u0448\u0435\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0431\u044b\u043b\u043e \u0431\u044b    <em>&nbsp;<\/em>\u0438\u043b\u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0444\u043e\u0440\u043c\u0443\u043b\u044b <em>var<\/em>(<em>\u03b5<\/em>)\/<em>var<\/em>(<em>Y<\/em>)<em>&nbsp;<\/em>\u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0435, \u0442. \u0435. \u0434\u043e\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438, \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0431\u0435\u0437 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <em>R<\/em><sup>2<\/sup>&nbsp;\u0434\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u2014 \u044d\u0442\u043e \u0434\u043e\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e.<\/p>\n<p><sup>\u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <\/sup><em><sup>r<\/sup><\/em><sup>, \u043d\u0438\u0437\u043a\u0438\u0439 <\/sup><em><sup>R<\/sup><\/em><sup>2&nbsp;\u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438\u0445 \u0441\u0432\u044f\u0437\u044c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439.<\/sup><\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>R<\/em><sup>2<\/sup> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0438 \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043a \u0434\u0430\u043d\u043d\u044b\u043c. <em>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u043d\u0430\u044f<\/em> \u043b\u0438\u043d\u0438\u044f<em> <\/em>\u2014 \u044d\u0442\u043e \u043b\u0438\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>R<\/em><sup>2<\/sup>. \u041f\u043e \u043c\u0435\u0440\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <em>R<\/em><sup>2<\/sup> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/620\/85c\/fff\/62085cfffff4259004513bcc4efd8e90.png\" width=\"437\" height=\"220\"><figcaption><\/figcaption><\/figure>\n<p>\u041b\u0435\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f    , \u043f\u0440\u0430\u0432\u044b\u0439 \u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c\u044e <em>f<\/em>. \u0421 \u0447\u0438\u0441\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0432 <em>y<\/em>. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <em>R<\/em><sup>2<\/sup><em>&nbsp;<\/em>\u043f\u0443\u0442\u0435\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <em>y<\/em>:<\/p>\n<pre><code class=\"python\">def r_squared(a, b, xs, ys): &nbsp;&nbsp;&nbsp; '''\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 (R-\u043a\u0432\u0430\u0434\u0440\u0430\u0442)''' &nbsp;&nbsp;&nbsp; r_var = residuals(a, b, xs, ys).var()  &nbsp;&nbsp;&nbsp; y_var = ys.var() &nbsp;&nbsp;&nbsp; return 1 - (r_var \/ y_var)  def ex_3_15(): &nbsp;&nbsp;&nbsp; '''\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 R-\u043a\u0432\u0430\u0434\u0440\u0430\u0442  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'].apply( jitter(0.5) ) &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a, b = intercept(X, y), slope(X, y) &nbsp;&nbsp;&nbsp; return r_squared(a, b, X, y)<\/code><\/pre>\n<pre><code>0.75268223613272323<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0.753. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0431\u043e\u043b\u0435\u0435 75% \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0432\u0435\u0441\u0430 \u043f\u043b\u043e\u0432\u0446\u043e\u0432, \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0432\u0448\u0438\u0445 \u043d\u0430 \u041e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 2012 \u0433., \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0440\u043e\u0441\u0442\u043e\u043c.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0441 \u043e\u0434\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439), \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 <em>R<\/em><sup>2<\/sup> \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 <em>r&nbsp;<\/em>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f<em> <\/em>\u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439:<\/p>\n<p>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 <em>r<\/em>&nbsp;\u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>Y<\/em> \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>X<\/em>, \u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 <em>R<\/em><sup>2<\/sup> \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 0.5<sup>2<\/sup>, \u0442.\u0435. 0.25.<\/p>\n<h2>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0422\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439<\/em>.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0431\u0443\u043a\u0432\u0443 \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0435, \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>\u03b2<\/em>&nbsp;(\u0431\u0435\u0442\u0430), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\u03b2_1x_1+\u03b2_2x_2\" alt=\"y=\u03b2_1x_1+\u03b2_2x_2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/379\/c69\/bee\/379c69bee782271d39ee9e7eecdabf7a.svg\" width=\"116\" height=\"18\"><\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430 <em>\u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e-\u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439<\/em><strong> <\/strong>\u043c\u043e\u0434\u0435\u043b\u0438, \u0433\u0434\u0435 <em>\u03b2<\/em><sub>1<\/sub><em>&nbsp;= a <\/em>\u0438 <em>\u03b2<\/em><sub>2<\/sub><em>&nbsp;= b <\/em>\u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e <em>x<sub>1<\/sub><\/em>&nbsp;\u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0440\u0430\u0432\u0435\u043d 1, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0433\u043e <em>\u03b2<\/em><sub>1<\/sub> \u2014 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0448\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c <em>x<\/em><sub>1<\/sub><em>&nbsp;<\/em>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c<\/em> \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0438\u043b\u0438 \u0447\u043b\u0435\u043d\u043e\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0431\u043e\u0431\u0449\u0438\u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 <em>\u03b2<\/em>, \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\u03b2_1x_1+\u03b2_2x_2+\u22ef+\u03b2_nx_n\" alt=\"y=\u03b2_1x_1+\u03b2_2x_2+\u22ef+\u03b2_nx_n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/571\/ca7\/b00\/571ca7b0087ff1311e7a3250b90cc6ba.svg\" width=\"211\" height=\"18\"><\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 <em>x<\/em><sub>1<\/sub><em>&nbsp;<\/em>\u0434\u043e <em>x<\/em><sub>n<\/sub><em>&nbsp;<\/em>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>y<\/em>. \u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 <em>\u03b2<\/em><sub>1<\/sub><em>&nbsp;<\/em>\u0434\u043e <em>\u03b2<\/em><sub>n<\/sub><em>&nbsp;<\/em>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u043f\u0440\u0435\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u0430 \u0446\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0432\u0435\u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u043e\u0441\u0442\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0432\u0435\u0441 \u043b\u044e\u0434\u0435\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432: \u0438\u0445 \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043f\u043e\u043b, \u043f\u0438\u0442\u0430\u043d\u0438\u0435, \u0442\u0438\u043f \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0438 \u044d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0414\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0432\u0443\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <em>x<\/em>. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 pandas, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u043c    <em>&nbsp;<\/em>\u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043a\u043e\u043c, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0448\u0435: \u043c\u0430\u0442\u0440\u0438\u0446\u044b.<\/p>\n<p>\u0422\u0435\u043c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430, \u043f\u043e\u0441\u0442\u0430 \u21163, \u0431\u0443\u0434\u0443\u0442 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/558084\/\"> https:\/\/habr.com\/ru\/post\/558084\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u043e\u0441\u0442 \u0441\u043c. <a href=\"https:\/\/habr.com\/ru\/post\/557998\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>\u0425\u043e\u0442\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0442, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u0430 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0445 \u0440\u043e\u0441\u0442\u0435 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u0440\u0438\u043b\u0438 \u0441\u0438\u043b\u0443 \u0438 \u0437\u043d\u0430\u043a \u0441\u0432\u044f\u0437\u0438, \u043d\u043e \u043d\u0435 \u043d\u0430\u043a\u043b\u043e\u043d, \u0442.\u0435. \u0443\u0433\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442. \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043c\u043f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0440\u043e\u0441\u0442\u0435, \u0442\u043e \u0440\u043e\u0441\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435\u0439 <em>\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/em>, \u0430 \u0432\u0435\u0441 \u2014 <em>\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439<\/em>.<\/p>\n<p><sup>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u044d\u0442\u0438\u043c\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <\/sup><em><sup>\u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/sup><\/em><sup>. \u042d\u0442\u043e\u0442 \u0422\u0435\u0440\u043c\u0438\u043d \u0431\u044b\u043b \u0432\u0432\u0435\u0434\u0435\u043d \u0431\u0440\u0438\u0442\u0430\u043d\u0441\u043a\u0438\u043c \u044d\u0440\u0443\u0434\u0438\u0442\u043e\u043c 19-\u043e\u0433\u043e \u0432\u0435\u043a\u0430 \u0441\u044d\u0440\u043e\u043c \u0424\u0440\u044d\u043d\u0441\u0438\u0441\u043e\u043c \u0413\u044d\u043b\u0442\u043e\u043d\u043e\u043c. \u041e\u043d \u0438 \u0435\u0433\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u041a\u0430\u0440\u043b \u041f\u0438\u0440\u0441\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u0435\u043b \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438, \u0432 19-\u043e\u043c \u0432\u0435\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/sup><\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0438\u0437 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u0430\u044f \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u00ab\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439\u00bb \u0438 \u00ab\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439\u00bb \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0438\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430 \u043f\u043e\u0436\u0430\u0440\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u043d\u0430\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0436\u0430\u0440\u043e\u043c \u0443\u0449\u0435\u0440\u0431\u043e\u043c. \u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u0436\u0430\u0440\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043d\u0430\u043d\u043e\u0441\u0438\u0442 \u0443\u0449\u0435\u0440\u0431. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043c\u0430\u0448\u0438\u043d, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043d\u0430 \u0442\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0436\u0430\u0440\u0430, \u043a\u0430\u043a \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0443\u0449\u0435\u0440\u0431\u0430. \u0412 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0431\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0436\u0430\u0440\u0430<\/em>. \u0422\u0430\u043a\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u0441\u043f\u0443\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/em>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0442 \u043d\u0430\u0448\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<h2>\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0414\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043a\u0430\u043a <em>x<\/em>&nbsp;\u0438 <em>y<\/em>, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0440\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u043e. \u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>x<\/em>&nbsp;\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>y<\/em>&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>a&nbsp;<\/em>\u0438 <em>b&nbsp;<\/em>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u043e\u0447\u043d\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u043a\u0440\u0443\u0442\u0438\u0437\u043d\u0443 \u043f\u0440\u044f\u043c\u043e\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>a&nbsp;<\/em>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0441 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u044c\u044e \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439, \u0430 <em>b<\/em>&nbsp;\u2014 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c, \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u043b\u0438\u043d\u0438\u0438 \u0438\u043b\u0438 \u0443\u0433\u043b\u043e\u0432\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0448\u043a\u0430\u043b\u0430\u043c\u0438 \u043f\u043e \u0426\u0435\u043b\u044c\u0441\u0438\u044e \u0438 \u043f\u043e \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0443 a = 32<em>&nbsp;<\/em>\u0438 b = 1.8. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u043d\u0430\u0448\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>a&nbsp;<\/em>\u0438 <em>b<\/em>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f 10\u00b0\u0421 \u043f\u043e \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0443 \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e <em>x<\/em>&nbsp;\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c 10:<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0448\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e 10\u00b0\u0421 \u0440\u0430\u0432\u043d\u043e 50\u00b0F, \u0438 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 pandas, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0438\u0437 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a:<\/p>\n<pre><code class=\"python\">'''\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430''' celsius_to_fahrenheit = lambda x: 32 + (x * 1.8)  def ex_3_11(): &nbsp;&nbsp;&nbsp; '''\u0413\u0440\u0430\u0444\u0438\u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0445 \u0448\u043a\u0430\u043b''' &nbsp;&nbsp;&nbsp; df = pd.DataFrame({'C':s, 'F':s.map(celsius_to_fahrenheit)}) &nbsp;&nbsp;&nbsp; df.plot('C', 'F', legend=False, grid=True) &nbsp;&nbsp;&nbsp; plt.xlabel('\u0413\u0440\u0430\u0434\u0443\u0441\u044b \u0426\u0435\u043b\u044c\u0441\u0438\u044f') &nbsp;&nbsp;&nbsp; plt.ylabel('\u0413\u0440\u0430\u0434\u0443\u0441\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430') &nbsp;&nbsp;&nbsp; plt.show()<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0438\u0436\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0441\u0438\u043d\u044f\u044f \u043b\u0438\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442 0 \u043d\u0430 \u0448\u043a\u0430\u043b\u0435 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u043f\u0440\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 32 \u043d\u0430 \u0448\u043a\u0430\u043b\u0435 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430. \u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 <em>a<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>y<\/em>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>x<\/em>&nbsp;\u0440\u0430\u0432\u043d\u043e 0.<\/p>\n<p>\u041d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u0441 \u043d\u0435\u043a\u0438\u043c \u0443\u0433\u043b\u043e\u0432\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <em>b<\/em>; \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043a 2. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0448\u043a\u0430\u043b\u044b \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0448\u0438\u0440\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0448\u043a\u0430\u043b\u044b \u0426\u0435\u043b\u044c\u0441\u0438\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0440\u044f\u043c\u0430\u044f \u0443\u0441\u0442\u0440\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438.<\/p>\n<h2>\u041e\u0441\u0442\u0430\u0442\u043a\u0438<\/h2>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u0447\u0438\u0441\u0442\u044b\u0435, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0430\u0434\u0443\u0441\u0430\u043c\u0438 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430. \u041f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0434\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c <em>y<\/em>&nbsp;\u0441\u0442\u0440\u043e\u0433\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 <em>x<\/em>. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c, <em>\u03b5<\/em> &nbsp;\u2014 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u0447\u043b\u0435\u043d, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <em>a<\/em>&nbsp;\u0438 <em>b<\/em>&nbsp;\u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>x<\/em>&nbsp;\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <em>y<\/em>. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>y<\/em>&nbsp;\u2014 \u044d\u0442\u043e <em>y\u0302<\/em>, \u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u043e\u0438\u043c\u0438:<\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c. \u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u043b\u0438\u0431\u043e \u043d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u043e\u0441\u0442\u0430, \u0442\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0434\u0438\u0435\u0442\u044b, \u0443\u0440\u043e\u0432\u043d\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043b\u0438\u0437\u043a\u043e\u0433\u043e \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\u0430).<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043b\u044f <em>a<\/em>&nbsp;\u0438 <em>b<\/em>&nbsp;\u043c\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <em>x<\/em>&nbsp;\u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u0439\u0442\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 <em>x<\/em>&nbsp;\u0438 <em>y<\/em>.<\/p>\n<h3>\u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e <em>\u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043f\u043e\u0442\u0435\u0440\u0438<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0440\u0430\u0436\u0430\u0435\u0442 \u0442\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043d\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0435. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0435\u0441\u043b\u0438 \u0438\u0445 \u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0437\u0432\u0435\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438. \u0412\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0448\u0442\u0440\u0430\u0444\u0430 \u043d\u0430 \u0431<em>\u043e<\/em>\u043b\u044c\u0448\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0447\u0435\u043c \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043b.<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0430\u044f\u0441\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\u043c\u0438<\/em>, \u043e\u0442 \u0430\u043d\u0433\u043b. Ordinary Least Squares (OLS), \u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0442\u044f \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u043b\u0435\u043d\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u043f\u0440\u0438\u0432\u0435\u0434\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 (<em>a<\/em>) \u2014 \u044d\u0442\u043e \u0447\u043b\u0435\u043d, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>X<\/em> \u0438 <em>Y<\/em>:<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>a&nbsp;<\/em>\u0438 <em>b<\/em> \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432.<\/p>\n<h2>\u041d\u0430\u043a\u043b\u043e\u043d \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>covariance<\/code>, <code>variance <\/code>\u0438 <code>mean<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439 \u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430 \u043f\u043b\u043e\u0432\u0446\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"python\">def slope(xs, ys): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 (\u0443\u0433\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430)''' &nbsp;&nbsp;&nbsp; return xs.cov(ys) \/ xs.var()  def intercept(xs, ys):  &nbsp;&nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f (\u0441 \u043e\u0441\u044c\u044e Y)''' &nbsp;&nbsp; return ys.mean() - (xs.mean() * slope(xs, ys))  def ex_3_12(): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u043a\u043b\u043e\u043d\u0430 (\u0443\u0433\u043b\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430)  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'] &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a&nbsp; = intercept(X, y) &nbsp;&nbsp;&nbsp; b&nbsp; = slope(X, y)  &nbsp;&nbsp;&nbsp; print('\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435: %f, \u043d\u0430\u043a\u043b\u043e\u043d: %f' % (a,b))<\/code><\/pre>\n<pre><code>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435: 1.691033, \u043d\u0430\u043a\u043b\u043e\u043d: 0.014296<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043d\u0430\u043a\u043b\u043e\u043d \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 0.0143 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 1.6910.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>\u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f <\/em>\u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0441), \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f (\u0440\u043e\u0441\u0442) \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>np.exp<\/code>, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>np.log<\/code>. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0435\u0441 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u043f\u043b\u043e\u0432\u0446\u0430 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0440\u043e\u0441\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 5.42 \u043a\u0433. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u0435\u043d\u043e \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0433\u0440\u0430\u043d\u0438\u0446 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>\u043d\u0430\u043a\u043b\u043e\u043d\u0430 <\/em>\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e <em>y&nbsp;<\/em>\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <em>x<\/em>. \u041c\u043e\u0434\u0435\u043b\u044c \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440 \u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 1.014 \u043a\u0433. \u0432\u0435\u0441\u0430 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0432\u0441\u0435\u0445 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u0430\u0445, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0440\u043e\u0441\u0442\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430, \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043f\u043e\u043b \u0438\u043b\u0438 \u0442\u0438\u043f \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>regression_line<\/code> \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442 <em>x<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <em>y\u0302<\/em>&nbsp;\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <em>a&nbsp;<\/em>\u0438 <em>b<\/em>.<\/p>\n<pre><code class=\"python\">'''\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438''' regression_line = lambda a, b: lambda x: a + (b * x)&nbsp; # \u0432\u044b\u0437\u043e\u0432\u044b fn(a,b)(x)  def ex_3_13(): &nbsp;&nbsp;&nbsp; '''\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'].apply( jitter(0.5) ) &nbsp;&nbsp;&nbsp; y&nbsp; = df['\u0412\u0435\u0441'].apply(np.log) &nbsp;&nbsp;&nbsp; a, b = intercept(X, y), slope(X, y)  &nbsp;&nbsp;&nbsp; ax = pd.DataFrame(np.array([X, y]).T).plot.scatter(0, 1, s=7) &nbsp;&nbsp;&nbsp; s&nbsp; = pd.Series(range(150,210)) &nbsp;&nbsp;&nbsp; df = pd.DataFrame( {0:s, 1:s.map(regression_line(a, b))} )&nbsp;  &nbsp;&nbsp;&nbsp; df.plot(0, 1, legend=False, grid=True, ax=ax) &nbsp;&nbsp;&nbsp; plt.xlabel('\u0420\u043e\u0441\u0442, \u0441\u043c.') &nbsp;&nbsp;&nbsp; plt.ylabel('\u041b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0441') &nbsp;&nbsp;&nbsp; plt.show()<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>regression_line<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 <em>x<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <em>a<\/em> + <em>bx<\/em>.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0448\u0430 \u043e\u0446\u0435\u043d\u043a\u0430 <em>y\u0302<\/em>&nbsp;\u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>y<\/em>.<\/p>\n<pre><code class=\"python\">def residuals(a, b, xs, ys): &nbsp;&nbsp;&nbsp; '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432''' &nbsp;&nbsp;&nbsp; estimate = regression_line(a, b)&nbsp;&nbsp;&nbsp;&nbsp; # \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 &nbsp;&nbsp;&nbsp; return pd.Series( map(lambda x, y: y - estimate(x), xs, ys) )  constantly = lambda x: 0  def ex_3_14(): &nbsp;&nbsp;&nbsp; '''\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0441\u0442\u0430 \u0438 \u0432\u0435\u0441\u0430''' &nbsp;&nbsp;&nbsp; df = swimmer_data() &nbsp;&nbsp;&nbsp; X&nbsp; = df['\u0420\u043e\u0441\u0442, \u0441\u043c'].apply( jitter(0.5) ) &nbsp;&nbsp;&nbsp; y&nbsp; =<\/code><\/pre>\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-323359","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323359","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=323359"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323359\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}