{"id":375587,"date":"2024-05-21T06:28:11","date_gmt":"2024-05-21T06:28:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=375587"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T06:28:11","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=375587","title":{"rendered":"<span>CADE \u2014 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0432 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043a\u0430\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0432\u00a0\u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043a\u0430\u043a\u00a0\u043e\u0446\u0435\u043d\u043a\u0443 \u00ab\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438\u00bb \u0442\u043e\u0447\u0435\u043a. \u0418\u043d\u0442\u0443\u0438\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u00a0\u2014 \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u00a0\u0442\u043e\u0447\u043a\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u00ab\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u0430\u00bb. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u00a0\u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u0442\u043e\u0447\u0435\u043a. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043c\u044b, \u0432\u00a0\u043e\u0434\u043d\u043e\u0439 \u0438\u0437\u00a0\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u0437\u0430\u0434\u0430\u0447\u0438, \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0438 (\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0432 <em>\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438<\/em>) \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0438\u043c\u0438. \u041d\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0431\u043e\u043b\u0435\u0435 \u00ab\u0445\u0438\u0442\u0440\u044b\u0435\u00bb \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438 \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043d\u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u0451\u043b \u043d\u0430\u00a0\u043c\u0435\u043d\u044f \u043e\u0441\u043e\u0431\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0432\u043e\u0435\u0439 \u043c\u044b\u0441\u043b\u0438. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u00a0\u0425\u0430\u0431\u0440\u0435. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>CADE (Classifier Adjusted Density Estimation)<\/strong>, \u0438 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043e\u043d\u00a0\u0431\u044b\u043b \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u0435\u0449\u0435 \u0432 2001\u00a0\u0433\u043e\u0434\u0443 \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435 [1], \u0445\u043e\u0442\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u00a0\u0431\u044b\u043b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>CADE\u00a0\u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043d\u0435\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438. \u0427\u0442\u043e\u00a0\u0432\u0430\u0436\u043d\u043e, \u0434\u043b\u044f\u00a0\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u00a0\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u00a0\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f\u043c <a href=\"https:\/\/seppe.net\/aa\/papers\/CADE.pdf\" rel=\"noopener noreferrer nofollow\"><u>\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/u><\/a> [2], \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e\u00a0\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u00a0\u0442\u043e\u043c\u00a0\u0436\u0435 \u0443\u0440\u043e\u0432\u043d\u0435, \u0430\u00a0\u043f\u0440\u0438\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0434\u0430\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c <em>LOC (Local Outlier Factor)<\/em>\u00a0\u2014 \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 density\u2011based \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f\u00a0\u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439. \u0421\u0443\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b CADE \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u00a0\u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a. \u0418 \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f? \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c. <\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 CADE<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e CADE \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0421\u043c\u0435\u0448\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e (\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435) \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0\u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u0432\u0443\u0445\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0432\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a\u00a0\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u0437\u00a0\u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 <a href=\"https:\/\/seppe.net\/aa\/papers\/CADE.pdf\" rel=\"noopener noreferrer nofollow\"><u>\u0441\u0442\u0430\u0442\u044c\u0438<\/u><\/a> [2], \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438 \u043e\u043f\u0438\u0440\u0430\u043b\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c\u00a0\u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0435\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0435\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c <em>T<\/em>\u00a0\u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441 <em>\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439<\/em> \u0434\u043e\u043b\u0435\u0439 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439). <em>P(X|T)<\/em>\u00a0\u2014 \u0438\u0445 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e\u00a0\u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u00ab\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435\u00bb \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u0437\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u043a <em>A,<\/em> \u0430\u00a0\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00a0\u2014 <em>P(X|A)<\/em>. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0438\u043b\u0438\u00a0\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0445\u043e\u0442\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430\u00a0\u0432\u044b\u0431\u043e\u0440 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0442.\u00a0\u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u043b\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u0435\u0441\u0442\u044c\u00a0\u0431\u044b\u043b\u0430 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a\u00a0\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0427\u0442\u043e\u00a0\u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0442\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440, \u0440\u0430\u0432\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <em>T<\/em>, \u043e\u0434\u043d\u0430\u043a\u043e \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430\u00a0\u044d\u0442\u043e\u0442 \u0441\u0447\u0451\u0442 \u043f\u043e\u0437\u0436\u0435. \u0422\u043e\u0447\u043a\u0438 \u0438\u0437 <em>A<\/em> \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>\u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f\u043c\u0438<\/em>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433\u00a0\u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u043a\u00a0\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 <em>T<\/em>, \u0430\u00a0\u0438\u043c\u0435\u043d\u043d\u043e <em>P(C = T|X)<\/em>. \u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c Random Forest Classifier, KNN, Decision Tree Classifier, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043f\u043e\u00a0\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0441\u0443\u043c\u043c\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439\u00a0\u0431\u044b\u0442\u044c \u0432\u00a0\u043a\u043b\u0430\u0441\u0441\u0435 <em>T<\/em> \u0438 \u043a\u043b\u0430\u0441\u0441\u0435 <em>A<\/em> \u0440\u0430\u0432\u043d\u0430 1. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P(C=T|X)=1-P(C=A|X)\" alt=\"P(C=T|X)=1-P(C=A|X)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/246\/21b\/5bd\/24621b5bdd143f2b11b20a8326baa853.svg\" width=\"270\" height=\"22\"\/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a\u00a0\u0432\u044b\u0432\u043e\u0434\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f\u00a0\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <em>P(X|T)<\/em>. \u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0442\u0435\u043e\u0440\u0435\u043c\u0443 \u0411\u0430\u0439\u0435\u0441\u0430 \u043a <em>P(C=T|X)<\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P(C=T|X)=\\frac{P(X|T)P(C=T)}{P(X)}=\\frac{P(X|T)P(C=T)}{P(X|T)P(C=T)+P(X|A)P(C=A)}\" alt=\"P(C=T|X)=\\frac{P(X|T)P(C=T)}{P(X)}=\\frac{P(X|T)P(C=T)}{P(X|T)P(C=T)+P(X|A)P(C=A)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea5\/af4\/092\/ea5af40928ed68d419a52dbd7280953c.svg\" width=\"641\" height=\"50\"\/><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0440\u0435\u0448\u0438\u0432 \u044d\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <em>P(X|T)<\/em>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P(X|T)=\\frac{P(C=A)}{P(C=T)}P(X|A)\\frac{P(C=T|X)}{1-P(C=T|X)}\" alt=\"P(X|T)=\\frac{P(C=A)}{P(C=T)}P(X|A)\\frac{P(C=T|X)}{1-P(C=T|X)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/510\/ccb\/f73\/510ccbf73eb4cdcd2b640173d8bee2f9.svg\" width=\"393\" height=\"50\"\/><\/p>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e CADE! \u041e\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439.<\/p>\n<ol>\n<li>\n<p>\u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{P(C=A)}{P(C=T)}\" alt=\"\\frac{P(C=A)}{P(C=T)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c5a\/e83\/360\/c5ae83360114140f99662bec90435487.svg\" width=\"91\" height=\"50\"\/><\/p>\n<ol start=\"2\">\n<li>\n<p>\u0418\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P(X|A)\" alt=\"P(X|A)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8e\/734\/314\/b8e7343149a8d11fcdd1db35a03bc76d.svg\" width=\"66\" height=\"22\"\/><\/p>\n<ol start=\"3\">\n<li>\n<p>\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430:<\/p>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{P(C=T|X)}{1-P(C=T|X)}\" alt=\"\\frac{P(C=T|X)}{1-P(C=T|X)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/667\/3d7\/a47\/6673d7a4704895a15d3326e7ebcbae06.svg\" width=\"145\" height=\"50\"\/><\/p>\n<p>\u0415\u0441\u043b\u0438 <em>P(X|A)<\/em>\u00a0\u2014 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c <em>A<\/em>\u00a0\u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0438\u0437\u00a0\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u043d\u0435\u00a0\u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430\u00a0\u043f\u043e\u0440\u044f\u0434\u043e\u043a). <\/p>\n<p>\u0415\u0441\u043b\u0438\u00a0\u0436\u0435 \u043c\u044b \u0443\u0433\u0430\u0434\u0430\u043b\u0438 \u0438 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 <em>P(X|A)<\/em> \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u043a <em>P(X|T),<\/em> \u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0435\u00a0\u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0.5. \u0422\u043e\u0433\u0434\u0430 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e <em>P(X|A).<\/em><\/p>\n<p>\u041f\u043e\u043a\u043e\u043d\u0447\u0438\u043c \u0441\u00a0\u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043e\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b CADE \u0431\u0435\u0437\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1dc\/8f2\/c88\/1dc8f2c88cbd220cb2101ea5856abb9b.gif\" alt=\"\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 &quot;\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438&quot; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438\" title=\"\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 &quot;\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438&quot; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438\" width=\"1776\" height=\"975\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1dc\/8f2\/c88\/1dc8f2c88cbd220cb2101ea5856abb9b.gif\"\/><\/p>\n<div><figcaption>\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 &#171;\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0432\u044b\u0448\u0435, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 [2] \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e\u00a0\u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u0438\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u00ab\u0448\u0443\u043c\u043d\u044b\u0445\u00bb \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u0410\u00a0\u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f <em>P(X|A)<\/em>, \u0447\u0442\u043e\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e CADE, \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0438\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0435, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u00a0\u043d\u0435\u043c \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 ROC AUC \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432. <\/p>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 CADE \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p>\u041d\u0430\u00a0\u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u043d\u0435\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 CADE \u043d\u0430\u00a0Python <em>(\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c CADE\u00a0\u2014 Compass\u2011aligned Distributional Embeddings, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <\/em><a href=\"https:\/\/pypi.org\/project\/cade\/\" rel=\"noopener noreferrer nofollow\"><em><u>\u0435\u0441\u0442\u044c \u0432\u00a0PyPI<\/u><\/em><\/a><em>).<\/em> \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u00a0Github (<a href=\"https:\/\/github.com\/AntonSarr\/cade-outliers\" rel=\"noopener noreferrer nofollow\"><u>cade\u2011outliers<\/u><\/a>), \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u00a0\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f!<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 <code>CADEOutliers<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430\u00a0\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438, \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"python\">import numpy as np   class CADEOutliers():     \"\"\"Class for outliers detection with CADE (Classifier Adjusted Density Estimation)\"\"\"          _supported_A_dist = [\"uniform\"]          def __init__(self, classifier, A_dist, A_size):         \"\"\"Create CADE outlier detection object.                  Parameters         ----------         classifier : model             sklearn classifier model supporting fit and predict_proba methods.                  A_dist : string             Distribution for generating artificial anomalies.                  A_size : float | int             If float, then the number of artifical anomalies is |X| * A_size, where X - analyzed data.              If int, then the number of artifical anomalies is just A_size.         \"\"\"         # Set classifier         self.classifier = classifier                  # Set the distribution kind         if A_dist not in self._supported_A_dist:             raise ValueError(f\"{A_dist} distribution is not supported yet for generating artifical anomalies. Choose from the following list: {self._supported_A_dist}\")         self.A_dist = A_dist                  # Set the number of artifical anomalies to generate         if isinstance(A_size, int) and A_size >= 1:             self.sample_size = A_size         elif isinstance(A_size, float) and A_size >= 0:             self.sample_size = None         else:             raise ValueError(\"A_size must be either int[1, inf) of float[0, inf)\")         self.A_size = A_size              def _generate_A(self, dist, attrs):         \"\"\"Generate artifical anomalies.                  Parameters         ----------         dist : string             Distribution for generating artificial anomalies.         attrs : dict             Key-value arguments for generating artifical anomalies.              If dist is \"uniform\", attrs = {'low': array, 'high': array, 'size': (sample_size, n_dim)} with min and high thresholds for each dimension.         \"\"\"         if dist == 'uniform':             generator = np.random.uniform         else:             raise ValueError(f\"{dist} distribution is not supported yet for generating artifical anomalies. Choose from the following list: {self._supported_A_dist}\")                  A = generator(**attrs)                  return A          def fit(self, X):         \"\"\"Fit the distribution of X.                  Parameters         ----------         X : np.ndarray             Array with samples         \"\"\"         if self.sample_size is None:             sample_size = int(len(X) * self.A_size) + 1         else:             sample_size = int(self.sample_size)                  if self.A_dist == 'uniform':             n_dim = X.shape[1]             attrs = {                 'low': X.min(axis=0),                 'high': X.max(axis=0),                 'size': (sample_size, n_dim)             }             # calculate uniform probability density             P_A = 1             for s in X.max(axis=0) - X.min(axis=0):                 if s == 0:                     s = 1                 P_A \/= s             self.P_A = lambda x: np.array([P_A] * x.shape[0])         else:             attrs = None                      A = self._generate_A(self.A_dist, attrs)                  combined_data = np.vstack([X, A])         target = np.hstack([np.zeros(X.shape[0]), np.ones(A.shape[0])])                  self.classifier.fit(combined_data, target)         self.A_X_ratio = A.shape[0] \/ X.shape[0]                       def get_ranking(self, X):         \"\"\"Return rankings for each sample in X.         Higher values indicate higher certainty that the point is an outlier.                  Parameters         ----------         X : np.ndarray             Array with samples         \"\"\"         predictions = self.classifier.predict_proba(X)[:, 0]                  anomaly_score = self.P_A(X) * self.A_X_ratio * (predictions \/ (1 - predictions + 1e-5))                  return anomaly_score<\/code><\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a \u043d\u0438\u043c CADE:<\/p>\n<pre><code class=\"python\">import numpy as np import seaborn as sns import matplotlib.pyplot as plt  from sklearn.metrics import roc_auc_score from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split  import CADEOutliers   # Generate data # X consists of a mix of 3 normal distributions # The 3rd is a small portion of anomalies X = np.vstack([2 * np.random.randn(5000, 2), 7 + np.random.randn(3000, 2), 25 + np.random.randn(100, 2)]) y = np.hstack([np.zeros(8000), np.ones(100)])  print('The shape of X: {}'.format(X.shape))  # Split the data into train and test part X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33)  # Create CADE outliers object with uniform distribution of artifical anomalies and with size of 100% of the given dataset cade = CADEOutliers(     classifier=RandomForestClassifier(max_depth=3),      A_dist='uniform',      A_size=1. )  # Fit probability density of X using X_train cade.fit(X_train)  # Get rankings for X_test. Lower values indicate higher similarity to outliers ranking_by_dens = cade.get_ranking(X_test)  print('ROC AUC of ranking anomalies by CADE on test data: {}'.format(roc_auc_score(y_test, -ranking_by_dens)))  fig, ax = plt.subplots(1, 1, figsize=(7, 7)) sns.scatterplot(x=X_test[:, 0], y=X_test[:, 1], hue=ranking_by_dens, ax=ax, palette='magma') plt.title('Points with rankings derived with CADE (low values indicate anomalies)') plt.show()<\/code><\/pre>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0434\u043b\u044f\u00a0\u0432\u0430\u0441:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043e\u043b\u0435\u0435 \u0441\u043a\u043b\u043e\u043d\u0435\u043d \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043a\u0438 \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438\u00bb (\u0434\u0430\u0436\u0435 \u0442\u0435, \u0447\u0442\u043e\u00a0\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f\u043c\u0438), \u0430\u00a0\u043b\u044e\u0431\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0431\u0435\u0437\u00a0\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u00a0\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438\u00a0\u2014 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 (\u0434\u0430\u0436\u0435 \u0442\u0435, \u0447\u0442\u043e\u00a0\u043b\u0435\u0436\u0430\u0442 \u0440\u044f\u0434\u043e\u043c \u0441\u00a0\u0443\u0432\u0438\u0434\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438). \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0432\u0435\u0434\u0435\u0442 \u043a\u00a0\u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044e \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0411\u00f3\u043b\u044c\u0448\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f\u043c\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u0435\u0434\u0435\u0442 \u043a\u00a0\u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442.\u00a0\u0435. \u043a\u00a0\u0442\u043e\u043c\u0443\u00a0\u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0443, \u0447\u0442\u043e\u00a0\u0438 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u00a0\u0441\u0442\u0430\u0442\u044c\u0438 [2]\u00a0\u2014 \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 Random Forest Classifier \u0438 KNN, \u0430\u00a0\u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439\u00a0\u2014 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 CADE \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438 \u0432\u0430\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u00a0\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0435. \u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043c\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u00a0\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445! <\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<p>[1] T. Hastie, R. Tibshirani, and J. H. Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. New York: Springer-Verlag, 2001.<\/p>\n<p>[2] <a href=\"https:\/\/seppe.net\/aa\/papers\/CADE.pdf\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/seppe.net\/aa\/papers\/CADE.pdf<\/u><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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\/articles\/812765\/\"> https:\/\/habr.com\/ru\/articles\/812765\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043a\u0430\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0432\u00a0\u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043a\u0430\u043a\u00a0\u043e\u0446\u0435\u043d\u043a\u0443 \u00ab\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438\u00bb \u0442\u043e\u0447\u0435\u043a. \u0418\u043d\u0442\u0443\u0438\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u00a0\u2014 \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u00a0\u0442\u043e\u0447\u043a\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u00ab\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u0430\u00bb. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u00a0\u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u0442\u043e\u0447\u0435\u043a. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043c\u044b, \u0432\u00a0\u043e\u0434\u043d\u043e\u0439 \u0438\u0437\u00a0\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u0437\u0430\u0434\u0430\u0447\u0438, \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0438 (\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0432 <em>\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438<\/em>) \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0438\u043c\u0438. \u041d\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0431\u043e\u043b\u0435\u0435 \u00ab\u0445\u0438\u0442\u0440\u044b\u0435\u00bb \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438 \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043d\u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u0451\u043b \u043d\u0430\u00a0\u043c\u0435\u043d\u044f \u043e\u0441\u043e\u0431\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0432\u043e\u0435\u0439 \u043c\u044b\u0441\u043b\u0438. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u00a0\u0425\u0430\u0431\u0440\u0435. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>CADE (Classifier Adjusted Density Estimation)<\/strong>, \u0438 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043e\u043d\u00a0\u0431\u044b\u043b \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u0435\u0449\u0435 \u0432 2001\u00a0\u0433\u043e\u0434\u0443 \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435 [1], \u0445\u043e\u0442\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u00a0\u0431\u044b\u043b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>CADE\u00a0\u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043d\u0435\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438. \u0427\u0442\u043e\u00a0\u0432\u0430\u0436\u043d\u043e, \u0434\u043b\u044f\u00a0\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u00a0\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u00a0\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f\u043c <a href=\"https:\/\/seppe.net\/aa\/papers\/CADE.pdf\" rel=\"noopener noreferrer nofollow\"><u>\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/u><\/a> [2], \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e\u00a0\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u00a0\u0442\u043e\u043c\u00a0\u0436\u0435 \u0443\u0440\u043e\u0432\u043d\u0435, \u0430\u00a0\u043f\u0440\u0438\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0434\u0430\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c <em>LOC (Local Outlier Factor)<\/em>\u00a0\u2014 \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 density\u2011based \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f\u00a0\u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439. \u0421\u0443\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b CADE \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u00a0\u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a. \u0418 \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f? \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c. <\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 CADE<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e CADE \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0421\u043c\u0435\u0448\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e (\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435) \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0\u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u0432\u0443\u0445\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0432\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a\u00a0\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u0437\u00a0\u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 <a href=\"https:\/\/seppe.net\/aa\/papers\/CADE.pdf\" rel=\"noopener noreferrer nofollow\"><u>\u0441\u0442\u0430\u0442\u044c\u0438<\/u><\/a> [2], \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438 \u043e\u043f\u0438\u0440\u0430\u043b\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c\u00a0\u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0435\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0435\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c <em>T<\/em>\u00a0\u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441 <em>\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439<\/em> \u0434\u043e\u043b\u0435\u0439 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439). <em>P(X|T)<\/em>\u00a0\u2014 \u0438\u0445 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e\u00a0\u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u00ab\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435\u00bb \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u0437\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u043a <em>A,<\/em> \u0430\u00a0\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00a0\u2014 <em>P(X|A)<\/em>. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0438\u043b\u0438\u00a0\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0445\u043e\u0442\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430\u00a0\u0432\u044b\u0431\u043e\u0440 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0442.\u00a0\u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u043b\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u0435\u0441\u0442\u044c\u00a0\u0431\u044b\u043b\u0430 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a\u00a0\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0427\u0442\u043e\u00a0\u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0442\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440, \u0440\u0430\u0432\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <em>T<\/em>, \u043e\u0434\u043d\u0430\u043a\u043e \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430\u00a0\u044d\u0442\u043e\u0442 \u0441\u0447\u0451\u0442 \u043f\u043e\u0437\u0436\u0435. \u0422\u043e\u0447\u043a\u0438 \u0438\u0437 <em>A<\/em> \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>\u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f\u043c\u0438<\/em>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433\u00a0\u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u043a\u00a0\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 <em>T<\/em>, \u0430\u00a0\u0438\u043c\u0435\u043d\u043d\u043e <em>P(C = T|X)<\/em>. \u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c Random Forest Classifier, KNN, Decision Tree Classifier, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043f\u043e\u00a0\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0441\u0443\u043c\u043c\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439\u00a0\u0431\u044b\u0442\u044c \u0432\u00a0\u043a\u043b\u0430\u0441\u0441\u0435 <em>T<\/em> \u0438 \u043a\u043b\u0430\u0441\u0441\u0435 <em>A<\/em> \u0440\u0430\u0432\u043d\u0430 1. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438:<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a\u00a0\u0432\u044b\u0432\u043e\u0434\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f\u00a0\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <em>P(X|T)<\/em>. \u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0442\u0435\u043e\u0440\u0435\u043c\u0443 \u0411\u0430\u0439\u0435\u0441\u0430 \u043a <em>P(C=T|X)<\/em>:<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0440\u0435\u0448\u0438\u0432 \u044d\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <em>P(X|T)<\/em>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e CADE! \u041e\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439.<\/p>\n<ol>\n<li>\n<p>\u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<\/li>\n<\/ol>\n<ol start=\"2\">\n<li>\n<p>\u0418\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<\/li>\n<\/ol>\n<ol start=\"3\">\n<li>\n<p>\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430:<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 <em>P(X|A)<\/em>\u00a0\u2014 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c <em>A<\/em>\u00a0\u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0438\u0437\u00a0\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u043d\u0435\u00a0\u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430\u00a0\u043f\u043e\u0440\u044f\u0434\u043e\u043a). <\/p>\n<p>\u0415\u0441\u043b\u0438\u00a0\u0436\u0435 \u043c\u044b \u0443\u0433\u0430\u0434\u0430\u043b\u0438 \u0438 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 <em>P(X|A)<\/em> \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u043a <em>P(X|T),<\/em> \u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0435\u00a0\u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0.5. \u0422\u043e\u0433\u0434\u0430 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e <em>P(X|A).<\/em><\/p>\n<p>\u041f\u043e\u043a\u043e\u043d\u0447\u0438\u043c \u0441\u00a0\u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043e\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b CADE \u0431\u0435\u0437\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 &#171;\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0432\u044b\u0448\u0435, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 [2] \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e\u00a0\u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u0438\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u00ab\u0448\u0443\u043c\u043d\u044b\u0445\u00bb \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u0410\u00a0\u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f <em>P(X|A)<\/em>, \u0447\u0442\u043e\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e CADE, \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0438\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0435, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u00a0\u043d\u0435\u043c \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 ROC AUC \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432. <\/p>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 CADE \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p>\u041d\u0430\u00a0\u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u043d\u0435\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 CADE \u043d\u0430\u00a0Python <em>(\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c CADE\u00a0\u2014 Compass\u2011aligned Distributional Embeddings, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <\/em><a href=\"https:\/\/pypi.org\/project\/cade\/\" rel=\"noopener noreferrer nofollow\"><em><u>\u0435\u0441\u0442\u044c \u0432\u00a0PyPI<\/u><\/em><\/a><em>).<\/em> \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u00a0Github (<a href=\"https:\/\/github.com\/AntonSarr\/cade-outliers\" rel=\"noopener noreferrer nofollow\"><u>cade\u2011outliers<\/u><\/a>), \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u00a0\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f!<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 <code>CADEOutliers<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430\u00a0\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438, \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"python\">import numpy as np   class CADEOutliers():     \"\"\"Class for outliers detection with CADE (Classifier Adjusted Density Estimation)\"\"\"          _supported_A_dist = [\"uniform\"]          def __init__(self, classifier, A_dist, A_size):         \"\"\"Create CADE outlier detection object.                  Parameters         ----------         classifier : model             sklearn classifier model supporting fit and predict_proba methods.                  A_dist : string             Distribution for generating artificial anomalies.                  A_size : float | int             If float, then the number of artifical anomalies is |X| * A_size, where X - analyzed data.              If int, then the number of artifical anomalies is just A_size.         \"\"\"         # Set classifier         self.classifier = classifier                  # Set the distribution kind         if A_dist not in self._supported_A_dist:             raise ValueError(f\"{A_dist} distribution is not supported yet for generating artifical anomalies. Choose from the following list: {self._supported_A_dist}\")         self.A_dist = A_dist                  # Set the number of artifical anomalies to generate         if isinstance(A_size, int) and A_size >= 1:             self.sample_size = A_size         elif isinstance(A_size, float) and A_size >= 0:             self.sample_size = None         else:             raise ValueError(\"A_size must be either int[1, inf) of float[0, inf)\")         self.A_size = A_size              def _generate_A(self, dist, attrs):         \"\"\"Generate artifical anomalies.                  Parameters         ----------         dist : string             Distribution for generating artificial anomalies.         attrs : dict             Key-value arguments for generating artifical anomalies.              If dist is \"uniform\", attrs = {'low': array, 'high': array, 'size': (sample_size, n_dim)} with min and high thresholds for each dimension.         \"\"\"         if dist == 'uniform':             generator = np.random.uniform         else:             raise ValueError(f\"{dist} distribution is not supported yet for generating artifical anomalies. Choose from the following list: {self._supported_A_dist}\")                  A = generator(**attrs)                  return A          def fit(self, X):         \"\"\"Fit the distribution of X.                  Parameters         ----------         X : np.ndarray             Array with samples         \"\"\"         if self.sample_size is None:             sample_size = int(len(X) * self.A_size) + 1         else:             sample_size = int(self.sample_size)                  if self.A_dist == 'uniform':             n_dim = X.shape[1]             attrs = {                 'low': X.min(axis=0),                 'high': X.max(axis=0),                 'size': (sample_size, n_dim)             }             # calculate uniform probability density             P_A = 1             for s in X.max(axis=0) - X.min(axis=0):                 if s == 0:                     s = 1                 P_A \/= s             self.P_A = lambda x: np.array([P_A] * x.shape[0])         else:             attrs = None                      A = self._generate_A(self.A_dist, attrs)                  combined_data = np.vstack([X, A])         target = np.hstack([np.zeros(X.shape[0]), np.ones(A.shape[0])])                  self.classifier.fit(combined_data, target)         self.A_X_ratio = A.shape[0] \/ X.shape[0]                       def get_ranking(self, X):         \"\"\"Return rankings for each sample in X.         Higher values indicate higher certainty that the point is an outlier.                  Parameters         ----------         X : np.ndarray             Array with samples         \"\"\"         predictions = self.classifier.predict_proba(X)[:, 0]                  anomaly_score = self.P_A(X) * self.A_X_ratio * (predictions \/ (1 - predictions<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-375587","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375587","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=375587"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375587\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=375587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=375587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=375587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}