{"id":295901,"date":"2019-12-17T16:31:06","date_gmt":"2019-12-17T16:31:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=295901"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=295901","title":{"rendered":"\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/479398\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ph\/2w\/sx\/ph2wsxp-gimiwdrfn2j2sr8b3ky.jpeg\"><\/p>\n<p>  \u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0430\u0439\u043d\u0442\u0438\u0441\u0442\u0430\u043c. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/474602\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0442\u0440\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a. \u0422\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^T X \\vec{w} = X^T \\vec{y}$\" data-tex=\"inline\"><\/math>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043c\u044b \u043e\u0431\u043e\u0441\u043d\u0443\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c. <\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^T X \\vec{w} = X^T \\vec{y}$\" data-tex=\"inline\"><\/math>? <\/p>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0430, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043a\u0443\u0440\u0441\u0430\u0445 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043e\u0442 \u042f\u043d\u0434\u0435\u043a\u0441\u0430, \u043a\u043e\u0433\u0434\u0430 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442 \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>sklearn<\/i>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438 \u0441\u043b\u043e\u0432\u0430 \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0410 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u0434\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u043a\u0430\u043a \u0440\u0430\u0437, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u043e\u0432\u043b\u0430\u0434\u0435\u0442\u044c \u0442\u0430\u043a\u0438\u043c\u0438 \u0443\u043c\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h2>\n<p>  <\/p>\n<h3>\u0426\u0435\u043b\u0435\u0432\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>  \u0423 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0446\u0435\u043d\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0430\u043a\u0442\u0438\u0432: \u043d\u0435\u0444\u0442\u044c, \u0437\u043e\u043b\u043e\u0442\u043e, \u043f\u0448\u0435\u043d\u0438\u0446\u0430, \u0434\u043e\u043b\u043b\u0430\u0440 \u0438 \u0442.\u0434. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u0434 \u0440\u044f\u0434\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0438\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u043d\u0430 \u043d\u0435\u0444\u0442\u044c \u0437\u0430 \u0433\u043e\u0434, \u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 12 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u0447\u043d\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/98f\/639\/4b2\/98f6394b2bd98b852bb0895b97d55e9f.svg\" alt=\"$y_i$\" data-tex=\"inline\"><\/math>. \u0412\u0441\u0435\u0433\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c46\/36a\/9af\/c4636a9af31aad165361df5d0fcad70e.svg\" alt=\"$y_1, y_2, y_3 ... y_n$\" data-tex=\"inline\"><\/math>.<\/p>\n<h3>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u044b<\/h3>\n<p>  \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043a\u0443\u0440\u0441 \u043f\u0430\u0440\u044b \u0434\u043e\u043b\u043b\u0430\u0440\/\u0440\u0443\u0431\u043b\u044c \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0446\u0435\u043d\u0430 \u043d\u0430 \u043d\u0435\u0444\u0442\u044c, \u0441\u0442\u0430\u0432\u043a\u0430 \u0424\u0420\u0421 \u0438 \u0434\u0440. \u0422\u0430\u043a\u0438\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430\u043c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 12 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 \u0432 2018 \u0433\u043e\u0434\u0443, \u0442\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 12 \u0437\u0430 \u0442\u043e\u0442 \u0436\u0435 \u043f\u0435\u0440\u0438\u043e\u0434. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/858\/fba\/dd7\/858fbadd70cf051ce77ae05f74838f8e.svg\" alt=\"$x_i: x_1, x_2, x_3 ... x_n$\" data-tex=\"inline\"><\/math>. \u041f\u0443\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (\u0442.\u0435. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f). \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0448\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0434\u043b\u044f 1-\u0433\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043d\u0430 \u043d\u0430 \u043d\u0435\u0444\u0442\u044c): <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ae4\/78b\/461\/ae478b461fda55e9819ede875c84c1d9.svg\" alt=\"$x_{11}, x_{12}, x_{13} ... x_{1n}$\" data-tex=\"inline\"><\/math>, \u0434\u043b\u044f 2-\u0433\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0432\u043a\u0430 \u0424\u0420\u0421): <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/159\/4b7\/19a\/1594b719a230dd55a36074e5a1c74bd8.svg\" alt=\"$x_{21}, x_{22}, x_{23} ... x_{2n}$\" data-tex=\"inline\"><\/math>, \u0434\u043b\u044f &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d03\/3a3\/709\/d033a3709ba30a59698e72d48ad1948b.svg\" alt=\"$x_{k1}, x_{k2}, x_{k3} ... x_{kn}$\" data-tex=\"inline\"><\/math><\/p>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/98f\/639\/4b2\/98f6394b2bd98b852bb0895b97d55e9f.svg\" alt=\"$y_i$\" data-tex=\"inline\"><\/math> \u043e\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432\u0438\u0434\u0430:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f2f\/973\/468\/f2f973468e8a2719d9bcf6e1e42939f1.svg\" alt=\"$ f(w,x_i) = w_0 + w_1 x_{1i} + ... + w_k x_{ki} $\" data-tex=\"display\"><\/math><\/p>\n<p>  , \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/42f\/173\/c29\/42f173c2992cf2826d484e0dac62fb74.svg\" alt=\"$x_i$\" data-tex=\"inline\"><\/math> \u2014 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0435&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 \u043e\u0442 1 \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math>,<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043e\u0442 1 \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d0\/034\/a09\/1d0034a09108db7af7cf42ea23a91ecd.svg\" alt=\"$w$\" data-tex=\"inline\"><\/math> \u2014 \u0443\u0433\u043b\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430. <\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9f\/764\/ab0\/f9f764ab001c8a8b74efe64ad3ca8ead.svg\" alt=\"$w_0$\" data-tex=\"inline\"><\/math>) \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u00ab\u0441\u0432\u043e\u0439\u00bb \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d0\/034\/a09\/1d0034a09108db7af7cf42ea23a91ecd.svg\" alt=\"$w$\" data-tex=\"inline\"><\/math>, \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u043a\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d0\/034\/a09\/1d0034a09108db7af7cf42ea23a91ecd.svg\" alt=\"$w$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0430\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4a9\/d9b\/7c3\/4a9d9b7c3a796b664147c4267469a945.svg\" alt=\"$f(w,x_i)$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h3>\u041e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u043c\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>  \u0411\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/029\/8f3\/e2a\/0298f3e2adf8038a161d2edac8d92516.svg\" alt=\"$Err= \\sum\\limits_{i=1}^n(y_i-f(x_i))^2 \\rightarrow min$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 $w$, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/726\/83e\/564\/72683e5647546a86fe168b81c9a5dde5.svg\" alt=\"$Err$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c.<\/p>\n<h2>\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434<\/h2>\n<p>  <\/p>\n<h3>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9f\/764\/ab0\/f9f764ab001c8a8b74efe64ad3ca8ead.svg\" alt=\"$w_0$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434, \u0432\u044b\u0448\u0435\u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u0447\u0435\u0442\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9f\/764\/ab0\/f9f764ab001c8a8b74efe64ad3ca8ead.svg\" alt=\"$w_0$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0435. \u0412\u0435\u0440\u043d\u0435\u0435, \u043a\u0430\u0436\u0434\u043e\u0435 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0435&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u2014 \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0443 \u043d\u0430\u0441 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u0430 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u044f\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u043c\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0435&#187; \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435. \u0422\u043e\u0433\u0434\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u043e\u0432 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u043e\u0433\u043e&#187; \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/56e\/eed\/e6f\/56eeede6f51c99ebb670f2a8220c9caa.svg\" alt=\"$\\vec{x_i}$\" data-tex=\"inline\"><\/math>. \u0412\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/56e\/eed\/e6f\/56eeede6f51c99ebb670f2a8220c9caa.svg\" alt=\"$\\vec{x_i}$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0435\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0440\u043e\u043a \u0438 1 \u0441\u0442\u043e\u043b\u0431\u0435\u0446:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/da5\/5cc\/3b0\/da55cc3b08854effd6185c0a080637d7.svg\" alt=\"$\\vec{x_i} = \\begin{pmatrix} x_{0i} \\\\ x_{1i} \\\\ ... \\\\ x_{ki} \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0418\u0441\u043a\u043e\u043c\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u0432\u0438\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/734\/c62\/0a1\/734c620a1b0b841a33c195da2b9eea42.svg\" alt=\"$\\vec{w}$\" data-tex=\"inline\"><\/math>, \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/754\/6d9\/077\/7546d9077927d686ea69e5a960b9ec7e.svg\" alt=\"$\\vec{w}=\\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0434\u043b\u044f &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:   <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d8c\/cc5\/428\/d8ccc5428dba85a4bc359fea6a29e819.svg\" alt=\"$f(w,x_i) = \\vec{x_i}^T \\vec{w}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/150\/e6b\/3ac\/150e6b3ac0ad188c46541314e87bece1.svg\" alt=\"$Err= \\sum\\limits_{i=1}^n(y_i-\\vec{x_i}^T \\vec{w})^2 \\rightarrow min$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/56e\/eed\/e6f\/56eeede6f51c99ebb670f2a8220c9caa.svg\" alt=\"$\\vec{x_i}$\" data-tex=\"inline\"><\/math>.<\/p>\n<h3>\u041c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0438\u0441\u043b\u043e: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3c5\/853\/fec\/3c5853fecf110eef85eda172e20ca6ca.svg\" alt=\"$(1 \\times k) \\centerdot (k \\times 1) = 1 \\times 1$\" data-tex=\"inline\"><\/math>, \u0447\u0442\u043e \u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c. \u042d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e&#187; \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u043d\u0430\u043c-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u0430 \u0432\u0441\u0435\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u0435 &#171;<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u044b\u0435&#187; \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \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>. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/36f\/eb8\/54a\/36feb854a52e9ddf85211b9d75176b1f.svg\" alt=\"$(n \\times k)$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b57\/645\/a23\/b57645a23a8886a00295e40362b2f5de.svg\" alt=\"$X=\\begin{pmatrix} x_{00} &amp; x_{01} &amp; ... &amp; x_{0k} \\\\ x_{10} &amp; x_{11} &amp; ... &amp; x_{1k} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ x_{n0} &amp; x_{n1} &amp; ... &amp; x_{nk} \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d80\/51f\/752\/d8051f7526bee4c968e4505d01df7864.svg\" alt=\"$f(w,X) = X \\vec{w}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 (\u0432\u0441\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/98f\/639\/4b2\/98f6394b2bd98b852bb0895b97d55e9f.svg\" alt=\"$y_i$\" data-tex=\"inline\"><\/math>) \u0437\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f8a\/721\/5c3\/f8a7215c3645f9ba287fa478743c4465.svg\" alt=\"$\\vec{y}$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/204\/5ee\/a87\/2045eea87fbcc129447635bd9dfe791a.svg\" alt=\"$(n \\times 1)$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e7\/124\/10c\/3e712410c808664dc76b9dc3e9c04bd8.svg\" alt=\"$\\vec{y} = \\begin{pmatrix} y_{0} \\\\ y_{1} \\\\ ... \\\\ y_{n} \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e0\/c94\/a5e\/6e0c94a5efacde51ee4dc501a0379dd2.svg\" alt=\"$Err = (X \\vec{w} - \\vec{y})^2\\rightarrow min$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2d2\/b7b\/91c\/2d2b7b91c86c7dfac891ccdac6f13260.svg\" alt=\"$X^T X w = X^T y$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f? \u0420\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043a\u043e\u0431\u043a\u0438, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434., \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f.<\/p>\n<h2>\u041c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<h3>\u0420\u0430\u0441\u043a\u0440\u043e\u0435\u043c \u0441\u043a\u043e\u0431\u043a\u0438<\/h3>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3ab\/6f2\/66a\/3ab6f266a784b7946402fb09acdcbf41.svg\" alt=\"$(X \\vec{w} - \\vec{y})^2 = (X \\vec{w} - \\vec{y})^T(X \\vec{w} - \\vec{y})$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff8\/040\/35e\/ff804035e0c7875205fba1ae09578ff2.svg\" alt=\"$=(X\\vec{w})^TX\\vec{w} - \\vec{y}^TX\\vec{w} - (X\\vec{w})^T\\vec{y} + \\vec{y}^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u0430\u0445 \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/008\/93d\/c82\/00893dc823ae4ec707329577f3309aa8.svg\" alt=\"$\\vec{w}^T$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438.<\/p>\n<h4>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 1<\/h4>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0a6\/2a4\/cc5\/0a62a4cc51eb1a62f22f6d08a588deb3.svg\" alt=\"$\\vec{y}^TX\\vec{w} = (X\\vec{w})^T\\vec{y} = \\vec{w}^TX^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c? \u0414\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/941\/197\/bc5\/941197bc5acc5e8f539dd1e4555c06ca.svg\" alt=\"$const$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/417\/c2a\/926\/417c2a926a76c214ceb4ce25dcc8762b.svg\" alt=\"$\\vec{y}^TX\\vec{w} : (1 \\times n) \\centerdot (n \\times k) \\centerdot (k \\times 1) = (1 \\times 1) = const$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/603\/601\/4ed\/6036014ed3a40688dae09690a15d9dbd.svg\" alt=\"$(X\\vec{w})^T\\vec{y} : ((n \\times k) \\centerdot (k \\times 1))^T \\centerdot (n \\times 1) = (1 \\times n) \\centerdot (n \\times 1) = (1 \\times 1) = const$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/13b\/7ee\/519\/13b7ee5191ebe8d74981e6ae11f3916e.svg\" alt=\"$\\vec{w}^TX^T\\vec{y} : (1 \\times k) \\centerdot (k \\times n) \\centerdot (n \\times 1) = (1 \\times 1) = const$\" data-tex=\"inline\"><\/math><\/p>\n<h4>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 2<\/h4>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/452\/1d5\/2c9\/4521d52c9e4097dd7f7a417374363905.svg\" alt=\"$(X\\vec{w})^TX\\vec{w} = \\vec{w}^TX^TX\\vec{w}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u0420\u0430\u0441\u043f\u0438\u0448\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e 1<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/37b\/a5b\/320\/37ba5b32026f2228a5c4269f7c61b698.svg\" alt=\"$(X\\vec{w})^TX\\vec{w} : ((n \\times k) \\centerdot (k \\times 1))^T \\centerdot (n \\times k) \\centerdot (k \\times 1) = (1 \\times 1) = const$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cda\/8c9\/f17\/cda8c9f1738db3da51a5f4f1980a05e0.svg\" alt=\"$\\vec{w}^TX^TX\\vec{w} : (1 \\times k) \\centerdot (k \\times n) \\centerdot (n \\times k) \\centerdot (k \\times 1) = (1 \\times 1) = const$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/932\/46b\/4bf\/93246b4bf5af310b032a58d98c0555da.svg\" alt=\"$Err = \\vec{w}^TX^TX\\vec{w} - 2\\vec{w}^TX^T\\vec{y} + \\vec{y}^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<h2>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>  \u041f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/734\/c62\/0a1\/734c620a1b0b841a33c195da2b9eea42.svg\" alt=\"$\\vec{w}$\" data-tex=\"inline\"><\/math>:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fc1\/b7d\/32d\/fc1b7d32d843d661d9737453da3d84b0.svg\" alt=\"$\\frac{d(\\vec{w}^TX^TX\\vec{w} - 2\\vec{w}^TX^T\\vec{y} + \\vec{y}^T\\vec{y})}{d\\vec{w}}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d68\/aa8\/b5a\/d68aa8b5acbd9c8a1d9b058d3d4f5daa.svg\" alt=\"$(\\vec{w}^TX^TX\\vec{w})' - (2\\vec{w}^TX^T\\vec{y})' + (\\vec{y}^T\\vec{y})' = 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/290\/cc2\/9ed\/290cc29ed0358f3ad23b0f9fb91aaa4d.svg\" alt=\"$2X^TX\\vec{w} - 2X^T\\vec{y} + 0 = 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^TX\\vec{w}=X^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u0412\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0447\u0435\u043c\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/854\/72c\/cfb\/85472ccfb12529545a942bb37025b6f0.svg\" alt=\"$(\\vec{y}^T\\vec{y})' = 0$\" data-tex=\"inline\"><\/math> \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u0430 \u0432\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 \u0432 \u0434\u0432\u0443\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h3>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 1<\/h3>\n<p>  \u0420\u0430\u0441\u043a\u0440\u043e\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5c6\/497\/171\/5c6497171ecef026346aa2fdb5f6db3a.svg\" alt=\"$\\frac{d(\\vec{w}^TX^TX\\vec{w})}{d\\vec{w}} = 2X^TX\\vec{w}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e \u043e\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u0442\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438. \u0421\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c61\/63e\/028\/c6163e028e668189c623bc1a3b8ddfa9.svg\" alt=\"$\\vec{w}^T=\\begin{pmatrix} w_0 &amp; w_1 &amp; ... &amp; w_k \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/754\/6d9\/077\/7546d9077927d686ea69e5a960b9ec7e.svg\" alt=\"$\\vec{w}=\\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/738\/cde\/051\/738cde05198621aabe894c5b855ec2f8.svg\" alt=\"$X^T = \\begin{pmatrix} x_{00} &amp; x_{10} &amp; ... &amp; x_{n0} \\\\ x_{01} &amp; x_{11} &amp; ... &amp; x_{n1} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ x_{0k} &amp; x_{1k} &amp; ... &amp; x_{nk} \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b57\/645\/a23\/b57645a23a8886a00295e40362b2f5de.svg\" alt=\"$X = \\begin{pmatrix} x_{00} &amp; x_{01} &amp; ... &amp; x_{0k} \\\\ x_{10} &amp; x_{11} &amp; ... &amp; x_{1k} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ x_{n0} &amp; x_{n1} &amp; ... &amp; x_{nk} \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/702\/7e7\/3b9\/7027e73b9ee54743fabd5cdaa6ba7ad8.svg\" alt=\"$X^TX$\" data-tex=\"inline\"><\/math> \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math>. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0430 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f. \u042d\u0442\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u0435\u0435, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0445. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cfd\/fcc\/673\/cfdfcc673d2793b05672a8bf92714e3d.svg\" alt=\"$(k \\times k)$\" data-tex=\"inline\"><\/math>:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ae6\/be8\/4e1\/ae6be84e19aa4bcc7556cffd28d85cf9.svg\" alt=\"$A = \\begin{pmatrix} a_{00} &amp; a_{01} &amp; ... &amp; a_{0k} \\\\ a_{10} &amp; a_{11} &amp; ... &amp; a_{1k} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ a_{k0} &amp; a_{k1} &amp; ... &amp; a_{kk} \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u00ab\u0434\u0432\u0430\u0436\u0434\u044b \u0434\u0432\u0430 \u043f\u044f\u0442\u044c\u00bb, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b.<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7e5\/161\/374\/7e5161374cef09043fc02433968df6d2.svg\" alt=\"$\\vec{w}^TA\\vec{w}=\\begin{pmatrix} w_0 &amp; w_1 &amp; ... &amp; w_k \\end{pmatrix} \\qquad \\times \\begin{pmatrix} a_{00} &amp; a_{01} &amp; ... &amp; a_{0k} \\\\ a_{10} &amp; a_{11} &amp; ... &amp; a_{1k} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ a_{k0} &amp; a_{k1} &amp; ... &amp; a_{kk} \\end{pmatrix} \\qquad \\times \\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad = $\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e70\/f08\/35a\/e70f0835a0d957b0d733c5d144cd5506.svg\" alt=\"$= \\begin{pmatrix} w_0a_{00}+w_1a_{10}+...+w_ka_{k0} &amp; ... &amp; w_0a_{0k}+w_1a_{1k}+...+w_ka_{kk} \\end{pmatrix} \\times \\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad =$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2ba\/069\/4b8\/2ba0694b89b9988d9e1fdaefd199789b.svg\" alt=\"$= \\begin{pmatrix} (w_0a_{00}+w_1a_{10} +...+w_ka_{k0})w_0 \\mkern 10mu + \\mkern 10mu ... \\mkern 10mu + \\mkern 10mu (w_0a_{0k}+w_1a_{1k}+...+w_ka_{kk})w_k \\end{pmatrix} =$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6c0\/882\/a97\/6c0882a977a205473dd6ce34ec92c61e.svg\" alt=\"$= w_0^2a_{00}+w_1a_{10}w_0+w_ka_{k0}w_0 \\mkern 10mu + \\mkern 10mu ... \\mkern 10mu + \\mkern 10mu w_0a_{0k}w_k+w_1a_{1k}w_k+...+w_k^2a_{kk}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c! \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u2014 \u0441\u043a\u0430\u043b\u044f\u0440. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c, \u0443\u0436\u0435 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/518\/1a5\/258\/5181a5258f93120e3b9b4a24b56526e4.svg\" alt=\"$w_0 w_1 ... w_k$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0440\u0430\u0441\u043f\u0438\u0448\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043f\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c:<\/p>\n<p>  1) \u043f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ef4\/5c3\/b02\/ef45c3b022e27e6d85a948ecbe894900.svg\" alt=\"$w_o$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/367\/b43\/c40\/367b43c40eba8fc34226951acdd5ff1d.svg\" alt=\"$2w_0a_{00}+w_1a_{10}+w_2a_{20} + ... + w_ka_{k0}+a_{01}w_1+a_{02}w_2+...+a_{0k}w_{k}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  2) \u043f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/1e2\/cc5\/d491e2cc5b2c24ff243cbcdeb640dcc5.svg\" alt=\"$w_1$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/046\/799\/d06\/046799d066be62374f96acd2b8729d50.svg\" alt=\"$w_0a_{01}+2w_1a_{11}+w_2a_{21} + ... + w_ka_{k1}+a_{10}w_0+a_{12}w_2+...+a_{1k}w_{k}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  3) \u043f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2f3\/f37\/1e1\/2f3f371e1f4f02a2f2ea002c08ad6f81.svg\" alt=\"$w_k$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/da5\/2d7\/771\/da52d7771b5d7453ac43d78fabc443e7.svg\" alt=\"$w_0a_{0k}+w_1a_{1k}+w_2a_{2k} + ... + w_{(k-1)}a_{(k-1)k}+a_{k0}w_0+a_{k1}w_1+a_{k2}w_2+...+2w_ka_{kk}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u2014 \u043e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/07b\/79c\/b0d\/07b79cb0deec418b5d5a3d2ee7065c32.svg\" alt=\"$\\begin{pmatrix} 2w_0a_{00}+w_1a_{10}+w_2a_{20} + ... + w_ka_{k0}+a_{01}w_1+a_{02}w_2+...+a_{0k}w_{k} \\\\ w_0a_{01}+2w_1a_{11}+w_2a_{21} + ... + w_ka_{k1}+a_{10}w_0+a_{12}w_2+...+a_{1k}w_{k} \\\\ ... \\\\ ... \\\\ ... \\\\ w_0a_{0k}+w_1a_{1k}+w_2a_{2k} + ... + w_{(k-1)}a_{(k-1)k}+a_{k0}w_0+a_{k1}w_1+a_{k2}w_2+...+2w_ka_{kk} \\end{pmatrix}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u0432\u0435\u043a\u0442\u043e\u0440\u0443 \u043f\u043e\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043b\u0435\u0432\u044b\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/734\/c62\/0a1\/734c620a1b0b841a33c195da2b9eea42.svg\" alt=\"$\\vec{w}$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ac5\/894\/afc\/ac5894afcdb3e86c20fef61960897d38.svg\" alt=\"$w_1a_{10}$\" data-tex=\"inline\"><\/math> (\u043b\u0435\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430) <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/996\/d90\/d32\/996d90d320bc09002ab6faa2253b4cdb.svg\" alt=\"$+ a_{01}w_1$\" data-tex=\"inline\"><\/math> (\u043f\u0440\u0430\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430) \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cf5\/ed4\/21a\/cf5ed421a49940830cdf052e7460a4ac.svg\" alt=\"$w_1(a_{10}+a_{01})$\" data-tex=\"inline\"><\/math>, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e15\/78a\/9b7\/e1578a9b7ef1b178cc8f95e238c3770c.svg\" alt=\"$w_2a_{20}+a_{02}w_2$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/eaa\/c7f\/17a\/eaac7f17ab2b14cac07ff0ec45dc3015.svg\" alt=\"$w_2(a_{20}+a_{02})$\" data-tex=\"inline\"><\/math> \u0438 \u0442.\u0434. \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435. \u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/04a\/a7a\/aa2\/04aa7aaa2ec8cf5b9f384049901ab476.svg\" alt=\"$\\begin{pmatrix} 2w_0a_{00}+w_1(a_{10}+a_{01})+w_2(a_{20}+a_{02})+...+w_k(a_{k0}+a_{0k}) \\\\ w_0(a_{01}+a_{10})+2w_1a_{11}+w_2(a_{21}+a_{12})+...+w_k(a_{k1}+a_{1k}) \\\\ ... \\\\ ... \\\\ ... \\\\ w_0(a_{0k}+a_{k0})+w_1(a_{1k}+a_{k1})+w_2(a_{2k}+a_{k2})+...+2w_ka_{kk} \\end{pmatrix}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0412\u044b\u043d\u0435\u0441\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/734\/c62\/0a1\/734c620a1b0b841a33c195da2b9eea42.svg\" alt=\"$\\vec{w}$\" data-tex=\"inline\"><\/math> \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5ea\/1eb\/552\/5ea1eb5528f255b6c8a7eee99be2d961.svg\" alt=\"$\\begin{pmatrix} 2a_{00} &amp; a_{10}+a_{01} &amp; a_{20}+a_{02} &amp;...&amp; a_{k0}+a_{0k} \\\\ a_{01}+a_{10} &amp; 2a_{11} &amp; a_{21}+a_{12} &amp;...&amp; a_{k1}+a_{1k} \\\\ ...&amp;...&amp;...&amp;...&amp;... \\\\ ...&amp;...&amp;...&amp;...&amp;... \\\\ ...&amp;...&amp;...&amp;...&amp;... \\\\ a_{0k}+a_{k0} &amp; a_{1k}+a_{k1} &amp; a_{2k}+a_{k2} &amp;...&amp; 2a_{kk} \\end{pmatrix} \\times \\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ ... \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0438\u043c\u0441\u044f \u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0435. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0443\u043c\u043c\u0443 \u0434\u0432\u0443\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/76c\/b44\/980\/76cb44980dfee6429aaef62e6624e2f3.svg\" alt=\"$A+A^T$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e6\/519\/833\/3e6519833e8915887cd7a178cfc4869c.svg\" alt=\"$\\begin{pmatrix} a_{00} &amp; a_{01} &amp; a_{02} &amp;...&amp; a_{0k} \\\\ a_{10} &amp; a_{11} &amp; a_{12} &amp;...&amp; a_{1k} \\\\ ...&amp;...&amp;...&amp;...&amp;... \\\\ a_{k0} &amp; a_{k1} &amp; a_{k2} &amp;...&amp; a_{kk} \\end{pmatrix} + \\begin{pmatrix} a_{00} &amp; a_{10} &amp; a_{20} &amp;...&amp; a_{k0} \\\\ a_{01} &amp; a_{11} &amp; a_{21} &amp;...&amp; a_{k1} \\\\ ...&amp;...&amp;...&amp;...&amp;... \\\\ a_{0k} &amp; a_{1k} &amp; a_{2k} &amp;...&amp; a_{kk} \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u043d\u0435\u0435, \u043c\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u043b\u0438 \u043e\u0434\u043d\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u043d\u0430 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u044f\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/76c\/b44\/980\/76cb44980dfee6429aaef62e6624e2f3.svg\" alt=\"$A + A^T$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/470\/58c\/045\/47058c0450bed77e625aa31a926773d7.svg\" alt=\"$2A$\" data-tex=\"inline\"><\/math>. \u042d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0441\u043a\u0440\u044b\u0432 \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/702\/7e7\/3b9\/7027e73b9ee54743fabd5cdaa6ba7ad8.svg\" alt=\"$X^TX$\" data-tex=\"inline\"><\/math>. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0437\u0434\u0435\u0441\u044c, \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a\u0438\u043c, \u043a\u0430\u043a\u0438\u043c \u043c\u044b \u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0435\u0433\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/07b\/9b3\/c13\/07b9b3c1339649c8346e13abcd18380b.svg\" alt=\"$(A+A^T) \\times \\begin{pmatrix} w_0 \\\\ w_1 \\\\ ... \\\\ w_k \\end{pmatrix} \\qquad = 2A \\vec{w} = 2X^TX\\vec{w}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e.<\/p>\n<h3>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 2<\/h3>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2b8\/011\/837\/2b8011837bd26b42c227162ec172dcf2.svg\" alt=\"$\\frac{d(2\\vec{w}^TX^T\\vec{y})}{d\\vec{w}} = 2X^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041f\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043f\u0442\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u0440\u043e\u0436\u043a\u0435. \u041e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043e\u0447\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0443\u0445\u043e\u0434\u0438\u0442\u0435 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<p>  \u0420\u0430\u0441\u043a\u0440\u043e\u0435\u043c \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c61\/63e\/028\/c6163e028e668189c623bc1a3b8ddfa9.svg\" alt=\"$\\vec{w}^T=\\begin{pmatrix} w_0 &amp; w_1 &amp; ... &amp; w_k \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/738\/cde\/051\/738cde05198621aabe894c5b855ec2f8.svg\" alt=\"$X^T = \\begin{pmatrix} x_{00} &amp; x_{10} &amp; ... &amp; x_{n0} \\\\ x_{01} &amp; x_{11} &amp; ... &amp; x_{n1} \\\\ ... &amp; ... &amp; ... &amp; ... \\\\ x_{0k} &amp; x_{1k} &amp; ... &amp; x_{nk} \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e7\/124\/10c\/3e712410c808664dc76b9dc3e9c04bd8.svg\" alt=\"$\\vec{y}=\\begin{pmatrix} y_0 \\\\ y_1 \\\\ ... \\\\ y_n \\end{pmatrix} \\qquad$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041d\u0430 \u0432\u0440\u0435\u043c\u044f \u0443\u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u0434\u0432\u043e\u0439\u043a\u0443 \u2014 \u043e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c \u0432\u0435\u0440\u043d\u0435\u043c \u0435\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e. \u041f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0443\u043c\u043d\u043e\u0436\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ca4\/7c7\/429\/ca47c7429769d7b247cadaeb57041140.svg\" alt=\"$X^T$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f8a\/721\/5c3\/f8a7215c3645f9ba287fa478743c4465.svg\" alt=\"$\\vec{y}$\" data-tex=\"inline\"><\/math>, \u0437\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0cb\/f29\/79a\/0cbf2979a94cada2dbda867960d501cc.svg\" alt=\"$\\begin{pmatrix} x_{00}y_0+x_{10}y_1+...+x_{n0}y_n \\\\ x_{01}y_0+x_{11}y_1+...+x_{n1}y_n \\\\ ... \\\\ x_{0k}y_0+x_{1k}y_1+...+x_{nk}y_n \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u0443\u043c\u043d\u043e\u0436\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/734\/c62\/0a1\/734c620a1b0b841a33c195da2b9eea42.svg\" alt=\"$\\vec{w}$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ede\/bbb\/35f\/edebbb35fb77e2383d8ef57e49b35813.svg\" alt=\"$\\begin{pmatrix} w_0(x_{00}y_0+x_{10}y_1+...+x_{n0}y_n)+ w_1(x_{01}y_0+x_{11}y_1+...+x_{n1}y_n) \\mkern 10mu + \\mkern 10mu ... \\mkern 10mu + \\mkern 10mu w_k(x_{0k}y_0+x_{1k}y_1+...+x_{nk}y_n) \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0415\u0433\u043e \u0442\u043e \u043c\u044b \u0438 \u043f\u0440\u043e\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dad\/f75\/ea1\/dadf75ea1f7c020264aee12a97320550.svg\" alt=\"$(k \\times 1)$\" data-tex=\"inline\"><\/math>:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0cb\/f29\/79a\/0cbf2979a94cada2dbda867960d501cc.svg\" alt=\"$\\begin{pmatrix} x_{00}y_0+x_{10}y_1+...+x_{n0}y_n \\\\ x_{01}y_0+x_{11}y_1+...+x_{n1}y_n \\\\ ... \\\\ x_{0k}y_0+x_{1k}y_1+...+x_{nk}y_n \\end{pmatrix} \\qquad$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0427\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442? \u0412\u0441\u0435 \u0432\u0435\u0440\u043d\u043e! \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ca4\/7c7\/429\/ca47c7429769d7b247cadaeb57041140.svg\" alt=\"$X^T$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f8a\/721\/5c3\/f8a7215c3645f9ba287fa478743c4465.svg\" alt=\"$\\vec{y}$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0442\u043e\u0440\u043e\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e.<\/p>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^T X \\vec{w} = X^T \\vec{y}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043e\u043f\u0438\u0448\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b.<\/p>\n<p>  <b>\u041e\u0446\u0435\u043d\u0438\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432:<\/b><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/988\/b76\/81b\/988b7681b9049c383c00e7c8fefff5ec.svg\" alt=\"$\\sum\\limits_{i=1}^n(y_i-f(x_i))^2 \\mkern 20mu = \\mkern 20mu \\sum\\limits_{i=1}^n(y_i-\\vec{x_i}^T \\vec{w})^2=$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f0a\/7d2\/4be\/f0a7d24be960b43b962e7088064a3316.svg\" alt=\"$= (X \\vec{w} - \\vec{y})^2 \\mkern 20mu = \\mkern 20mu (X \\vec{w} - \\vec{y})^T(X \\vec{w} - \\vec{y}) \\mkern 20mu = \\mkern 20mu \\vec{w}^TX^TX\\vec{w} - 2\\vec{w}^TX^T\\vec{y} + \\vec{y}^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <b>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/b><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ab3\/7e1\/ab6\/ab37e1ab6bcb1c70b11f9a08b3dab81e.svg\" alt=\"$\\frac{d(\\vec{w}^TX^TX\\vec{w} - 2\\vec{w}^TX^T\\vec{y} + \\vec{y}^T\\vec{y})}{d\\vec{w}}=$\" data-tex=\"inline\"><\/math> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/df5\/ce2\/99a\/df5ce299a86d82a3a42b334a8f79594c.svg\" alt=\"$2X^TX\\vec{w} - 2X^T\\vec{y} = 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^TX\\vec{w}=X^T\\vec{y}$\" data-tex=\"inline\"><\/math><\/p>\n<h2>\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430<\/h2>\n<p>  <u><b>\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/b><\/u><\/p>\n<p>  1) <i><a href=\"https:\/\/habr.com\/ru\/post\/278513\/\">habr.com\/ru\/post\/278513<\/a><\/i><br \/>  2) <i><a href=\"https:\/\/habr.com\/ru\/company\/ods\/blog\/322076\/\">habr.com\/ru\/company\/ods\/blog\/322076<\/a><\/i><br \/>  3) <i><a href=\"https:\/\/habr.com\/ru\/post\/307004\/\">habr.com\/ru\/post\/307004<\/a><\/i><br \/>  4) <i><a href=\"http:\/\/nabatchikov.com\/blog\/view\/matrix_der\">nabatchikov.com\/blog\/view\/matrix_der<\/a><\/i><\/p>\n<p>  <u><b>\u0423\u0447\u0435\u0431\u043d\u0438\u043a\u0438, \u0441\u0431\u043e\u0440\u043d\u0438\u043a\u0438 \u0437\u0430\u0434\u0430\u0447:<\/b><\/u><\/p>\n<p>  1) \u041a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u043b\u0435\u043a\u0446\u0438\u0439 \u043f\u043e \u0432\u044b\u0441\u0448\u0435\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435: \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \/ \u0414.\u0422. \u041f\u0438\u0441\u044c\u043c\u0435\u043d\u043d\u044b\u0439 \u2013 4-\u0435 \u0438\u0437\u0434. \u2013 \u041c.: \u0410\u0439\u0440\u0438\u0441-\u043f\u0440\u0435\u0441\u0441, 2006<br \/>  2) \u041f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \/ \u041d. \u0414\u0440\u0435\u0439\u043f\u0435\u0440, \u0413. \u0421\u043c\u0438\u0442 \u2013 2-\u0435 \u0438\u0437\u0434. \u2013 \u041c.: \u0424\u0438\u043d\u0430\u043d\u0441\u044b \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, 1986 (\u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e)<br \/>  3) \u0417\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439: <br \/>  <i><a href=\"https:\/\/function-x.ru\/matrix_equations.html\">function-x.ru\/matrix_equations.html<\/a><br \/>  <a href=\"http:\/\/mathprofi.ru\/deistviya_s_matricami.html\">mathprofi.ru\/deistviya_s_matricami.html<\/a><\/i><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/479398\/\"> https:\/\/habr.com\/ru\/post\/479398\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/479398\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ph\/2w\/sx\/ph2wsxp-gimiwdrfn2j2sr8b3ky.jpeg\"><\/p>\n<p>  \u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0430\u0439\u043d\u0442\u0438\u0441\u0442\u0430\u043c. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/474602\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0442\u0440\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a. \u0422\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^T X \\vec{w} = X^T \\vec{y}$\" data-tex=\"inline\"><\/math>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043c\u044b \u043e\u0431\u043e\u0441\u043d\u0443\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c. <\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dc8\/1b9\/a18\/dc81b9a1885e741a8ac4706c3c0e90c5.svg\" alt=\"$X^T X \\vec{w} = X^T \\vec{y}$\" data-tex=\"inline\"><\/math>? <\/p>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0430, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e.  <\/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-295901","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295901","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=295901"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295901\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}