{"id":308401,"date":"2020-08-13T03:00:14","date_gmt":"2020-08-13T03:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308401"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308401","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/514818\/\">\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0426\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0438 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439. \u0425\u043e\u0442\u044f \u0432 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u0445 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435, \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043d\u0430\u0443\u0447\u043d\u043e-\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442.<\/p>\n<p>  <b>! \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0442\u0440\u0430\u0444\u0438\u043a!<\/b> \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0439, \u0447\u0430\u0441\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 gif.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"#secIntro\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"#secLeastSquares\">\u041c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432<\/a>\n<ul>\n<li><a href=\"#secCalculus\">\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/a><\/li>\n<li><a href=\"#secStats\">\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/a><\/li>\n<li><a href=\"#secProbability\">\u0422\u0435\u043e\u0440\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#secMultilinearRegression\">\u041c\u0443\u043b\u044c\u0442\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/a>\n<ul>\n<li><a href=\"#secLinearAlgebra\">\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#secArbitraryBasis\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u0438\u0441<\/a><\/li>\n<li><a href=\"#secConclusions\">\u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/a>\n<ul>\n<li><a href=\"#secDimensionality\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438<\/a><\/li>\n<li><a href=\"#secNumeric\">\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#secAdv\">\u0420\u0435\u043a\u043b\u0430\u043c\u0430 \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/li>\n<\/ul>\n<p>  <a name=\"secIntro\"><\/a><\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u043d\u044f\u0442\u0438\u044f, \u0442\u0440\u0438 \u0441\u0435\u0441\u0442\u0440\u044b: \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f, \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f \u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f.<br \/>  \u0423 \u043d\u0438\u0445 \u043e\u0431\u0449\u0430\u044f \u0446\u0435\u043b\u044c: \u0438\u0437 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mg\/98\/8z\/mg988z3hvhghw6jjzcnqg6n3fhw.png\" width=\"300\" align=\"left\"><b>\u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f<\/b> \u2014 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u0430\u043a \u0438\u0437 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u0447\u043a\u0430\u0445, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0435\u043c \u0446\u0432\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0438 \u0445\u043e\u0442\u0438\u043c \u0447\u0442\u043e\u0431\u044b \u0446\u0432\u0435\u0442\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0418\u043b\u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u0430\u0434\u0440\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u0445\u043e\u0442\u0438\u043c \u043f\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b: \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0430\u043c\u0438 \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0430, \u0441\u043f\u043b\u0430\u0439\u043d-\u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1b8\/54d\/440\/1b854d44003f175d56fe476eed7a5275.svg\" alt=\"$$\" data-tex=\"display\"><\/math><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/64\/iy\/bi\/64iybi7e2w8cq8mq0llivrrf7co.png\" width=\"300\" align=\"left\"><b>\u0410\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f<\/b> \u2014 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u0430\u043a \u0438\u0437 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u00ab\u043f\u0440\u043e\u0441\u0442\u044b\u0445\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u00ab\u0441\u043b\u043e\u0436\u043d\u043e\u0439\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430. \u0410\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 (\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0442.\u043f). \u041f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e: \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u043d\u0442\u043e\u043c \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u00ab\u0446\u0435\u043d\u043e\u0439\u00bb \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0440\u044f\u0434 \u0422\u0435\u0439\u043b\u043e\u0440\u0430 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435, \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u0430\u043c\u0438, \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u041f\u0430\u0434\u0435, \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u0441\u0438\u043d\u0443\u0441\u0430 \u0411\u0445\u0430\u0441\u043a\u0430\u0440\u0430 \u0438 \u0442.\u043f. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pk\/f1\/x8\/pkf1x8b6hsnkp9qhtjhju4wjeik.png\" width=\"300\" align=\"left\"><b>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/b> \u2014 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u0430\u043a \u0438\u0437 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435, \u043e\u043d\u0438 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u0448\u0443\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0443\u043c\u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0430 \u043e\u0431\u0449\u0443\u044e \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044e, \u0430 \u043d\u0435 \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438. \u0412 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0441\u043c\u044b\u0441\u043b\u0435 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u00ab\u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f\u00bb: \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043a\u0440\u0438\u0432\u0443\u044e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0438\u0436\u0435 \u043a \u0442\u043e\u0447\u043a\u0430\u043c \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044e. \u0417\u0430 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u044b\u043c\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u044f\u043c\u0438 \u043a\u0430\u043a-\u0440\u0430\u0437 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c (\u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u00abloss function\u00bb \u0438\u043b\u0438 \u00abcost function\u00bb).<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u043d\u0430\u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/59f\/d00\/32b\/59fd0032b90ff1d4822973df693a5ff6.svg\" alt=\"${f_i}$\" data-tex=\"inline\"><\/math> <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0fc\/386\/af5\/0fc386af52cc285ae58ce7777cc641d9.svg\" alt=\"$ f = \\sum_i w_i f_i. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0426\u0435\u043b\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u2014 \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> (\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <i>\u043c\u043e\u0434\u0435\u043b\u044c\u044e<\/i>). \u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 (\u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442).<\/p>\n<p>  \u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0441 \u043d\u0430\u043c\u0438 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e: \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u041b\u0435\u0436\u0430\u043d\u0434\u0440 \u0432 1805 \u0433\u043e\u0434\u0443, \u0445\u043e\u0442\u044f \u0413\u0430\u0443\u0441\u0441 \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u043d\u0435\u043c\u0443 \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043e\u0440\u0431\u0438\u0442\u044b \u00ab\u043a\u043e\u043c\u0435\u0442\u044b\u00bb (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u0430\u0440\u043b\u0438\u043a\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u043d\u0435\u0442\u044b) \u0426\u0435\u0440\u0435\u0440\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: LAD, \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432, Ridge \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f, Lasso \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f, ElasticNet \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0433\u0438\u0444\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0422\u043e\u0447\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0413\u0430\u0443\u0441\u0441\u0430 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c\u0438. \u0421\u0438\u043d\u044f\u044f \u043b\u0438\u043d\u0438\u044f \u2014 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043f\u0440\u044f\u043c\u0430\u044f.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jb\/dz\/ge\/jbdzgenmkxhwbpdn73qajp2ncew.gif\"> <br \/>  \u041c\u043e\u0436\u043d\u043e <a href=\"https:\/\/colab.research.google.com\/github\/fbeilstein\/machine_learning\/blob\/master\/workbook_09_linear_regression.ipynb#scrollTo=JVHnuysdS5fq\" rel=\"nofollow\">\u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0432 GoogleColab<\/a>.<br \/>  \u041c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e <a href=\"https:\/\/github.com\/fbeilstein\/machine_learning\" rel=\"nofollow\">\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435 \u043d\u0430 GitHub<\/a>  <\/div>\n<\/p><\/div>\n<p>  <a name=\"secLeastSquares\"><\/a><\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432<\/h2>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f. \u041f\u0443\u0441\u0442\u044c \u043d\u0430\u043c \u0434\u0430\u043d\u044b \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d43\/0a7\/77c\/d430a777cb4172006522cfb402cfa4a6.svg\" alt=\"$\\{(x_1,y_1),\\cdots,(x_N,y_N)\\}$\" data-tex=\"inline\"><\/math> \u0438 \u043c\u044b \u0438\u0449\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0430\u0444\u0444\u0438\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/273\/937\/6fd\/2739376fd72de60589b74ad1b8b0f71c.svg\" alt=\"$ f(x) = a + b \\cdot x, $\" data-tex=\"display\"><\/math><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6c\/-m\/ky\/6c-mkyisya-wfvbi9_rngim0suc.png\" width=\"300\" align=\"left\">\u0447\u0442\u043e\u0431\u044b \u0435\u0435 \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f \u043a \u0442\u043e\u0447\u043a\u0430\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0448 \u0431\u0430\u0437\u0438\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1cb\/e01\/5d2\/1cbe015d2f65f261d3844c0565e55f26.svg\" alt=\"$(1, x)$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u0442\u043e\u0447\u043a\u0438 \u0434\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/561\/81b\/91e\/56181b91ee90a7eb3e428faabfd9ea18.svg\" alt=\"$x_i,$\" data-tex=\"inline\"><\/math> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u0434\u043e\u043b\u044c \u043e\u0441\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0435 \u043e\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u043d\u0438\u0446 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c29\/8d7\/23c\/c298d723c764ca85731e106301d3be53.svg\" alt=\"$|f(x_i) - y_i|$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0441\u0443\u043c\u043c\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/467\/523\/6bf\/4675236bfff8c19340d01e307b1bded1.svg\" alt=\"$\\sum_i |f(x_i) - y_i|$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a Least Absolute Distance (LAD) \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438.<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u2014 \u0441\u0443\u043c\u043c\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0430\u043d\u0442\u0430 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u043e\u043d\u0430 \u043d\u043e\u0441\u0438\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Sum of Squared Errors (SSE)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2f4\/1e7\/2ed\/2f41e72ed35162dd268dd0b608d29b62.svg\" alt=\"$ \\text{SSE}(a,b)=\\text{SS}_{res[iduals]}=\\sum_{i=1}^N{\\text{\u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435}_i}^2=\\sum_{i=1}^N(y_i-f(x_i))^2=\\sum_{i=1}^N(y_i-a-b\\cdot x_i)^2, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 (\u043f\u043e \u0430\u043d\u0433\u043b. OLS) \u2014 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d62\/a16\/ddc\/d62a16ddc842b8866539b7f17e0fb67f.svg\" alt=\"$\\text{SSE}(a,b)$\" data-tex=\"inline\"><\/math> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/is\/ak\/ao\/isakaoo41ptougax6o1d_tm6deq.png\" width=\"600\"><\/div>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0435\u043d: \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u043b\u0435\u0435 \u044f \u0443\u043a\u0430\u0436\u0443 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d62\/a16\/ddc\/d62a16ddc842b8866539b7f17e0fb67f.svg\" alt=\"$\\text{SSE}(a,b)$\" data-tex=\"inline\"><\/math>.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0433\u0438\u0444\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043f\u0440\u044f\u043c\u0430\u044f (\u0441\u0438\u043d\u044f\u044f) \u0438 \u043f\u0440\u043e\u0431\u043d\u0430\u044f \u043f\u0440\u044f\u043c\u0430\u044f (\u0437\u0435\u043b\u0435\u043d\u0430\u044f). \u0421\u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u0438 \u0442\u043e\u0447\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0440\u043e\u0431\u043d\u043e\u0439 \u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u044b\u0445.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mj\/ax\/x2\/mjaxx2ddc-z8nsgn4nxgdy2gyfw.gif\"><br \/>  \u041c\u043e\u0436\u043d\u043e <a href=\"https:\/\/colab.research.google.com\/github\/fbeilstein\/machine_learning\/blob\/master\/lecture_09_linear_regression.ipynb#scrollTo=Mz3BqxXrcnlk\" rel=\"nofollow\">\u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0432 GoogleColab<\/a>.<br \/>  \u041c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e <a href=\"https:\/\/github.com\/fbeilstein\/machine_learning\" rel=\"nofollow\">\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435 \u043d\u0430 GitHub<\/a>  <\/div>\n<\/p><\/div>\n<p>  <a name=\"secCalculus\"><\/a><\/p>\n<h3>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/h3>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0439\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/422\/472\/36f\/42247236f98c5b38a8b25f37ad44c1c9.svg\" alt=\"$\\text{argmin}_{a,b} \\, \\text{SSE}(a,b)$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$ a $\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/302\/c72\/04e\/302c7204ea9987e698a70307646abd71.svg\" alt=\"$ b $\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0438\u0445 \u043d\u0443\u043b\u044e \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/786\/825\/c51\/786825c5170213ae20a8377b2c0fdee5.svg\" alt=\"$ \\begin{aligned} \\frac{\\partial}{\\partial a}\\text{SSE}(a,b)&amp;=-2\\sum_{i=1}^N(y_i-a-bx_i), \\\\ \\frac{\\partial}{\\partial b}\\text{SSE}(a,b)&amp;=-2\\sum_{i=1}^N(y_i-a-bx_i)x_i. \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/530\/1ef\/5b7\/5301ef5b78e9e03c4fbd8889a080d9b9.svg\" alt=\"$ \\begin{aligned} 0 &amp;= -2\\sum_{i=1}^N(y_i-\\hat{a}-\\hat{b}x_i), \\\\ 0 &amp;= -2\\sum_{i=1}^N(y_i-\\hat{a}-\\hat{b}x_i)x_i, \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0438\u0442\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/11c\/f05\/5fa\/11cf055fa96620a932e54433499383e4.svg\" alt=\"$ \\begin{aligned} \\hat{a}&amp;=\\frac{\\sum_i y_i}{N}-\\hat{b}\\frac{\\sum_i x_i}{N},\\\\ \\hat{b}&amp;=\\frac{\\frac{\\sum_i x_i y_i}{N}-\\frac{\\sum_i x_i\\sum_i y_i}{N^2}}{\\frac{\\sum_i x_i^2}{N}-\\left(\\frac{\\sum_i x_i^2}{N}\\right)^2}. \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 \u0438 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0445 \u043e\u0431\u043b\u0430\u0433\u043e\u0440\u043e\u0434\u0438\u043c \u0438 \u0432\u0434\u043e\u0445\u043d\u0435\u043c \u0432 \u043d\u0438\u0445 \u0441\u043c\u044b\u0441\u043b.<br \/>  <a name=\"secStats\"><\/a><\/p>\n<h3>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/h3>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u0441\u0442\u0438\u043c\u0430\u0442\u043e\u0440\u043e\u0432: \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6ad\/767\/e6d\/6ad767e6ddfaf2a3aa97dd261c86d0e5.svg\" alt=\"$\\langle{\\cdot}\\rangle$\" data-tex=\"inline\"><\/math>, \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c1e\/442\/54a\/c1e44254a46eb7b219d4b251c0e4dde0.svg\" alt=\"$\\sigma_{\\cdot}$\" data-tex=\"inline\"><\/math> (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f), \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/35a\/130\/848\/35a1308483ec70336c1e3c6c1d922df5.svg\" alt=\"$\\sigma({\\cdot},{\\cdot})$\" data-tex=\"inline\"><\/math> \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a0b\/789\/8cb\/a0b7898cb32c1fc5996dd43e80fbb015.svg\" alt=\"$\\rho({\\cdot},{\\cdot})$\" data-tex=\"inline\"><\/math>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/619\/045\/430\/6190454309335916fd198bbfb394a29d.svg\" alt=\"$ \\begin{aligned} \\hat{a}&amp;=\\langle{y}\\rangle-\\hat{b}\\langle{x}\\rangle, \\\\ \\hat{b}&amp;=\\frac{\\langle{xy}\\rangle-\\langle{x}\\rangle\\langle{y}\\rangle}{\\langle{x^2}\\rangle-\\langle{x}\\rangle^2}. \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/32b\/30b\/f3e\/32b30bf3ea7943f59e49d6f480bbd5b9.svg\" alt=\"$\\hat{b}$\" data-tex=\"inline\"><\/math> \u043a\u0430\u043a  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/195\/0ab\/648\/1950ab648e07d19d60f917fec7d27af2.svg\" alt=\"$ \\hat{b} = \\frac{\\sigma(x,y)}{\\sigma_x^2}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20e\/ca4\/cbb\/20eca4cbb85408da05053d361ee2e85c.svg\" alt=\"$\\sigma_x$\" data-tex=\"inline\"><\/math> \u044d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 (\u0441\u043c\u0435\u0449\u0435\u043d\u043d\u043e\u0435) \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a71\/55c\/a06\/a7155ca0629d7fd01943b72c3eb8983a.svg\" alt=\"$\\sigma(x,y)$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 (\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e2\/4c1\/6c6\/3e24c16c64e4981029137b9ece647795.svg\" alt=\"$ \\rho(x,y)=\\frac{\\sigma(x,y)}{\\sigma_x \\sigma_y} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e52\/78c\/b48\/e5278cb48ac670a05aab7ea653ff7cc3.svg\" alt=\"$ \\hat{b}=\\rho(x,y)\\frac{\\sigma_y}{\\sigma_x}. $\" data-tex=\"display\"><\/math><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4q\/pw\/_o\/4qpw_ougesibbmsr7mu0zoyazog.png\" width=\"400\"><\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0437\u044f\u0449\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0430\u043a<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b93\/3c8\/f67\/b933c8f67ec96579ea0dd77ff52c988d.svg\" alt=\"$ \\boxed{y-\\langle {y} \\rangle = \\rho(x,y)\\frac{\\sigma_y}{\\sigma_x}(x-\\langle {x} \\rangle)}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439:  <\/p>\n<ul>\n<li> \u043f\u0440\u044f\u043c\u0430\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043d\u0442\u0440 \u043c\u0430\u0441\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4f2\/1af\/c5a\/4f21afc5a0dc44020338a9f5a78bfcc8.svg\" alt=\"$(\\langle{x}\\rangle, \\langle{y}\\rangle)$\" data-tex=\"inline\"><\/math>; <\/li>\n<li> \u0435\u0441\u043b\u0438 \u043f\u043e \u043e\u0441\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0434\u043b\u0438\u043d\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20e\/ca4\/cbb\/20eca4cbb85408da05053d361ee2e85c.svg\" alt=\"$\\sigma_x$\" data-tex=\"inline\"><\/math>, \u0430 \u043f\u043e \u043e\u0441\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math> \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ea6\/d5d\/c97\/ea6d5dc9764f21ad2616ef36d7cdd2fd.svg\" alt=\"$\\sigma_y$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0443\u0433\u043e\u043b \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6fa\/599\/311\/6fa599311f9ae455a2185e478c953b10.svg\" alt=\"$-45^\\circ$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d67\/492\/c53\/d67492c53d29b32a787355cbcaebd15a.svg\" alt=\"$45^\\circ$\" data-tex=\"inline\"><\/math>. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ea1\/b74\/df0\/ea1b74df09123325e65ce7192acebb01.svg\" alt=\"$-1 \\leq\\rho(x,y)\\leq 1$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ul>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a. \u0412 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math> \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2a6\/c84\/6d9\/2a6c846d96fc8c64a0d6e7cf5d4f8f78.svg\" alt=\"$|\\rho(x,y)|\\leq1$\" data-tex=\"inline\"><\/math>. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439(\u043e\u0442 \u043b\u0430\u0442. <i>regressus<\/i> \u2014 \u00ab\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u00bb) \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0441\u0440\u0435\u0434\u043d\u0435\u043c\u0443. \u042d\u0442\u043e \u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u044d\u0440\u043e\u043c \u0424\u0440\u044d\u043d\u0441\u0438\u0441\u043e\u043c \u0413\u0430\u043b\u044c\u0442\u043e\u043d\u043e\u043c \u0432 \u043a\u043e\u043d\u0446\u0435 XIX \u0432\u0435\u043a\u0430 \u0432 \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u043a \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u043e\u0441\u0442\u0430\u00bb. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0447\u0435\u0440\u0442\u044b (\u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u043e\u0441\u0442), \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0445, \u0440\u0435\u0434\u043a\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e\u0442\u043e\u043c\u0441\u0442\u0432\u0430 \u043a\u0430\u043a-\u0431\u044b \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u0441\u0440\u0435\u0434\u043d\u0435\u043c\u0443 \u2014 \u043d\u0430 \u0434\u0435\u0442\u044f\u0445 \u0433\u0435\u043d\u0438\u0435\u0432 \u043f\u0440\u0438\u0440\u043e\u0434\u0430 \u043e\u0442\u0434\u044b\u0445\u0430\u0435\u0442.<\/p>\n<p>  \u0412\u043e\u0437\u0432\u0435\u0434\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/41c\/233\/47a\/41c23347a03c2ec34172bbdccdc0253e.svg\" alt=\"$R = \\rho^2$\" data-tex=\"inline\"><\/math>. \u041a\u0432\u0430\u0434\u0440\u0430\u0442 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0435\u0440\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ba\/d21\/a1f\/0bad21a1feb1341dc1267f2bceaaf5f6.svg\" alt=\"$R^2$\" data-tex=\"inline\"><\/math>, \u0440\u0430\u0432\u043d\u044b\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e4\/c77\/a6e\/3e4c77a6e7c579a778fa84a18b6f4be0.svg\" alt=\"$1$\" data-tex=\"inline\"><\/math>, \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u2014 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ba\/d21\/a1f\/0bad21a1feb1341dc1267f2bceaaf5f6.svg\" alt=\"$R^2$\" data-tex=\"inline\"><\/math> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0438\u0437 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0432\u0435\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3f4\/2d8\/f22\/3f42d8f22b6f88a675db78830eafb6ae.svg\" alt=\"$ \\begin{aligned} \\text{Var}_{data} &amp;= \\frac{1}{N}\\sum_i (y_i-\\langle y \\rangle)^2, \\\\ \\text{Var}_{res} &amp;= \\frac{1}{N} \\sum_i (y_i-\\text{\u043c\u043e\u0434\u0435\u043b\u044c}(x_i))^2, \\\\ \\text{Var}_{reg} &amp;= \\frac{1}{N} \\sum_i (\\text{\u043c\u043e\u0434\u0435\u043b\u044c}(x_i)-\\langle y \\rangle)^2. \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d4\/930\/6d0\/1d49306d0889e4329ac9b3d0720e6d41.svg\" alt=\"$\\text{Var}_{data}$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0442\u043e\u0447\u0435\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/98f\/639\/4b2\/98f6394b2bd98b852bb0895b97d55e9f.svg\" alt=\"$y_i$\" data-tex=\"inline\"><\/math>).<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cdd\/768\/a5e\/cdd768a5e27284b6732b0d61e051f58c.svg\" alt=\"$\\text{Var}_{res}$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043e\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/98f\/639\/4b2\/98f6394b2bd98b852bb0895b97d55e9f.svg\" alt=\"$y_i$\" data-tex=\"inline\"><\/math> \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e.<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f6c\/fac\/554\/f6cfac55481cc02155ec2cc1836b5534.svg\" alt=\"$\\text{Var}_{reg}$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0442\u043e\u0447\u043a\u0430\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/42f\/173\/c29\/42f173c2992cf2826d484e0dac62fb74.svg\" alt=\"$x_i$\" data-tex=\"inline\"><\/math> (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d90\/094\/0b3\/d900940b3494a8582a0c0eb18a0884fa.svg\" alt=\"$\\langle y \\rangle$\" data-tex=\"inline\"><\/math>).<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cy\/sm\/hz\/cysmhz-caq0ju9rbe3bc_pwu90m.png\" width=\"800\"><\/div>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0443\u043c\u043c\u0443 \u0434\u0432\u0443\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439: \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 (\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5e0\/4d9\/93f\/5e04d993fd35e2ac385491d5015f6942.svg\" alt=\"$ \\boxed{{\\color{red}{\\text{Var}_{data}}} ={\\color{green}{\\text{Var}_{res}}}+ {\\color{blue}{\\text{Var}_{reg}}}.} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438\u043b\u0438  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6ce\/af0\/6b1\/6ceaf06b1b9f37be918156bca4a32a4a.svg\" alt=\"$ \\sigma^2_{data} =\\sigma^2_{res}+ \\sigma^2_{reg}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bu\/am\/-j\/buam-j8bkg6il4bpspcl6uy77co.png\" width=\"400\"><\/div>\n<p>  \u041c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0448\u0443\u043c\u043e\u043c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0438\u0448\u044c \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u2014 \u0445\u043e\u0442\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0435\u0440\u043d\u0430 \u043e\u0442 \u043f\u043b\u0435\u0432\u0435\u043b. \u041e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043b\u0443\u0447\u0448\u0435\u0439 \u0438\u0437 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ba\/d21\/a1f\/0bad21a1feb1341dc1267f2bceaaf5f6.svg\" alt=\"$R^2$\" data-tex=\"inline\"><\/math>, \u0440\u0430\u0432\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u043c\u0438\u043d\u0443\u0441 \u0434\u043e\u043b\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/0ed\/e2f\/e780ede2fa4fcaf376769a277c39317c.svg\" alt=\"$ R^2=\\frac{\\text{Var}_{data}-\\text{Var}_{res}}{\\text{Var}_{data}}=1-\\frac{\\color{green}{\\text{Var}_{res}}}{\\color{red}{\\text{Var}_{data}}} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438\u043b\u0438 \u0434\u043e\u043b\u0435 <i>\u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438<\/i> (\u0434\u043e\u043b\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/179\/0b7\/ebb\/1790b7ebb92346c139ab5690f90693aa.svg\" alt=\"$ R^2=\\frac{\\color{blue}{\\text{Var}_{reg}}}{\\color{red}{\\text{Var}_{data}}}. $\" data-tex=\"display\"><\/math><\/p>\n<p> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b81\/a7c\/1e9\/b81a7c1e9676b36cc02ddeea5d5f6e51.svg\" alt=\"$R$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0432\u0435\u043d \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u0443 \u0443\u0433\u043b\u0430 \u0432 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bfa\/93a\/c86\/bfa93ac861054ede0db19f4b88b63151.svg\" alt=\"$(\\sigma_{data}, \\sigma_{reg}, \\sigma_{res})$\" data-tex=\"inline\"><\/math>. \u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0432\u043e\u0434\u044f\u0442 <i>\u0434\u043e\u043b\u044e \u043d\u0435\u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438<\/i> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5ec\/c24\/538\/5ecc2453857634c3e774d74702476ff2.svg\" alt=\"$FUV=1-R^2$\" data-tex=\"inline\"><\/math> \u0438 \u043e\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0443 \u0441\u0438\u043d\u0443\u0441\u0430 \u0432 \u044d\u0442\u043e\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435. \u0415\u0441\u043b\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u043c\u0430\u043b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0432\u043e\u0432\u0441\u0435 \u0438 \u0442.\u043f.<br \/>  <a name=\"secProbability\"><\/a><\/p>\n<h3>\u0422\u0435\u043e\u0440\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439<\/h3>\n<p>  \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d62\/a16\/ddc\/d62a16ddc842b8866539b7f17e0fb67f.svg\" alt=\"$\\text{SSE}(a,b)$\" data-tex=\"inline\"><\/math> \u0438\u0437 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u043d\u043e \u043a \u043d\u0435\u0439 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f (\u041c\u041c\u041f). \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0435\u0433\u043e \u0441\u0443\u0442\u044c. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439). \u041c\u044b \u0437\u043d\u0430\u0435\u043c \u0432\u0438\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440. \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435), \u043d\u043e \u0445\u043e\u0442\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u0435 \u0432\u0445\u043e\u0434\u044f\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/36e\/4ef\/1ec36e4efef9e67482ea2b86700b82f2.svg\" alt=\"$\\mu$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/53a\/dd0\/bd253add01b6a626f79861899c5e7d73.svg\" alt=\"$\\sigma$\" data-tex=\"inline\"><\/math>). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u0434\u0430\u0442\u0430\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043c\u044b\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f) \u0438 \u043d\u0430\u0439\u0442\u0438 \u0435\u0451 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u2014 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0442\u043e\u0442 \u0436\u0435.<\/p>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0442\u043e\u0447\u043d\u043e, \u0430 \u0432 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0448\u0443\u043c (\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>\u0441\u043b\u0430\u0431\u043e\u0439 \u044d\u043a\u0437\u043e\u0433\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/i>). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 (\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438<\/i>) \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0448\u0443\u043c\u043e\u043c \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c (<i>\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0441\u0442\u0432\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/i>). \u0422\u043e\u0433\u0434\u0430  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/691\/0d9\/e4d\/6910d9e4d2e1a00289ee5c908b8d79b4.svg\" alt=\"$ y = a + bx + \\epsilon, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/69c\/557\/5e9\/69c5575e9b1b42051069fb6122976644.svg\" alt=\"$\\epsilon$\" data-tex=\"inline\"><\/math> \u2014 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b11\/60e\/830\/b1160e830f277d753fd24ae28da323c4.svg\" alt=\"$ \\epsilon \\sim \\mathcal{N}(0,\\,\\sigma^{2}), \\qquad p(\\epsilon) = \\frac{1}{\\sqrt{2 \\pi \\sigma^2}} e^{-\\frac{\\epsilon^2}{2\\sigma^2}}. $\" data-tex=\"display\"><\/math><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mw\/d1\/le\/mwd1le_ur5z3wmeybyxwsmg6kee.png\" width=\"350\"><\/div>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432\u044b\u0448\u0435, \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9fd\/b90\/91d\/9fdb9091df2089a1035f6d93c7ee7610.svg\" alt=\"$ \\begin{aligned} L(a,b|\\mathbf{y})&amp;=P(\\mathbf{y}|a,b)=\\prod_i P(y_i|a,b)=\\prod_i p(y_i-a-bx|a,b)=\\\\ &amp;= \\prod_i \\frac{1}{\\sqrt{2 \\pi \\sigma^2}} e^{-\\frac{(y_i-a-bx)^2}{2\\sigma^2}}= \\frac{1}{\\sqrt{2 \\pi \\sigma^2}}e^{-\\frac{\\sum_i (y_i-a-bx)^2}{2 \\sigma^2}}=\\\\ &amp;= \\frac{1}{\\sqrt{2 \\pi \\sigma^2}}e^{-\\frac{\\text{SSE}(a,b)}{2 \\sigma^2}} \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438 \u0435\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/962\/7f4\/c53\/9627f4c53c9c4fec726076ec3b0d8081.svg\" alt=\"$ l(a,b|\\mathbf{y})=\\log{L(a,b|\\mathbf{y})}=-\\text{SSE}(a,b)+const. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/793\/263\/38c\/79326338cc2e4768093d960f790e95b0.svg\" alt=\"$\\text{SSE}$\" data-tex=\"inline\"><\/math>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c83\/e5b\/556\/c83e5b5562d50f54acbaec7f9da50c35.svg\" alt=\"$ (\\hat{a},\\hat{b})=\\text{argmax}_{a,b} \\, l(a,b|\\mathbf{y}) = \\text{argmin}_{a,b} \\, \\text{SSE}(a,b), $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0435\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c. \u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/581\/6f2\/129\/5816f2129c52101019c32b82d9f1c348.svg\" alt=\"$ \\begin{aligned} \\epsilon \\sim \\text{Laplace}(0, \\alpha), \\qquad p_{L}(\\epsilon; \\mu, \\alpha) =\\frac{\\alpha}{2}e^{-\\alpha |\\epsilon-\\mu|} \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c LAD \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/434\/f06\/175434f06311c1dbb8797e20f9af2f0d.svg\" alt=\"$ E_{LAD}(a,b)=\\sum_i |y_i-a-bx_i|, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>  \u041f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u043b\u0430\u0431\u0438\u0442\u044c, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0441\u0442\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 (\u0433\u043e\u043c\u043e\u0441\u043a\u0435\u0434\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c) \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u041c\u041c\u041f \u044d\u0441\u0442\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 MMSE \u044d\u0441\u0442\u0438\u043c\u0430\u0446\u0438\u0435\u0439.<br \/>  <a name=\"secMultilinearRegression\"><\/a><\/p>\n<h2>\u041c\u0443\u043b\u044c\u0442\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>  \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math>, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440 \u2014 \u044d\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math>-\u043c\u0435\u0440\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/47c\/54f\/1eb\/47c54f1eb89e72755962717658585aa4.svg\" alt=\"$\\mathbf{x}$\" data-tex=\"inline\"><\/math>. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u0444\u0438\u0447, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044f \u0438\u0445 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7e7\/f6a\/bfc\/7e7f6abfc659c22769b2277142014895.svg\" alt=\"$n+1$\" data-tex=\"inline\"><\/math> \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u0444\u0438\u0447\u0430\u043c \u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u2014 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0430\u043d\u0442\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u2014 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20e\/aac\/86a\/20eaac86aa3413477bc48b346b3cfe4c.svg\" alt=\"$(1, x_1, \\cdots, x_n)$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d4c\/2e9\/ecc\/d4c2e9ecc4e633e17139fae6dc981db9.svg\" alt=\"$n = 1$\" data-tex=\"inline\"><\/math> \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043d\u0430\u043c \u0431\u0430\u0437\u0438\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1cb\/e01\/5d2\/1cbe015d2f65f261d3844c0565e55f26.svg\" alt=\"$(1, x)$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 (\u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432) <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ce\/f4b\/358\/1cef4b3586f379a0a644a1800281210f.svg\" alt=\"$\\mathbf{w}$\" data-tex=\"inline\"><\/math>, \u0447\u0442\u043e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c00\/682\/005\/c006820057b1d5fea2452cbecf43b999.svg\" alt=\"$ \\sum_{j=0}^n w_j x_j^{(i)}= \\mathbf{w}^{\\top}\\mathbf{x}^{(i)} \\simeq y_i, \\qquad \\qquad \\qquad \\qquad i=1\\dots N. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0417\u043d\u0430\u043a &quot;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0f3\/25b\/783\/0f325b7834d43163982e6e31833858ff.svg\" alt=\"$\\simeq$\" data-tex=\"inline\"><\/math>&quot; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0438\u0449\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff1\/183\/9f4\/ff11839f41a80b95dfade9e338509c0e.svg\" alt=\"$ \\hat{\\mathbf{w}}=\\text{argmin}_\\mathbf{w} \\, \\sum_{i=1}^N \\left({y_i - \\mathbf{w}^{\\top}\\mathbf{x}^{(i)}}\\right)^2 $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/52f\/b12\/5fe\/52fb125fe0d6b5658b8ffa589fb4fe00.svg\" alt=\"$\\mathbf{x}^{(i)}$\" data-tex=\"inline\"><\/math> \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043c\u0430\u0442\u0440\u0438\u0446\u044b (\u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6df\/692\/4e3\/6df6924e38dc79cd68367ef74ed3a5c9.svg\" alt=\"$ X= \\begin{pmatrix} - &amp; \\mathbf{x}^{(1)\\top} &amp; - \\\\ \\cdots &amp; \\cdots &amp; \\cdots\\\\ - &amp; \\mathbf{x}^{(N)\\top} &amp; - \\end{pmatrix} = \\begin{pmatrix} | &amp; | &amp; &amp; | \\\\ \\mathbf{x}_0 &amp; \\mathbf{x}_1 &amp; \\cdots &amp; \\mathbf{x}_n \\\\ | &amp; | &amp; &amp; | \\end{pmatrix} = \\begin{pmatrix} 1 &amp; x^{(1)}_{1} &amp; \\cdots &amp; x^{(1)}_{n} \\\\ \\cdots &amp; \\cdots &amp; \\cdots &amp; \\cdots\\\\ 1 &amp; x^{(N)}_{1} &amp; \\cdots &amp; x^{(N)}_{n} \\end{pmatrix}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fd7\/ff0\/2aa\/fd7ff02aae21ef4772f7763280d91ffd.svg\" alt=\"$\\mathbf{x}_{i}$\" data-tex=\"inline\"><\/math> \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0439 \u0444\u0438\u0447\u0438. \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (\u0444\u0438\u0447), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c. \u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c43\/a9b\/d14\/c43a9bd14a23447c4dd04161b9cf0ac9.svg\" alt=\"$ X \\, \\mathbf{w} \\simeq \\mathbf{y}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041a\u0432\u0430\u0434\u0440\u0430\u0442 \u043d\u043e\u0440\u043c\u044b \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0438 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u044f\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2c7\/991\/610\/2c7991610a0e03c63dcac55d278bf568.svg\" alt=\"$ \\text{SSE}(\\mathbf{w}) = {\\|\\mathbf{y}-X \\mathbf{w}\\|}^2, \\qquad \\qquad \\mathbf{w} \\in \\mathbb{R}^{n+1}; \\, \\mathbf{y} \\in \\mathbb{R}^{N}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/01d\/3d7\/81e\/01d3d781e6a1fa93cb9ba284d4933af3.svg\" alt=\"$ \\begin{aligned} \\hat{\\mathbf{w}}&amp;=\\text{argmin}_\\mathbf{w} \\, \\text{SSE}(\\mathbf{w}) = \\text{argmin}_\\mathbf{w} \\, (\\mathbf{y}-X \\mathbf{w})^{\\top}(\\mathbf{y}-X \\mathbf{w})=\\\\ &amp;= \\text{argmin}_\\mathbf{w} \\,(\\mathbf{y}^{\\top}\\mathbf{y}-2\\mathbf{w}^{\\top}X^{\\top}\\mathbf{y}+\\mathbf{w}^{\\top}X^{\\top}X\\mathbf{w}). \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ce\/f4b\/358\/1cef4b3586f379a0a644a1800281210f.svg\" alt=\"$\\mathbf{w}$\" data-tex=\"inline\"><\/math> (\u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u2014 \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/www.math.uwaterloo.ca\/~hwolkowi\/matrixcookbook.pdf\" rel=\"nofollow\">Matrix cookbook<\/a>)  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d5e\/6d0\/b86\/d5e6d0b86429a8456cdf819b9a624c2d.svg\" alt=\"$ \\frac{\\partial \\, \\text{SSE}(\\mathbf{w})}{\\partial \\mathbf{w}}=-2 X^{\\top}\\mathbf{y}+2 X^{\\top}X\\mathbf{w}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e \u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/22d\/721\/490\/22d721490f88eae369ca0ce370455d73.svg\" alt=\"$\\mathbf{0}$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442.\u043d. <i>\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/i>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a4e\/b70\/439\/a4eb70439f53d6f333bbf119d4143a56.svg\" alt=\"$ X^{\\top}X \\, \\hat{\\mathbf{w}}=X^{\\top}\\mathbf{y}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b (\u043d\u0435\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u0447), \u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/491\/584\/67f\/49158467fb0334dbd53a80b75bda19d0.svg\" alt=\"$X^{\\top}X$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e (\u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 <a href=\"https:\/\/www.khanacademy.org\/math\/linear-algebra\/matrix-transformations\/matrix-transpose\/v\/lin-alg-showing-that-a-transpose-x-a-is-invertible\" rel=\"nofollow\">\u0432\u0438\u0434\u0435\u043e \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0438 \u0425\u0430\u043d\u0430<\/a>). \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/23a\/e8f\/6cb\/23ae8f6cba3108a8fd39cd45a5e85570.svg\" alt=\"$ \\boxed{\\hat{\\mathbf{w}} = (X^{\\top}X)^{-1}X^{\\top}\\mathbf{y}=X^{+}\\mathbf{y}}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d5f\/2a9\/7ff\/d5f2a97ffdc2cdbc203ab89ad2e20bfd.svg\" alt=\"$ X^{+}=(X^{\\top}X)^{-1}X^{\\top} $\" data-tex=\"display\"><\/math><\/p>\n<p>  \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>. \u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0432\u0435\u0434\u0435\u043d\u043e \u0432 1903 \u0433\u043e\u0434\u0443 \u0424\u0440\u0435\u0434\u0433\u043e\u043b\u044c\u043c\u043e\u043c, \u043e\u043d\u0430 \u0441\u044b\u0433\u0440\u0430\u043b\u0430 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u041c\u0443\u0440\u0430 \u0438 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430. <\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/491\/584\/67f\/49158467fb0334dbd53a80b75bda19d0.svg\" alt=\"$X^{\\top}X$\" data-tex=\"inline\"><\/math> \u0438 \u043d\u0430\u0439\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4db\/fbf\/4f9\/4dbfbf4f994b7b15f3c7bcf66eccb4c4.svg\" alt=\"$X^{+}$\" data-tex=\"inline\"><\/math> \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u0431\u043b\u0438\u0437\u043a\u0438 \u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/06e\/bec\/ea3\/06ebecea3e495d4e736a3cf4bd617d04.svg\" alt=\"$(X^{\\top}X)^{-1}$\" data-tex=\"inline\"><\/math> \u0443\u0436\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c. \u0421\u0442\u0435\u043f\u0435\u043d\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> \u0438\u043b\u0438, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u044f\u0442, <i>\u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043b\u0438\u043d\u0435\u0430\u0440\u043d\u043e\u0441\u0442\u0438<\/i> \u043c\u0430\u0442\u0440\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/491\/584\/67f\/49158467fb0334dbd53a80b75bda19d0.svg\" alt=\"$X^{\\top}X$\" data-tex=\"inline\"><\/math>, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2014 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443. \u0427\u0435\u043c \u043e\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0431\u043b\u0438\u0436\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/491\/584\/67f\/49158467fb0334dbd53a80b75bda19d0.svg\" alt=\"$X^{\\top}X$\" data-tex=\"inline\"><\/math> \u043a \u0432\u044b\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u043e\u0439 \u0438 \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439.<br \/>  <a name=\"secLinearAlgebra\"><\/a><\/p>\n<h3>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430<\/h3>\n<p>  \u041a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438, \u0432\u0435\u0434\u044c \u0434\u0430\u0436\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0440\u043c\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0443\u0436\u0435 \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u0437\u0430\u0434\u0430\u0447\u0438 \u0435\u0441\u0442\u044c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430. \u041c\u044b \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u0430\u0439\u0442\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c43\/a9b\/d14\/c43a9bd14a23447c4dd04161b9cf0ac9.svg\" alt=\"$ X \\, \\mathbf{w} \\simeq \\mathbf{y}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b, \u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0439, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0443\u0447\u0448\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ce\/f4b\/358\/1cef4b3586f379a0a644a1800281210f.svg\" alt=\"$\\mathbf{w}$\" data-tex=\"inline\"><\/math>, \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f5d\/5b5\/cd3\/f5d5b5cd3279d4e3c579912a809626a3.svg\" alt=\"$X\\mathbf{w}$\" data-tex=\"inline\"><\/math> \u0431\u043b\u0438\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2d8\/ae8\/00a\/2d8ae800a005c3174c330be15e097f32.svg\" alt=\"$\\mathbf{y}$\" data-tex=\"inline\"><\/math>. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u043b\u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ed6\/f27\/bbc\/ed6f27bbcd43ab17eb44ef3c79158de7.svg\" alt=\"$\\mathcal{C}(X)$\" data-tex=\"inline\"><\/math> \u2014 \u044d\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440-\u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f5e\/f71\/283\/f5ef7128326c66e5a8d5d572d1db9995.svg\" alt=\"$ \\begin{pmatrix} | &amp; | &amp; &amp; | \\\\ \\mathbf{x}_0 &amp; \\mathbf{x}_1 &amp; \\cdots &amp; \\mathbf{x}_n \\\\ | &amp; | &amp; &amp; | \\end{pmatrix} \\mathbf{w} = w_0 \\mathbf{x}_0 + w_1 \\mathbf{x}_1 + \\cdots w_n \\mathbf{x}_n . $\" data-tex=\"display\"><\/math><\/p>\n<p> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ed6\/f27\/bbc\/ed6f27bbcd43ab17eb44ef3c79158de7.svg\" alt=\"$\\mathcal{C}(X)$\" data-tex=\"inline\"><\/math> \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7e7\/f6a\/bfc\/7e7f6abfc659c22769b2277142014895.svg\" alt=\"$n+1$\" data-tex=\"inline\"><\/math>-\u043c\u0435\u0440\u043d\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e (\u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0438\u0447\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438), \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0432\u0435\u043a\u0442\u043e\u0440-\u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>. \u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2d8\/ae8\/00a\/2d8ae800a005c3174c330be15e097f32.svg\" alt=\"$\\mathbf{y}$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ed6\/f27\/bbc\/ed6f27bbcd43ab17eb44ef3c79158de7.svg\" alt=\"$\\mathcal{C}(X)$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u043d\u0435\u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ed6\/f27\/bbc\/ed6f27bbcd43ab17eb44ef3c79158de7.svg\" alt=\"$\\mathcal{C}(X)$\" data-tex=\"inline\"><\/math> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0438\u043c \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0435, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438 \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u0437 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/360\/3e4\/5e4\/3603e45e434f8a55101ed7c137231bef.svg\" alt=\"$\\mathbb{R}^{N}$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0436\u0438\u0432\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0412\u0442\u043e\u0440\u043e\u0435, \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u043d\u0430\u043c \u044d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c). \u041f\u0443\u0441\u043a\u0430\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f8c\/f04\/5b6\/f8cf045b6a54b285dedba351e11de439.svg\" alt=\"$\\mathbf{v} \\in \\mathbb{R}^{N}$\" data-tex=\"inline\"><\/math>, \u0442\u043e\u0433\u0434\u0430  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7b3\/231\/d8e\/7b3231d8ef756cc144b864a24a64a7b0.svg\" alt=\"$ X^\\top \\mathbf{v} = \\begin{pmatrix} - &amp; \\mathbf{x}_0^{\\top} &amp; - \\\\ \\cdots &amp; \\cdots &amp; \\cdots\\\\ - &amp; \\mathbf{x}_n^{\\top} &amp; - \\end{pmatrix} \\mathbf{v} = \\begin{pmatrix} \\mathbf{x}_0^{\\top} \\cdot \\mathbf{v} \\\\ \\cdots \\\\ \\mathbf{x}_n^{\\top} \\cdot \\mathbf{v} \\\\ \\end{pmatrix} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e \u0432 \u0442\u043e\u043c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2c4\/b0b\/1fa\/2c4b0b1facb860c5dd334b06a87de9d0.svg\" alt=\"$\\mathbf{v}$\" data-tex=\"inline\"><\/math> \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0435\u043d \u0432\u0441\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fd7\/ff0\/2aa\/fd7ff02aae21ef4772f7763280d91ffd.svg\" alt=\"$\\mathbf{x}_i$\" data-tex=\"inline\"><\/math>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u0446\u0435\u043b\u043e\u043c\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ed6\/f27\/bbc\/ed6f27bbcd43ab17eb44ef3c79158de7.svg\" alt=\"$\\mathcal{C}(X)$\" data-tex=\"inline\"><\/math>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0434\u0432\u0430 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0431\u0435\u0437 \u0434\u044b\u0440, \u00ab\u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u00bb \u0432\u0441\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/360\/3e4\/5e4\/3603e45e434f8a55101ed7c137231bef.svg\" alt=\"$\\mathbb{R}^N$\" data-tex=\"inline\"><\/math>. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0443\u043c\u043c\u044b <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5i\/k_\/_r\/5ik__r7wqskixxwfe6hiqyb6pkw.png\" width=\"190\"><\/div>\n<p>  \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bdb\/041\/828\/bdb041828babfec06940f2be5fb6c4cb.svg\" alt=\"$\\text{ker}(X^{\\top})=\\{\\mathbf{v}|X^{\\top}\\mathbf{v}=\\mathbf{0}\\}$\" data-tex=\"inline\"><\/math>. \u0412 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o6\/en\/rl\/o6enrlyxw4uwoa9g-s-xacnwwn8.png\" width=\"300\"><\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2d8\/ae8\/00a\/2d8ae800a005c3174c330be15e097f32.svg\" alt=\"$\\mathbf{y}$\" data-tex=\"inline\"><\/math> \u0432 \u0432\u0438\u0434\u0435 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a8f\/707\/a77\/a8f707a7735ab47627f05585a939bc82.svg\" alt=\"$ \\mathbf{y} = \\mathbf{y}_{\\text{proj}} + \\mathbf{y}_{\\perp}, \\qquad \\mathbf{y}_{\\text{proj}} \\in \\mathcal{C}(X), \\qquad \\mathbf{y}_{\\perp} \\in \\text{ker}(X^{\\top}). $\" data-tex=\"display\"><\/math><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ip\/ax\/uz\/ipaxuz3a3js1tuy7oj2gmku5s2q.png\" width=\"400\"><\/div>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0449\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1a3\/cac\/e53\/1a3cace534c66a9dd3ce8e4ab5699ff9.svg\" alt=\"$\\hat{\\mathbf{w}}$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/55c\/283\/f9c\/55c283f9c0646ad244c0b033824db395.svg\" alt=\"$|| \\mathbf{y} - X\\mathbf{w} ||$\" data-tex=\"inline\"><\/math> \u0431\u044b\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430-\u043e\u0441\u0442\u0430\u0442\u043a\u0430. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438 \u0442\u0435\u043e\u0440\u0435\u043c\u0443 \u041f\u0438\u0444\u0430\u0433\u043e\u0440\u0430  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cde\/9fd\/687\/cde9fd6878f1214bf624fa49c7045070.svg\" alt=\"$ \\text{argmin}_\\mathbf{w} || \\mathbf{y} - X\\mathbf{w} || = \\text{argmin}_\\mathbf{w} || \\mathbf{y}_{\\perp} + \\mathbf{y}_{\\text{proj}} - X\\mathbf{w} || = \\text{argmin}_\\mathbf{w} \\sqrt{|| \\mathbf{y}_{\\perp} ||^2 + || \\mathbf{y}_{\\text{proj}} - X\\mathbf{w} ||^2}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0432\u044b\u0431\u0440\u0430\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ce\/f4b\/358\/1cef4b3586f379a0a644a1800281210f.svg\" alt=\"$\\mathbf{w}$\" data-tex=\"inline\"><\/math>, \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0fb\/945\/d8c\/0fb945d8c5bd39905c20aba51221caac.svg\" alt=\"$ X\\hat{\\mathbf{w}} = \\mathbf{y}_{\\text{proj}}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2be\/ad0\/de8\/2bead0de8b4f9089b878c4494280e13d.svg\" alt=\"$\\mathbf{y}_{\\perp}$\" data-tex=\"inline\"><\/math> \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u041b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1a3\/cac\/e53\/1a3cace534c66a9dd3ce8e4ab5699ff9.svg\" alt=\"$\\hat{\\mathbf{w}}$\" data-tex=\"inline\"><\/math> \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sv\/ir\/b5\/svirb5a4p6qr-bumlssczfw2ioy.png\" width=\"400\"><\/div>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dcd\/30d\/ced\/dcd30dcedc40994685a04a7e63eda0d5.svg\" alt=\"$X^{\\top} \\mathbf{y}_{\\perp} = \\mathbf{0}$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0434\u0435\u0442\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb2\/4d4\/2f1\/cb24d42f17e1b9eba3a809fe1fc5735e.svg\" alt=\"$ X^\\top X \\mathbf{w} = X^{\\top} \\mathbf{y}_{\\text{proj}} = X^{\\top} \\mathbf{y}_{\\text{proj}} + X^{\\top} \\mathbf{y}_{\\perp} = X^{\\top} \\mathbf{y}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e8\/ee9\/000\/6e8ee90003465da6b161871f7da22bf0.svg\" alt=\"$\\mathbf{y}_{\\text{proj}}$\" data-tex=\"inline\"><\/math> \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442, \u0430 \u0432\u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2d8\/ae8\/00a\/2d8ae800a005c3174c330be15e097f32.svg\" alt=\"$\\mathbf{y}$\" data-tex=\"inline\"><\/math> \u2014 \u0435\u0441\u0442\u044c. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/491\/584\/67f\/49158467fb0334dbd53a80b75bda19d0.svg\" alt=\"$X^{\\top} X$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c0b\/843\/778\/c0b8437783a41b26cae41d2b2885c551.svg\" alt=\"$ \\mathbf{w} = (X^\\top X)^{-1} X^\\top \\mathbf{y} = X^{+} \\mathbf{y}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4db\/fbf\/4f9\/4dbfbf4f994b7b15f3c7bcf66eccb4c4.svg\" alt=\"$X^{+}$\" data-tex=\"inline\"><\/math> \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0430\u044f \u043d\u0430\u043c \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e8\/ee9\/000\/6e8ee90003465da6b161871f7da22bf0.svg\" alt=\"$\\mathbf{y}_{\\text{proj}}$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/226\/6df\/fc1\/2266dffc15d7949ce23cb4d0aecf4a0c.svg\" alt=\"$ \\mathbf{y}_{\\text{proj}} = X \\mathbf{w} = X X^{+} \\mathbf{y} = \\text{Proj}_X \\mathbf{y}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/514\/ff9\/87b\/514ff987b7adad79d87d5233d6862ad8.svg\" alt=\"$\\text{Proj}_X$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0412\u044b\u044f\u0441\u043d\u0438\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ik\/a8\/38\/ika838b9x-bzyna7m6m8skoakfi.png\" width=\"400\"><\/div>\n<p>\u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u0444\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fe4\/e6f\/909\/fe4e6f909696b51bb70984a8ef205bb2.svg\" alt=\"$\\bar{y} \\cdot \\boldsymbol{1}=\\bar{y} \\cdot (1,1,\\dots,1)^{\\top}$\" data-tex=\"inline\"><\/math> \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u0438\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u0431\u043e\u0440\u0443 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0412 RGB \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/88d\/446\/9f6\/88d4469f64e6dbbaeb8dc40782050932.svg\" alt=\"$ {\\color{red}{\\mathbf{y}-\\hat{y} \\cdot \\boldsymbol{1}}}={\\color{green}{\\mathbf{y}-\\bar{\\mathbf{y}}}}+{\\color{blue}{\\hat{\\mathbf{y}}-\\bar{y} \\cdot \\boldsymbol{1}}}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439, \u0442\u043e \u043f\u043e \u0442\u0435\u043e\u0440\u0435\u043c\u0435 \u041f\u0438\u0444\u0430\u0433\u043e\u0440\u0430  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fc1\/c0d\/795\/fc1c0d795b8d6583df27ee37cf32fb24.svg\" alt=\"$ {\\color{red}{\\|\\mathbf{y}-\\hat{y} \\cdot \\boldsymbol{1}\\|^2}}={\\color{green}{\\|\\mathbf{y}-\\bar{\\mathbf{y}}\\|^2}}+{\\color{blue}{\\|\\hat{\\mathbf{y}}-\\bar{y} \\cdot \\boldsymbol{1}\\|^2}}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u042d\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0444\u0430\u043a\u0442\u0430, \u0447\u0442\u043e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fe9\/888\/8f9\/fe98888f99c5d81110bca3d41435f71c.svg\" alt=\"$ {\\color{red}{\\text{Var}_{data}}} = {\\color{green}{\\text{Var}_{res}}}+{\\color{blue}{\\text{Var}_{reg}}}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4dd\/a7f\/e68\/4dda7fe68c07bd7918507375f3819a2e.svg\" alt=\"$ R^2=\\frac{\\color{blue}{\\text{Var}_{reg}}}{\\color{red}{\\text{Var}_{data}}}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0430 \u0437\u043d\u0430\u0447\u0438\u0442   <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ca8\/552\/b9d\/ca8552b9ddff08e5147b75ef16163a18.svg\" alt=\"$ R=\\cos{\\theta}. $\" data-tex=\"display\"><\/math><\/p>\n<p>\u041a\u0440\u0430\u0441\u0438\u0432\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<br \/>  <a name=\"secArbitraryBasis\"><\/a><\/p>\n<h2>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u0438\u0441<\/h2>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/59f\/d00\/32b\/59fd0032b90ff1d4822973df693a5ff6.svg\" alt=\"$f_i$\" data-tex=\"inline\"><\/math> \u0438 \u0435\u0451 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c12\/690\/fe4\/c12690fe4e177966a44d9e7dc57fad2d.svg\" alt=\"$ f = \\sum_i w_i f_i, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u043d\u043e \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/59f\/d00\/32b\/59fd0032b90ff1d4822973df693a5ff6.svg\" alt=\"$f_i$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0443 \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u043b\u0438 \u0438\u0445 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/246\/7e3\/2bc\/2467e32bc8b0076d39d2b7cfeaa7f7b1.svg\" alt=\"$f_0(\\mathbf{x}) = 1$\" data-tex=\"inline\"><\/math>. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438 \u0432\u0438\u0434 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/59f\/d00\/32b\/59fd0032b90ff1d4822973df693a5ff6.svg\" alt=\"$f_i$\" data-tex=\"inline\"><\/math>, \u043d\u0438 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u2014 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0431\u0430\u0437\u0438\u0441\u0435 \u0431\u044b\u043b\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b. \u041e\u0431\u044b\u0447\u043d\u043e, \u0432\u044b\u0431\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e \u043f\u0440\u0438\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d43\/0a7\/77c\/d430a777cb4172006522cfb402cfa4a6.svg\" alt=\"$\\{(x_1,y_1),\\cdots,(x_N,y_N)\\}$\" data-tex=\"inline\"><\/math> \u043b\u043e\u0436\u0430\u0442\u0441\u044f \u043d\u0430 \u043f\u0430\u0440\u0430\u0431\u043e\u043b\u0443, \u0430 \u043d\u0435 \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0437\u0438\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/67a\/a94\/43d\/67aa9443d26721af93dbc47e8891805e.svg\" alt=\"$(1, x, x^2)$\" data-tex=\"inline\"><\/math>. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043c\u0435\u043d\u044c\u0448\u0438\u043c, \u0442\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c, \u0447\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0438\u0447.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0433\u0438\u0444\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0432 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u0430\u0437\u0438\u0441\u0435. \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 scikit-learn \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0441\u043d\u0438\u0437\u0443 \u2014 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pw\/no\/gf\/pwnogfxouzaslryuzxrrzy9iga8.gif\"><br \/>  \u041c\u043e\u0436\u043d\u043e <a href=\"https:\/\/colab.research.google.com\/github\/fbeilstein\/machine_learning\/blob\/master\/lecture_09_linear_regression.ipynb#scrollTo=bpnbCDkSw5I6\" rel=\"nofollow\">\u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0432 GoogleColab<\/a>.<br \/>  \u041c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e <a href=\"https:\/\/github.com\/fbeilstein\/machine_learning\" rel=\"nofollow\">\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435 \u043d\u0430 GitHub<\/a>  <\/div>\n<\/p><\/div>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0441 \u0431\u0430\u0437\u0438\u0441\u043e\u043c, \u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/799\/6c6\/bcd\/7996c6bcd56b1ccfce42701eb963a3ba.svg\" alt=\"$ \\Phi = \\begin{pmatrix} - &amp; \\boldsymbol{f}^{(1)\\top} &amp; - \\\\ \\cdots &amp; \\cdots &amp; \\cdots\\\\ - &amp; \\boldsymbol{f}^{(N)\\top} &amp; - \\end{pmatrix} = \\begin{pmatrix} {f}_{0}\\left(\\mathbf{x}^{(1)}\\right) &amp; {f}_{1}\\left(\\mathbf{x}^{(1)}\\right) &amp; \\cdots &amp; {f}_{n}\\left(\\mathbf{x}^{(1)}\\right) \\\\ \\cdots &amp; \\cdots &amp; \\cdots &amp; \\cdots\\\\ {f}_{0}\\left(\\mathbf{x}^{(1)}\\right) &amp; {f}_{1}\\left(\\mathbf{x}^{(N)}\\right) &amp; \\cdots &amp; {f}_{n}\\left(\\mathbf{x}^{(N)}\\right) \\end{pmatrix}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3f0\/f33\/464\/3f0f33464773df9dd0f4a9752191f238.svg\" alt=\"$ E(\\mathbf{w})={\\|{\\boldsymbol{\\epsilon}}(\\mathbf{w})\\|}^2={\\|\\mathbf{y}-\\Phi \\, \\mathbf{w}\\|}^2 $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0435\u0451 \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b3b\/fc5\/f45\/b3bfc5f45acfd6dae7a1ce90154955d2.svg\" alt=\"$ \\hat{\\mathbf{w}} = \\text{argmin}_\\mathbf{w} \\,E(\\mathbf{w}) = (\\Phi^{\\top}\\Phi)^{-1}\\Phi^{\\top}\\mathbf{y}=\\Phi^{+}\\mathbf{y}, $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<br \/>  <a name=\"secConclusions\"><\/a><br \/>  <a name=\"secDimensionality\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043a\u0430\u043a\u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0440\u044b\u0432 \u00ab\u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435\u00bb \u043c\u043e\u0436\u0435\u0442 \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u0437\u043b\u0443\u044e \u0448\u0443\u0442\u043a\u0443: \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u0448\u0443\u043c\u0430\u043c \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435). \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u043b\u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0433\u0440\u0443\u0431\u043e\u0439 (\u043d\u0435\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435).<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041f\u0435\u0440\u0432\u044b\u0439: \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u0418\u043b\u0438 \u0436\u0435 \u0432\u0442\u043e\u0440\u043e\u0439: \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\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, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ba\/d21\/a1f\/0bad21a1feb1341dc1267f2bceaaf5f6.svg\" alt=\"$R^2$\" data-tex=\"inline\"><\/math> \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437\u0438\u0441\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0432\u043e\u0434\u044f\u0442 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ae\/5ae\/942\/0ae5ae9423589805037259c2308f8051.svg\" alt=\"$ \\bar{R}^2=1-(1-R^2)\\left[\\frac{N-1}{N-(n+1)}\\right], $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0421\u043b\u0435\u0434\u044f \u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/85d\/646\/c1c\/85d646c1cf6031b4027d91fdf9538d41.svg\" alt=\"$\\bar{R}^2$\" data-tex=\"inline\"><\/math>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u044b.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u2014 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u0430\u043c\u044b\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 Ridge(<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/782\/388\/103\/78238810332579c8c3605568fa05dc6c.svg\" alt=\"$L_2$\" data-tex=\"inline\"><\/math>\/\u0433\u0440\u0435\u0431\u043d\u0435\u0432\u0430\u044f\/\u0422\u0438\u0445\u043e\u043d\u043e\u0432\u0441\u043a\u0430\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044f), Lasso(<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3f7\/712\/43c\/3f771243c6e4e2826f3071100c3a50fc.svg\" alt=\"$L_1$\" data-tex=\"inline\"><\/math> \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044f) \u0438 Elastic Net(Ridge+Lasso). \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432: \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ce\/f4b\/358\/1cef4b3586f379a0a644a1800281210f.svg\" alt=\"$\\mathbf{w}$\" data-tex=\"inline\"><\/math> \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0438 \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0432\u043e\u0441\u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b2f\/347\/587\/b2f3475870d70a6f4eae4eba5cac7ea9.svg\" alt=\"$ \\begin{aligned} E_{\\text{Ridge}}(\\mathbf{w})&amp;=\\text{SSE}(\\mathbf{w})+\\alpha \\sum_i |w_i|^2 = \\text{SSE}(\\mathbf{w})+\\alpha \\| \\mathbf{w}\\|_{L_2}^2,\\\\ E_{Lasso}(\\mathbf{w})&amp;=\\text{SSE}(\\mathbf{w})+\\beta \\sum_i |w_i| =\\text{SSE}(\\mathbf{w})+\\beta \\| \\mathbf{w}\\|_{L_1}, \\\\ E_{EN}(\\mathbf{w})&amp;=\\text{SSE}(\\mathbf{w})+\\alpha \\| \\mathbf{w}\\|_{L_2}^2+\\beta \\| \\mathbf{w}\\|_{L_1}. \\\\ \\end{aligned} $\" data-tex=\"display\"><\/math><\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/4a5\/2ba\/7234a52ba041cdb09b9328a047048fb2.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7fd\/b73\/0d9\/7fdb730d916a98c0ad71826e0bc706bf.svg\" alt=\"$\\beta$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u00ab\u0441\u0438\u043b\u0443\u00bb \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f. \u0423\u043f\u043e\u043c\u044f\u043d\u0443 \u043a\u0441\u0442\u0430\u0442\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c Ridge \u0438 Lasso \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0443\u0434\u0430\u0447\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0432 \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/302\/c72\/04e\/302c7204ea9987e698a70307646abd71.svg\" alt=\"$b$\" data-tex=\"inline\"><\/math>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4ea\/f69\/538\/4eaf69538e04a4f92ba29e24aa52089e.svg\" alt=\"$ y = a + bx + \\epsilon,\\qquad \\epsilon \\sim \\mathcal{N}(0,\\,\\sigma^{2}),\\qquad \\left\\{\\begin{aligned} &amp;b \\sim \\mathcal{N}(0,\\,\\tau^{2})&amp;\\leftarrow\\text{Ridge},\\\\ &amp;b \\sim \\text{Laplace} (0,\\,\\tau^{2})&amp;\\leftarrow\\text{Lasso}. \\end{aligned}\\right. $\" data-tex=\"display\"><\/math><\/p>\n<p>  <a name=\"secNumeric\"><\/a><\/p>\n<h3>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/h3>\n<p>  \u0421\u043a\u0430\u0436\u0443 \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. SSE \u2014 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u043a\u043e\u0440\u0435\u0439\u0448\u0435\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Lasso \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 scikit-learn \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 scikit-learn \u0434\u043b\u044f \u041c\u041d\u041a \u2014 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043d\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0437\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u044b, \u0437\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u0443\u0440\u0441\u0443 \u043b\u0435\u043a\u0446\u0438\u0439 \u041a.\u0412.\u0412\u043e\u0440\u043e\u043d\u0446\u043e\u0432\u0430.<br \/>  <a name=\"secAdv\"><\/a><\/p>\n<h2>\u0420\u0435\u043a\u043b\u0430\u043c\u0430 \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u043b\u0430\u0432 \u043a\u0443\u0440\u0441\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 <a href=\"https:\/\/kau.org.ua\/education\/vstup\/master\" rel=\"nofollow\">\u041a\u0438\u0435\u0432\u0441\u043a\u043e\u043c \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435<\/a> (\u043f\u0440\u0435\u0435\u043c\u043d\u0438\u043a \u041a\u0438\u0435\u0432\u0441\u043a\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0444\u0438\u0437\u0438\u043a\u043e-\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430, \u041a\u041e \u041c\u0424\u0422\u0418). \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u043b \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0443\u0440\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Google Colab, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 LaTeX, \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 Python \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 Python+JavaScript, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u043a\u0443\u0440\u0441\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u041d\u0430 <a href=\"https:\/\/github.com\/fbeilstein\/machine_learning\" rel=\"nofollow\">\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u044b, \u00ab\u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0442\u0435\u0442\u0440\u0430\u0434\u0438\u00bb \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0412 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u0443\u0440\u0441\u0430 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b:  <\/p>\n<ul>\n<li> \u0432\u0441\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0430\u0440\u044b; <\/li>\n<li> \u043b\u0435\u043a\u0446\u0438\u044f \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u044b \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b, \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0438\u0445 \u043f\u0438\u0441\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f); <\/li>\n<li> \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043b\u0435\u043a\u0446\u0438\u044f (\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0432 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0431\u044b\u043b\u043e \u043e\u0437\u0432\u0443\u0447\u0435\u043d\u043e \u043d\u0430 \u043b\u0435\u043a\u0446\u0438\u0438, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0443\u0447\u0435\u0431\u043d\u0438\u043a); <\/li>\n<li> \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c (\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0444\u043e\u0442\u043e, \u0434\u0435\u043c\u043a\u0438, \u0433\u0438\u0444\u043a\u0438, \u043a\u043e\u0434, \u0432\u0438\u0434\u0435\u043e \u0441 youtube). <\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/fbeilstein\/machine_learning\" rel=\"nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u043a\u0443\u0440\u0441\u0430 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0412\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p><\/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\/514818\/\"> https:\/\/habr.com\/ru\/post\/514818\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/514818\/\">\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0426\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0438 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439. \u0425\u043e\u0442\u044f \u0432 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u0445 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435, \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043d\u0430\u0443\u0447\u043d\u043e-\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442.<\/p>\n<p>  <b>! \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0442\u0440\u0430\u0444\u0438\u043a!<\/b> \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0439, \u0447\u0430\u0441\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 gif.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-308401","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308401","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=308401"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308401\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}