{"id":283852,"date":"2017-03-24T12:45:02","date_gmt":"2017-03-24T09:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283852"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283852","title":{"rendered":"\u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0432 \u0447\u0451\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438?"},"content":{"rendered":"<p>\u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445, \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441\u043e \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 \u0438\u043b\u0438, \u0438\u043d\u0430\u0447\u0435, \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0410 \u0432 \u0447\u0451\u043c \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f?<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0439 \u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Python, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0432\u0441\u0451 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b.<a name=\"habracut\"><\/a><\/p>\n<h2>\u041c\u043e\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0442\u0435\u043e\u0440\u0438\u044f \u043d\u0435 \u043e\u0442\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432, \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0415\u0441\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442: m \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u2014 n-\u043c\u0435\u0440\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f (\u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0438\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0439). \u0422\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c\u044b\u043c, \u0442.\u0435. \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 n-\u043c\u0435\u0440\u043d\u0430\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f, \u0447\u0442\u043e \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043b\u0435\u0436\u0430\u0442 \u043f\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442 \u043d\u0435\u0451, \u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u2014 \u043f\u043e \u0434\u0440\u0443\u0433\u0443\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b5f\/d07\/cfb\/b5fd07cfbf764218bdc30e3180a3e43b.png\" alt=\"image\"\/><\/p>\n<p>  \u041a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u043e\u0439 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (logistic regression), \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u044f\u0434\u0440\u043e\u043c (linear SVM) \u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/94f\/3fd\/5f6\/94f3fd5f6ad747b69a7675c7987cc33a.png\" alt=\"image\"\/><\/p>\n<h2>\u041e\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0434\u043e \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438<\/h2>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0439. \u0414\u043b\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0432 n-\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u0440\u043e\u0432\u043d\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b23\/e1f\/09f\/b23e1f09fd084c2d82b1f594d5eb0df4.PNG\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u044f\u043c\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0440\u0435\u043c\u044f \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b73\/81c\/cb2\/b7381ccb2e1dfe04c16007c6c671a3ea.svg\" alt=\"$(w_1, w_2, b)$\" data-tex=\"inline\"\/><\/math>:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7de\/9d4\/aaf\/7de9d4aafa346fc9fafdcbf5c54e5dd4.svg\" alt=\"$w_1 x_1 + w_2 x_2 + b = 0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0438\u043b\u0438:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f43\/8aa\/a74\/f438aaa749694d485e83fc10f9c96b07.svg\" alt=\"$\\sum_{i = 1}^{2}{w_ix_i}+b=0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0438\u043b\u0438:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8a6\/a0f\/8af\/8a6a0f8af0946e6518d2f0c55e785fe1.svg\" alt=\"$w^Tx+b=0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a07\/948\/913\/a07948913939b94a0ae7c2f9899610ea.svg\" alt=\"$w_1, w_2$\" data-tex=\"inline\"\/><\/math> \u0437\u0430\u0434\u0430\u044e\u0442 \u0432\u0441\u0451 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u044f\u043c\u044b\u0445 \u043b\u0438\u043d\u0438\u0439, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443 (0, 0). \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5e4\/53c\/877\/5e453c8778a25353c0008f94d9710d02.svg\" alt=\"$w_1$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ce3\/f38\/1ba\/ce3f381ba63494b5833ea2d2c7f84487.svg\" alt=\"$w_2$\" data-tex=\"inline\"\/><\/math> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0443\u0433\u043e\u043b \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439 \u043a \u043e\u0441\u044f\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/185\/037\/181\/185037181a078e57b7ae458486de852d.svg\" alt=\"$w_1 = w_2$\" data-tex=\"inline\"\/><\/math>, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043b\u0438\u043d\u0438\u044e, \u0438\u0434\u0443\u0449\u0443\u044e \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1db\/817\/581\/1db81758156a27c9f67f1cad9d2f029b.svg\" alt=\"$\\frac{\\pi}{4}$\" data-tex=\"inline\"\/><\/math>) \u043a \u043e\u0441\u044f\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/736\/3ed\/315\/7363ed3150ecffdf235171aaa9ea4160.svg\" alt=\"$x_1$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/911\/1e6\/994\/9111e69946e97ffe28324cbae67a9269.svg\" alt=\"$x_2$\" data-tex=\"inline\"\/><\/math> \u0438 \u0434\u0435\u043b\u044f\u0449\u0443\u044e \u043f\u0435\u0440\u0432\u044b\u0439\/\u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u043d\u0442\u044b \u043f\u043e\u043f\u043e\u043b\u0430\u043c.<\/p>\n<p>  \u041d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d2\/218\/e72\/5d2218e7292f24a1ff72a7ba614d11e9.svg\" alt=\"$b$\" data-tex=\"inline\"\/><\/math> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0438\u043d\u0438\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u043e\u043b\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043a\u043b\u043e\u043d \u043a \u043e\u0441\u044f\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/736\/3ed\/315\/7363ed3150ecffdf235171aaa9ea4160.svg\" alt=\"$x_1$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/911\/1e6\/994\/9111e69946e97ffe28324cbae67a9269.svg\" alt=\"$x_2$\" data-tex=\"inline\"\/><\/math> \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0422.\u0435. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d2\/218\/e72\/5d2218e7292f24a1ff72a7ba614d11e9.svg\" alt=\"$b$\" data-tex=\"inline\"\/><\/math> \u0437\u0430\u0434\u0430\u0451\u0442 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043b\u0438\u043d\u0438\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a2a\/ab7\/6dd\/a2aab76dd318437c9611c9c0d6977add\" alt=\"image\"\/><\/p>\n<p>  \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aca\/91f\/4ef\/aca91f4ef4950a1aa8d6b8d32f862564.svg\" alt=\"$(w1, w2)$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c \u043a \u043f\u0440\u044f\u043c\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7de\/9d4\/aaf\/7de9d4aafa346fc9fafdcbf5c54e5dd4.svg\" alt=\"$w_1 x_1 + w_2 x_2 + b = 0$\" data-tex=\"inline\"\/><\/math>:<\/p>\n<p>  (\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d2\/218\/e72\/5d2218e7292f24a1ff72a7ba614d11e9.svg\" alt=\"$b$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ca7\/2e5\/1e0\/ca72e51e0d68138d586183657d03b653.svg\" alt=\"$w^Tx$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u044c\u043d\u043e \u0438\u0445 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/baa\/dee\/944\/baadee9444d136cdabc2792cdd7d0b6b.svg\" alt=\"$x$\" data-tex=\"inline\"\/><\/math> \u2014 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5af\/594\/e9c\/5af594e9cca66e9aae11806d6591f391.svg\" alt=\"$(w_1, w_2)$\" data-tex=\"inline\"\/><\/math>.)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8de\/92e\/179\/8de92e179ab04db39d1a1f0d7543a5b9\" alt=\"image\"\/><\/p>\n<p>  <i>P.S.<\/i> \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u043a\u0430\u043a \u0438 \u0442\u0440\u043e\u0435\u043a (w1, w2, b) \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u044f\u043c\u0443\u044e. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/839\/452\/3d1\/8394523d1f4bab66a8544cd365388d87.svg\" alt=\"$k$\" data-tex=\"inline\"\/><\/math> \u2014 \u043f\u0440\u044f\u043c\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435.<\/p>\n<p>  <b>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 n-\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430,<\/b> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7c3\/5ad\/9ed\/7c35ad9ed41b6d0293914bfb43d72ae3.svg\" alt=\"$(w_1, ..., w_n, b)$\" data-tex=\"inline\"\/><\/math> \u0437\u0430\u0434\u0430\u0451\u0442 n-\u043c\u0435\u0440\u043d\u0443\u044e \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c.<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a70\/c4f\/dd0\/a70c4fdd00f12c97173b437a690dd71a.svg\" alt=\"$w_1 x_1 + w_2 x_2 + ... + w_n x_n + b = 0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0438\u043b\u0438:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cf\/fe2\/8f7\/7cffe28f78c607f4caa0d7df2a380e8d.svg\" alt=\"$\\sum_{i = 1}^{n}{w_ix_i}+b=0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0438\u043b\u0438:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8a6\/a0f\/8af\/8a6a0f8af0946e6518d2f0c55e785fe1.svg\" alt=\"$w^Tx+b=0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<h2>\u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/de8\/dfe\/6c2\/de8dfe6c29585f2d3a56c092f36a0725.svg\" alt=\"$x (x_0,...,x_n)$\" data-tex=\"inline\"\/><\/math> \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u0442\u043e<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8a6\/a0f\/8af\/8a6a0f8af0946e6518d2f0c55e785fe1.svg\" alt=\"$w^Tx+b=0 $\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0410 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0430 \u043d\u0435 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438?<\/p>\n<p>  \u0413\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0438\u0442 \u0433\u0438\u043f\u0435\u0440\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043d\u0430 \u0434\u0432\u0430 \u0433\u0438\u043f\u0435\u0440\u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u0422\u0430\u043a \u0432\u043e\u0442 \u0442\u043e\u0447\u043a\u0438, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u00ab\u0432\u044b\u0448\u0435\u00bb \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438), \u0438 \u0442\u043e\u0447\u043a\u0438, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u00ab\u043d\u0438\u0436\u0435\u00bb \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438), \u0431\u0443\u0434\u0443\u0442 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0443\u043c\u043c\u0435 \u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0439 \u0437\u043d\u0430\u043a:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c2d\/3d9\/0cd\/c2d3d90cd40806f75f6ba98d14675cf6.svg\" alt=\"$w^T x + b &gt; 0$\" data-tex=\"inline\"\/><\/math> \u2014 \u0442\u043e\u0447\u043a\u0430 \u043b\u0435\u0436\u0438\u0442 \u00ab\u0432\u044b\u0448\u0435\u00bb \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a0b\/d04\/e47\/a0bd04e4784456e72249e7f6e51cebe7.svg\" alt=\"$w^T x + b &lt; 0$\" data-tex=\"inline\"\/><\/math> \u2014 \u0442\u043e\u0447\u043a\u0430 \u043b\u0435\u0436\u0438\u0442 \u00ab\u043d\u0438\u0436\u0435\u00bb \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438<\/p>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 Python:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 Python<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b # \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 import seaborn  import matplotlib.pyplot as plt import numpy as np  # \u043d\u0430\u0448\u0430 \u043b\u0438\u043d\u0438\u044f: w1 * x1 + w2 * x2 + b = 0 def line(x1, x2):     return -3 * x1 - 5 * x2 - 2  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 x2 = f(x1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line_x1(x1):     return (-3 * x1 - 2) \/ 5  # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0442\u043e\u0447\u0435\u043a np.random.seed(0) x1x2 = np.random.randn(200, 2) * 2  # \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u043e\u0447\u043a\u0438 for x1, x2 in x1x2:     value = line(x1, x2)      if (value == 0): # \u0441\u0438\u043d\u0438\u0435 \u2014 \u043d\u0430 \u043b\u0438\u043d\u0438\u0438         plt.plot(x1, x2, 'ro', color='blue')     elif (value &gt; 0): # \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u2014 \u0432\u044b\u0448\u0435 \u043b\u0438\u043d\u0438\u0438         plt.plot(x1, x2, 'ro', color='green')     elif (value &lt; 0): # \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u2014 \u043d\u0438\u0436\u0435 \u043b\u0438\u043d\u0438\u0438         plt.plot(x1, x2, 'ro', color='red')  # \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0435  \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u044f\u043c plt.gca().set_aspect('equal', adjustable='box')              # \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u0443 \u043b\u0438\u043d\u0438\u044e x1_range = np.arange(-5.0, 5.0, 0.5) plt.plot(x1_range, line_x1(x1_range), color='blue')  # \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0435\u0439 plt.xlabel('x1') plt.ylabel('x2')  # \u043d\u0430 \u044d\u043a\u0440\u0430\u043d! plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/acc\/ff8\/54e\/accff854ef5947f291deef365e2a7102\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u00ab\u0432\u044b\u0448\u0435\u00bb \u0438 \u00ab\u043d\u0438\u0436\u0435\u00bb \u0437\u0434\u0435\u0441\u044c \u2014 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435. \u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0436\u0435. \u0421 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u00ab\u0432\u044b\u0448\u0435\u00bb \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u0438. \u041a\u0443\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c, \u0442\u0430\u043c \u0438 \u0432\u0435\u0440\u0445:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/750\/fbd\/80d\/750fbd80d1864b728f846a0089ffb2e7\" alt=\"image\"\/><\/p>\n<p>  \u0422.\u043e. \u0437\u043d\u0430\u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u043e\u0447\u043a\u0443 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0438\u043b\u0438 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443.<\/p>\n<p>  \u0410 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435? \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u043e\u0442 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/40e\/347\/14c\/40e34714c2c8a87a3439360b76803f3d.svg\" alt=\"$dist(x) = \\frac{|w^Tx+b|}{||w||}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  \u0422.\u0435. \u0447\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0435\u0451. \u0415\u0441\u043b\u0438 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u043e\u0447\u043a\u0438, \u043b\u0435\u0436\u0430\u0449\u0438\u0435 \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439.<\/p>\n<p>  \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 Python<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b # \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b # \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 import seaborn  import matplotlib.pyplot as plt import numpy as np  # \u043d\u0430\u0448\u0430 \u043b\u0438\u043d\u0438\u044f: w1 * x1 + w2 * x2 + b = 0 def line(x1, x2):     return -3 * x1 - 5 * x2 - 2  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 x2 = f(x1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line_x1(x1):     return (-3 * x1 - 2) \/ 5  # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0442\u043e\u0447\u0435\u043a np.random.seed(0) x1x2 = np.random.randn(200, 2) * 2  # \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u043e\u0447\u043a\u0438 for x1, x2 in x1x2:         value = line(x1, x2)      # \u0446\u0432\u0435\u0442 \u0442\u0435\u043c \u0442\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0438\u043d\u0443\u0441     # \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d [0, 0.75]     # \u0447\u0451\u0440\u043d\u044b\u0439 (0) \u2014 \u0441\u0430\u043c\u044b\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u0441\u0432\u0435\u0442\u043b\u043e-\u0441\u0435\u0440\u044b\u0439 (0.75) \u2014 \u0441\u0430\u043c\u044b\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0435     color = str(max(0, 0.75 - np.abs(value) \/ 30))      plt.plot(x1, x2, 'ro', color=color)          # \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0435  \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u044f\u043c plt.gca().set_aspect('equal', adjustable='box')          # \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u0443 \u043b\u0438\u043d\u0438\u044e x1_range = np.arange(-5.0, 5.0, 0.5) plt.plot(x1_range, line_x1(x1_range), color='blue')  # \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0435\u0439 plt.xlabel('x1') plt.ylabel('x2')  # \u043d\u0430 \u044d\u043a\u0440\u0430\u043d! plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c8a\/51a\/f09\/c8a51af090ef47879d6eca72ff924d7d\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0451 \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c n-\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c\u044e. <\/li>\n<li> \u0422\u043e\u0447\u043a\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c16\/74e\/270\/c1674e270f08ef3613723be43247b842.svg\" alt=\"$w^Tx+b$\" data-tex=\"inline\"\/><\/math>.<\/li>\n<li>\u0427\u0435\u043c \u0442\u043e\u0447\u043a\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u0435\u0435 \u043e\u0442 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u0442\u0435\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435.<\/li>\n<\/ul>\n<p>  \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0427\u0435\u043c \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u0435\u0435 \u0442\u043e\u0447\u043a\u0430 \u043e\u0442 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0439\u0441\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (decision boundary), \u0442\u0435\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u0435\u0435 \u043c\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 (sample) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0439 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441. <\/p>\n<h2>\u0411\u043b\u0438\u0437\u043a\u043e \u0438 \u0434\u0430\u043b\u0435\u043a\u043e: \u044d\u0442\u043e \u043a\u0430\u043a?<\/h2>\n<p>  \u0411\u043b\u0438\u0437\u043a\u043e \u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u2014 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0441\u0443\u0433\u0443\u0431\u043e \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435. \u0410 \u043f\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0451\u0442\u043a\u043e \u2014 \u043b\u0438\u0431\u043e \u0434\u0435\u0442\u0430\u043b\u044c \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0440\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0451\u0442\u0430 \u043d\u0430 \u041c\u0430\u0440\u0441, \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u0431\u0440\u0430\u043a. \u041b\u0438\u0431\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043a\u043b\u0438\u043a\u043d\u0435\u0442 \u043f\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0435, \u043b\u0438\u0431\u043e \u043d\u0435\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0441 \u0434\u043e\u043b\u0435\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2014 \u0434\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0433\u043e (true) \u0438\u0441\u0445\u043e\u0434\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 (\u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0438\u0436\u0435):<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/918\/157\/cff\/918157cff13525c26f80ecb773965428.svg\" alt=\"$logistic(x) = \\frac{1}{1 + e^{-x}}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 Python<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b # \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 import seaborn  import matplotlib.pyplot as plt import numpy as np  # \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f def logit(x):     return 1 \/ (1 + np.exp(-x))  # \u043d\u0430\u0448\u0430 \u043b\u0438\u043d\u0438\u044f: w1 * x1 + w2 * x2 + b = 0 def line(x1, x2):     return 3 * x1 + 5 * x2 + 2  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 x2 = f(x1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line_x1(x1):     return (-3 * x1 - 2) \/ 5  # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0442\u043e\u0447\u0435\u043a np.random.seed(0) xy = np.random.randn(200, 2) * 2  # \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u043e\u0447\u043a\u0438 for x1, x2 in x1x2:         # \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0434\u0430\u043a\u0430\u044f \u0440\u0443\u0447\u043d\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f     value = logit(line(x1, x2) \/ 2)      if (value &lt; 0.001):         color = 'red'     elif (value &gt; 0.999):         color = 'green'     else:         color = str(0.75 - value * 0.5)      plt.plot(x1, x2, 'ro', color=color)          # \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0435  \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u044f\u043c plt.gca().set_aspect('equal', adjustable='box')          # \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u0443 \u043b\u0438\u043d\u0438\u044e x1_range = np.arange(-5.0, 5.0, 0.5) plt.plot(x1_range, line_x1(x1_range), color='blue')  # \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0435\u0439 plt.xlabel('x1') plt.ylabel('x2')  # \u043d\u0430 \u044d\u043a\u0440\u0430\u043d! plt.show()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/501\/57c\/ceb\/50157ccebace4077b66eca05747b25b3\" alt=\"image\"\/><\/p>\n<p>  \u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u2014 \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0442 (false, \u0442\u043e\u0447\u043d\u043e \u0431\u0440\u0430\u043a, \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043a\u043b\u0438\u043a\u043d\u0435\u0442). \u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u2014 \u0442\u043e\u0447\u043d\u043e \u0434\u0430 (true, \u0442\u043e\u0447\u043d\u043e \u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0442\u043e\u0447\u043d\u043e \u043a\u043b\u0438\u043a\u043d\u0435\u0442). \u0412\u0441\u0451, \u0447\u0442\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 (\u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c. \u041d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u043e\u0432\u043d\u043e 0.5.<\/p>\n<p>  <i>P.S. <\/i>\u00ab\u0422\u043e\u0447\u043d\u043e\u00bb \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u0435\u043d\u044c\u0448\u0435 0.001 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 0.999. \u0421\u0430\u043c\u0430 \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043d\u0443\u043b\u044e \u043d\u0430 \u043c\u0438\u043d\u0443\u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u043d\u0430 \u043f\u043b\u044e\u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/046\/2d2\/d43\/0462d2d436cd452a98c5a577db0ec325\" alt=\"image\"\/><\/p>\n<h2>\u0412 \u043a\u0430\u043a\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435? (\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0443\u043c\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0435)<\/h2>\n<p>  \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u043c\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6bf\/a5b\/297\/6bfa5b2972cf556a719dca37a543fd04.svg\" alt=\"$X$\" data-tex=\"inline\"\/><\/math> (data space), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0436\u0430\u0442 \u043e\u0431\u0440\u0430\u0437\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/baa\/dee\/944\/baadee9444d136cdabc2792cdd7d0b6b.svg\" alt=\"$x$\" data-tex=\"inline\"\/><\/math>. \u0418 \u0438\u0449\u0435\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c\u044e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/43c\/d4a\/82f\/43cd4a82fba2d057ebc2d101242d68d5.svg\" alt=\"$w$\" data-tex=\"inline\"\/><\/math>.<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c2d\/3d9\/0cd\/c2d3d90cd40806f75f6ba98d14675cf6.svg\" alt=\"$w^T x + b &gt; 0$\" data-tex=\"inline\"\/><\/math> \u0434\u043b\u044f \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a<br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a0b\/d04\/e47\/a0bd04e4784456e72249e7f6e51cebe7.svg\" alt=\"$w^T x + b &lt; 0$\" data-tex=\"inline\"\/><\/math> \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a<\/p>\n<p>  \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0430 \u0432\u0435\u0441\u0430 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0438\u0433\u0440\u0430\u0442\u044c, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/85c\/52e\/d41\/85c52ed4133eae86a3df9efc1be896c1.svg\" alt=\"$W$\" data-tex=\"inline\"\/><\/math> (weight space):<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d41\/4ce\/38f\/d414ce38f714d5fbf1879552f49c9bc3.svg\" alt=\"$x^T w + b$\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0437\u0446\u044b \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a08\/09c\/0d2\/a0809c0d216b4c49c6cbc81f4bf705ae.svg\" alt=\"$x_1 ... x_m$\" data-tex=\"inline\"\/><\/math> \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u0434\u0430\u044e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e8c\/f1d\/ede\/e8cf1dede8eb4b550eb4ba0e9693b70d.svg\" alt=\"$m$\" data-tex=\"inline\"\/><\/math> \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0435\u0439 \u0438 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u0442\u043e\u0447\u043a\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/43c\/d4a\/82f\/43cd4a82fba2d057ebc2d101242d68d5.svg\" alt=\"$w$\" data-tex=\"inline\"\/><\/math>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u043b\u0435\u0436\u0430\u043b\u0430 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e-\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c\u044b\u043c, \u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b30\/fef\/7f0\/b30fef7f0e8947c89d3aace82d003389\" alt=\"image\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 Python<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b # \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 import seaborn  import matplotlib.pyplot as plt import numpy as np  # \u043e\u0431\u0440\u0430\u0437\u0435\u0446 1 def line1(w1, w2):     return -3 * w1 - 5 * w2 - 8  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 w2 = f1(w1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line1_w1(w1):     return (-3 * w1 - 8) \/ 5  # \u043e\u0431\u0440\u0430\u0437\u0435\u0446 2 def line2(w1, w2):     return 2 * w1 - 3 * w2 + 4  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 w2 = f2(w1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line2_w1(w1):     return (2 * w1 + 4) \/ 3  # \u043e\u0431\u0440\u0430\u0437\u0435\u0446 3 def line3(w1, w2):     return 1.2 * w1 - 3 * w2 + 4  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 w2 = f2(w1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line3_w1(w1):     return (1.2 * w1 + 4) \/ 3  # \u043e\u0431\u0440\u0430\u0437\u0435\u0446 4 def line4(w1, w2):     return -5 * w1 - 5 * w2 - 8  # \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 w2 = f2(w1) (\u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438) def line4_w1(w1):     return (-5 * w1 - 8) \/ 5  # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0442\u043e\u0447\u0435\u043a w1_range = np.arange(-5.0, 5.0, 0.5) w2_range = np.arange(-5.0, 5.0, 0.5)  # \u0440\u0438\u0441\u0443\u0435\u043c \u0432\u0435\u0441\u0430 (w1, w2), \u043b\u0435\u0436\u0430\u0449\u0438\u0435 \u043f\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u0442 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 for w1 in w1_range:     for w2 in w2_range:         value1 = line1(w1, w2)         value2 = line2(w1, w2)         value3 = line3(w1, w2)         value4 = line4(w1, w2)                  if (value1 &lt; 0 and value2 &gt; 0 and value3 &gt; 0 and value4 &lt; 0):             color = 'green'         else:             color = 'pink'                  plt.plot(w1, w2, 'ro', color=color)  # \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0435  \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u044f\u043c plt.gca().set_aspect('equal', adjustable='box')              # \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u0443 \u043b\u0438\u043d\u0438\u044e (\u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c) \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u0430 1 plt.plot(w1_range, line1_w1(w1_range), color='blue') # \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u0430 2 plt.plot(w1_range, line2_w1(w1_range), color='blue') # \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u0430 3 plt.plot(w1_range, line3_w1(w1_range), color='blue') # \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u0430 4 plt.plot(w1_range, line4_w1(w1_range), color='blue')  # \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u2014 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e plt.axis([-7, 7, -7, 7])  # \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0435\u0439 plt.xlabel('w1') plt.ylabel('w2')  # \u043d\u0430 \u044d\u043a\u0440\u0430\u043d! plt.show()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u0435\u0441\u043e\u0432, \u0442.\u043a. \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u0430, \u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430-\u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0437\u0430\u0434\u0430\u044e\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438 \u043a \u0433\u0438\u043f\u0435\u0440\u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044f\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/08b\/9d1\/508\/08b9d1508f8c43a3b8bcdcaa1d4d8f24\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/baa\/dee\/944\/baadee9444d136cdabc2792cdd7d0b6b.svg\" alt=\"$x$\" data-tex=\"inline\"\/><\/math> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0443:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9ba\/c4b\/085\/9bac4b08559f0abc80e93957d0542eec.svg\" alt=\"$x^T w + b &gt; 0$\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0422.\u043a. \u043d\u0430 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/43c\/d4a\/82f\/43cd4a82fba2d057ebc2d101242d68d5.svg\" alt=\"$w$\" data-tex=\"inline\"\/><\/math> \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/baa\/dee\/944\/baadee9444d136cdabc2792cdd7d0b6b.svg\" alt=\"$x$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u2014 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/43c\/d4a\/82f\/43cd4a82fba2d057ebc2d101242d68d5.svg\" alt=\"$w$\" data-tex=\"inline\"\/><\/math> \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u044e:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ce5\/15d\/34e\/ce515d34eaf89c9bf400df71d988e05b.svg\" alt=\"$w_{new} = w_{old} + \\lambda x$\" data-tex=\"inline\"\/><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c81\/535\/76b\/c8153576b3cf6d38b12363833640fe5a.svg\" alt=\"$\\lambda &gt; 0$\" data-tex=\"inline\"\/><\/math><\/p>\n<p>  \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u00ab\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e\u00bb <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d1d\/2ad\/058\/d1d2ad058a6e91cc85fd05d7403b9837.svg\" alt=\"$\\lambda$\" data-tex=\"inline\"\/><\/math>. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0431\u043e \u0432\u0435\u0440\u043d\u044b\u043c, \u043b\u0438\u0431\u043e \u043c\u0435\u043d\u0435\u0435 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c, \u0442.\u043a. \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e14\/6a9\/7cc\/e146a97cc7e0c0cfad58656528ece461.svg\" alt=\"$\\lambda x$\" data-tex=\"inline\"\/><\/math>, \u0441\u043e\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u044e, \u00ab\u0434\u043e\u0432\u0435\u0440\u043d\u0451\u0442\u00bb \u0432\u0435\u043a\u0442\u043e\u0440 \u0432\u0435\u0441\u043e\u0432 \u0432 \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c.<\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439. \u041d\u0438\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u043c\u0443. (\u0412\u0441\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435.)<\/p>\n<ul>\n<li><a href=\"http:\/\/www.cs.toronto.edu\/~tijmen\/csc321\/slides\/lecture_slides_lec2.pdf\">Geoffrey Hinton. An overview of the main types of neural network architecture<\/a><br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u0430 \u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u043e\u0442 \u0433\u0443\u0440\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0425\u0438\u043d\u0442\u043e\u043d\u0430.\n<\/li>\n<li><a href=\"http:\/\/fuzzy.cs.ovgu.de\/ci\/nn\/v09_svm_en.pdf\">Supervised Learning \/ Support Vector Machines<\/a><br \/>  \u041f\u0440\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u043a\u0430\u043a \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0443\u044e \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c.\n<\/li>\n<li><a href=\"https:\/\/www.cs.utah.edu\/~piyush\/teaching\/8-9-print.pdf\">Hyperplane based \u0441lassification: Perceptron and (Intro to) Support Vector Machines<\/a><br \/>  \u041e\u043f\u044f\u0442\u044c \u043f\u0440\u043e \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u044b, \u0432\u0441\u043a\u043e\u043b\u044c\u0437\u044c \u043f\u0440\u043e \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0435\u0441\u043e\u0432.\n<\/li>\n<li><a href=\"https:\/\/www.cs.utah.edu\/~piyush\/teaching\/8-9-print.pdf\">Polyhedra and Linear Programming. Polyhedra, Polytopes, and Cones<\/a><br \/>  \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 (\u0442\u0435\u043e\u0440\u0438\u044f) \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.\n<\/li>\n<\/ul>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/324736\/\"> https:\/\/habrahabr.ru\/post\/324736\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445, \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441\u043e \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 \u0438\u043b\u0438, \u0438\u043d\u0430\u0447\u0435, \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0410 \u0432 \u0447\u0451\u043c \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f?<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0439 \u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Python, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0432\u0441\u0451 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b.<\/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-283852","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283852","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=283852"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283852\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}