{"id":454115,"date":"2025-04-01T16:20:22","date_gmt":"2025-04-01T16:20:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=454115"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=454115","title":{"rendered":"<span>SQL \u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438: \u0438\u0437\u0443\u0447\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0435\u0441\u043e\u0432<\/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<p>SQL \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432, \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0445 \u043b\u043e\u0433\u0438\u043a\u0438. SQL \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0432\u0435\u0441\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<div class=\"persona\"><img decoding=\"async\" class=\"image persona__image\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c49\/c1e\/e2a\/c49c1ee2ae2a9bba4570fbd6124ea62e.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c49\/c1e\/e2a\/c49c1ee2ae2a9bba4570fbd6124ea62e.png\"\/><\/p>\n<h5 class=\"persona__heading\">\u0414\u0435\u043d\u0438\u0441 \u041c\u0430\u043a\u0430\u0440\u0446\u0435\u0432<\/h5>\n<p>\u0418\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0420\u043e\u0441\u0441\u0435\u043b\u044c\u0445\u043e\u0437\u0431\u0430\u043d\u043a\u0435, \u0430\u0432\u0442\u043e\u0440 <a href=\"https:\/\/t.me\/it_koursy_obychenie\">\u043a\u0430\u043d\u0430\u043b\u0430<\/a> \u043e\u0431 IT-\u043a\u0443\u0440\u0441\u0430\u0445. <br \/>\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430.<\/p>\n<\/div>\n<p><a class=\"anchor\" name=\"0\" id=\"0\"><\/a><\/p>\n<p><strong>\u0414\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435:<\/strong><\/p>\n<ol>\n<li>\n<p><a href=\"#1\">\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0431\u0430\u0437\u0430: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0435\u0441\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#3\">\u041c\u0438\u043d\u0438\u043c\u0443\u043c SQL \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">\u0417\u0430\u0434\u0430\u0447\u0430 1. \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#5\">\u041a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u041a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#8\">\u0417\u0430\u0434\u0430\u0447\u0430 2. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#9\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#10\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#11\">\u041f\u043e\u0438\u0441\u043a \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043c\u0430\u043b\u044b\u0445 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#12\">\u041f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0430. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#13\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 1. \u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 SQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#14\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 2. \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#15\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DuckDB, ClickHouse \u0438 TimescaleDB<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#16\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#17\">\u0417\u0430\u0434\u0430\u0447\u0430 3. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#18\">\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#19\">\u0420\u0430\u0441\u0447\u0451\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#20\">\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#21\">\u0417\u0430\u0434\u0430\u0447\u0430 4. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#22\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043f\u043e\u0445\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#23\">\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#24\">\u041e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#25\">DuckDB \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#26\">\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435: \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443<\/a><\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0431\u0430\u0437\u0430: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0435\u0441\u0430<\/h3>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h4>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432. \u041e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0445, \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u044b\u0434\u0430\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0435\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b94\/f78\/f56\/b94f78f56f292a42d12ea02681ec08b3.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\" width=\"1200\" height=\"589\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b94\/f78\/f56\/b94f78f56f292a42d12ea02681ec08b3.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0435\u0441\u0430 \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438 \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0432\u0435\u0441, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u0440\u0442\u0438\u0440\u044b, \u043e\u0434\u0438\u043d \u043d\u0435\u0439\u0440\u043e\u043d \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043d\u0430\u0442. \u0412\u044b\u0441\u043e\u043a\u0438\u0439 \u0432\u0435\u0441 \u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u00ab\u0440\u0430\u0439\u043e\u043d\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440 \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u0446\u0435\u043d\u044b, \u0430 \u043d\u0438\u0437\u043a\u0438\u0439 \u2014 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0440\u043e\u043b\u0438.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043a\u043e\u0448\u0435\u043a \u0438 \u0441\u043e\u0431\u0430\u043a, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u0443\u0448\u0435\u0439, \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u043e\u0441\u0430, \u0446\u0432\u0435\u0442 \u0448\u0435\u0440\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/882\/b01\/881\/882b018819e7cdd791349bfc4681d38d.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\" width=\"1600\" height=\"721\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/882\/b01\/881\/882b018819e7cdd791349bfc4681d38d.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. <a href=\"https:\/\/www.researchgate.net\/figure\/Deep-learning-example-of-an-artificial-neural-network-where-an-image-is-pushed-through_fig1_370676547\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u044c. \u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u0447\u043d\u0451\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430\u0443\u0433\u0430\u0434, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u041a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438.\u00a0<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u041e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u0439 \u0440\u0438\u0441\u043a, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0430\u0451\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u00ab\u041e\u0434\u043e\u0431\u0440\u0435\u043d\u043e\u00bb \u0438\u043b\u0438 \u00ab\u041e\u0442\u043a\u0430\u0437\u0430\u043d\u043e\u00bb. \u041e\u043d \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0445\u043e\u0434\u0430, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0437\u0430\u0434\u043e\u043b\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/strong><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0444\u043e\u0442\u043e \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0441 \u0431\u0435\u043b\u044b\u043c \u0444\u043e\u043d\u043e\u043c, \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043d \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0444\u043e\u043d \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u044b\u0439 \u0438\u043b\u0438 \u0446\u0432\u0435\u0442\u043d\u043e\u0439, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0438\u043b\u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0441\u0430 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e.<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0435\u0451 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0435\u0441\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0440\u0435\u0437\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0443\u043f\u0438\u0442 \u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0442\u043e\u0432\u0430\u0440. \u041d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u043a\u043e \u0443\u043f\u0430\u043b\u0430, \u0430 \u0432\u0435\u0441\u0430 \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043a\u0430\u0447\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.<\/strong><\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u043b\u0438 \u043d\u0430 \u0441\u043d\u0438\u043c\u043a\u0430\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432. \u041d\u0430 \u0432\u0441\u0435\u0445 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445 \u0431\u043e\u043b\u044c\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u0434\u044f\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438. \u041c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0448\u0438\u043b\u0430, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0431\u043e\u043b\u0435\u0437\u043d\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0430\u043a\u0438\u0445 \u0441\u043d\u0438\u043c\u043a\u0430\u0445. \u041a\u043e\u0433\u0434\u0430 \u0435\u0439 \u0434\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0432\u043e\u0434\u044f\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043b\u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0445 \u0438 \u0431\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u2014 \u0432\u044b\u0431\u0440\u043e\u0441\u044b.\u00a0<\/strong><\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0438\u043b\u0438, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0431\u043b\u0438\u0437\u043a\u0438\u043c\u0438 \u043a \u043d\u0443\u043b\u044e. \u0422\u0430\u043a\u0438\u0435 \u0441\u043a\u0430\u0447\u043a\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u0445. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u044e\u043c\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c \u0430\u043d\u043a\u0435\u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0435\u0441\u043e\u0432, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u0442\u0430\u0436 \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0437\u043a\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440 \u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/em><\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \u044d\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c, \u0430 \u043c\u0430\u043b\u043e\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443.<\/p>\n<\/blockquote>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c. \u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u0435\u0434\u0451\u0442 \u043a \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u0442\u0435\u0440\u044f\u043c, \u0441\u0431\u043e\u0438 \u0432 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u2014 \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u0443, \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445 \u2014 \u043a \u0440\u0438\u0441\u043a\u0430\u043c \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0435\u0451 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445: \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u043e\u043d\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043b\u0438 \u043a \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0438 \u043d\u0435 \u0443\u0445\u0443\u0434\u0448\u0430\u044e\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0435\u0451 \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>\u041c\u0438\u043d\u0438\u043c\u0443\u043c SQL \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c, \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 SQL-\u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p><code>SELECT<\/code><strong> <\/strong>\u2014<strong> \u0432\u044b\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1 <\/strong>\u2192 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438:\u00a0<\/p>\n<pre><code class=\"sql\">SELECT * FROM weights;<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>weights<\/code>: \u0432\u0435\u0441\u0430, \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u043e\u0451\u0432 \u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2 <\/strong>\u2192 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c:\u00a0<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights WHERE layer = 3;<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0438 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p><code>WHERE<\/code> \u2014 <strong>\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 0.5:<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights WHERE weight &gt; 0.5;<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>weights<\/code>, \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 weight \u0431\u043e\u043b\u044c\u0448\u0435 0.5. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p><code>ORDER BY<\/code><strong> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e (ASC) \u0438\u043b\u0438 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e (DESC).<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 10 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438:<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights ORDER BY weight DESC LIMIT 10;<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p><code>GROUP BY<\/code><strong> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<\/strong><\/p>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u043f\u043e \u0441\u043b\u043e\u044f\u043c:<\/p>\n<pre><code class=\"sql\">SELECT layer, AVG(weight) FROM weights GROUP BY layer;<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0433\u0434\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><code>HAVING <\/code><strong>\u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438<\/strong><\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a WHERE, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b GROUP BY.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440:<\/strong> \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0438 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0432\u0435\u0441\u043e\u043c:<\/p>\n<pre><code class=\"sql\">SELECT layer, AVG(weight) FROM weights  GROUP BY layer HAVING AVG(weight) &gt; 0.2;<\/code><\/pre>\n<p>\u0421\u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435, \u0433\u0434\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 0.2.<\/p>\n<p><code>JOIN <\/code><strong>\u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0443\u0436\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 <\/strong>\u2192 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u043b\u043e\u044f\u0445 \u0438 \u0438\u0445 \u0432\u0435\u0441\u0430\u0445:<\/p>\n<pre><code class=\"sql\">SELECT layers.layer_number, weights.neuron, weights.weight FROM layers JOIN weights ON layers.id = weights.layer_id;<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>layers<\/code> \u0438 <code>weights<\/code> \u043f\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u0441\u043b\u043e\u044f (<code>layer_id<\/code>). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432, \u0438\u0445 \u0432\u0435\u0441\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442.\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c SQL \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 1. \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0412\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0432 \u0444\u0430\u0439\u043b\u044b <code>.pt<\/code> \u2014 PyTorch \u0438\u043b\u0438 <code>.h5<\/code> \u2014 TensorFlow. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451, \u043d\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0418 \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0441\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u043e<\/strong>. \u0418\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c, \u043a\u0430\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043a\u043e\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u0440\u043c\u0430\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. <\/strong>\u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. <\/strong>\u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0438\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0441\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b.\u00a0<\/p>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h4>\u041a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/h4>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0435\u0441\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 <strong>\u043c\u0430\u0442\u0440\u0438\u0446<\/strong> \u2014 \u0442\u0430\u0431\u043b\u0438\u0446, \u0433\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432, \u0438\u043b\u0438 <strong>\u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432<\/strong> \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043c\u043e\u0434\u0435\u043b\u0438. \u042d\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0443\u0434\u043e\u0431\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043d\u043e \u0441 \u043d\u0438\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0438\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0412 SQL \u0432\u0435\u0441\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438\u043d\u0430\u0447\u0435 \u2014 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438, \u0441\u043b\u043e\u044f \u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u0430:<\/p>\n<ul>\n<li>\n<p><strong>model_id<\/strong> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>layer<\/strong> \u2014 \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0435\u0441;<\/p>\n<\/li>\n<li>\n<p><strong>neuron<\/strong> \u2014 \u043d\u043e\u043c\u0435\u0440 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043b\u043e\u044f;<\/p>\n<\/li>\n<li>\n<p><strong>weight<\/strong> \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 PostgreSQL:<\/p>\n<pre><code class=\"sql\">CREATE TABLE weights (     id SERIAL PRIMARY KEY,      model_id INTEGER NOT NULL,       layer INTEGER NOT NULL,       neuron INTEGER NOT NULL,       weight FLOAT NOT NULL   );<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0441 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>model_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"left\"><strong>neuron<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.23<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.45<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.78<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c<\/h4>\n<p>\u041e\u0434\u0438\u043d \u0432\u0435\u0441 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0438 \u043e \u0447\u0451\u043c \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442. \u0427\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<ul>\n<li>\n<p><strong>id<\/strong> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>architecture<\/strong> \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438: \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0451\u0432, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>learning_rate<\/strong> \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><strong>batch_size<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0438\u043d\u0438-\u0431\u0430\u0442\u0447\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>trained_at<\/strong> \u2014 \u0434\u0430\u0442\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f).<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<pre><code class=\"sql\">CREATE TABLE models (     id SERIAL PRIMARY KEY,     architecture TEXT NOT NULL,     learning_rate FLOAT NOT NULL,     batch_size INTEGER NOT NULL,     trained_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435 <code>model_id<\/code>.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<h4>\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL\u00a0<\/h4>\n<p>\u041c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438, \u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0442\u044b\u0441\u044f\u0447\u0438 \u0438\u043b\u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0438\u0437 Pandas \u0432 SQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLAlchemy.<\/p>\n<p>\u041e\u043d\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Python, \u043d\u043e \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<pre><code class=\"bash\">pip install sqlalchemy<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 PostgreSQL, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\">pip install psycopg2<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0435\u0441\u043e\u0432:<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd from sqlalchemy import create_engine  # \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445: \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 DataFrame data = {     \"model_id\": [1, 1, 1],     \"layer\": [1, 1, 2],     \"neuron\": [1, 2, 1],     \"weight\": [0.23, -0.45, 0.78] } df = pd.DataFrame(data)  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL engine = create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")  # \u0417\u0430\u043f\u0438\u0441\u044c \u0432\u0435\u0441\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 df.to_sql(\"weights\", engine, if_exists=\"append\", index=False)<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430: <\/strong><\/p>\n<ul>\n<li>\n<p><code>pd.DataFrame(data)<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p><code>create_engine(\"postgresql:\/\/user:password@localhost\/dbname\") <\/code>\u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>user<\/code>, <code>password<\/code>, <code>localhost<\/code>, <code>dbname<\/code> \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b;<\/p>\n<\/li>\n<li>\n<p><code>df.to_sql(\"weights\", engine, if_exists=\"append\", index=False)<\/code> \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>weights<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>if_exists=\"append\"<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0435\u0451;<\/p>\n<\/li>\n<li>\n<p><code>index=False<\/code> \u2014 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 Pandas, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 SQL \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>id<\/code>.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 2. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0441\u043b\u043e\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u2014 \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0442\u044c, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u0430 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"9\" id=\"9\"><\/a><\/p>\n<h4>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044f\u043c<\/h4>\n<p>\u0427\u0430\u0441\u0442\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0432\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0441\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0441\u043b\u043e\u044f. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430 1<\/strong>: \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"sql\">SELECT * FROM weights WHERE model_id = 1;<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>weights<\/code>, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 <code>model_id = 1<\/code>.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430 2<\/strong>: \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0438\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0442\u043e\u0440\u043e\u0433\u043e.<\/p>\n<pre><code class=\"sql\">SELECT * FROM weights WHERE model_id = 1 AND layer = 2;<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043f\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043c\u043e\u0434\u0435\u043b\u0438 1 \u0438 \u0441\u043b\u043e\u044e 2.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"10\" id=\"10\"><\/a><\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u0435\u0442 \u043b\u0438 \u0441\u043b\u043e\u0435\u0432 \u0441 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u0430\u0431\u044b\u043c \u0432\u043b\u0438\u044f\u043d\u0438\u0435\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p><strong>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/strong><\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0443 \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0451\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0438\u043b\u0438 \u043d\u0438\u0437\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043a\u043b\u0430\u0434 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430:<\/strong> \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 <code>model_id = 1<\/code>.<\/p>\n<pre><code class=\"sql\">SELECT layer, AVG(weight) AS avg_weight FROM weights WHERE model_id = 1 GROUP BY layer;<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0441\u043b\u043e\u044f \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u043d\u0443\u043b\u044e, \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0432 \u043d\u0451\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u043d\u043e\u0441\u044f\u0442 \u0432\u043a\u043b\u0430\u0434 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0433\u0434\u0430 \u0443 \u0441\u043b\u043e\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432\u044b\u0448\u0435 \u0438\u043b\u0438 \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 \u0434\u0440\u0443\u0433\u0438\u0445, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u043d \u0438\u0433\u0440\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u043e\u043b\u044c \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.15<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.02<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.45<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0443 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0441\u043b\u043e\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0443 \u0434\u0440\u0443\u0433\u0438\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.\u00a0<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<p><strong>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430:<\/strong> \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 <code>model_id = 1<\/code>.<\/p>\n<pre><code class=\"sql\">SELECT layer, STDDEV(weight) AS std_weight FROM weights WHERE model_id = 1 GROUP BY layer;<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0435\u0441\u0430 \u0441\u043b\u043e\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u2014 \u0441\u043b\u043e\u0439 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0440\u043e\u043b\u0438.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.05<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.20<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.03<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0423 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u043e\u044f (<code>layer = 2<\/code>) \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u043b\u043e\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"11\" id=\"11\"><\/a><\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043c\u0430\u043b\u044b\u0445 \u0432\u0435\u0441\u043e\u0432<\/h4>\n<p>\u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445, \u043c\u043e\u0433\u0443\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043d\u0438\u0436\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1: <\/strong>\u043d\u0430\u0439\u0434\u0451\u043c 10 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0432\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u043b\u043e\u044f\u043c.<\/p>\n<pre><code class=\"sql\">-- \u041d\u0430\u0439\u0442\u0438 10 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 SELECT weight  FROM weights  ORDER BY weight DESC  LIMIT 10;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>ORDER BY weight DESC<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044f (\u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a \u043c\u0435\u043d\u044c\u0448\u0438\u043c).<\/p>\n<\/li>\n<li>\n<p><code>LIMIT 10<\/code> \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2: <\/strong>\u043d\u0430\u0439\u0434\u0451\u043c 10 \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0432\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 <code>ASC<\/code>:<\/p>\n<pre><code class=\"sql\">SELECT weight  FROM weights  ORDER BY weight ASC  LIMIT 10;<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 10 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 10 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>UNION ALL<\/code>:<\/p>\n<pre><code class=\"sql\">(SELECT weight FROM weights ORDER BY weight DESC LIMIT 10)  UNION ALL (SELECT weight FROM weights ORDER BY weight ASC LIMIT 10);<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 <code>SELECT weight<\/code> \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 (<code>ORDER BY weight DESC<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 <code>SELECT weight<\/code> \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 (<code>ORDER BY weight ASC<\/code>).<\/p>\n<\/li>\n<li>\n<p><code>UNION ALL<\/code> \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043e\u0431\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0435\u0437 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><strong>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043c\u0430\u043b\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u0432\u044b\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <strong>\u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong> \u0438 <strong>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435<\/strong>.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u0432\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 + 3 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e &#8212; 3 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0441 <code>UNION ALL<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p><strong>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u0434:<\/strong><\/p>\n<pre><code class=\"sql\">(SELECT weight   FROM weights   WHERE weight &gt; (SELECT AVG(weight) + 3 * STDDEV(weight) FROM weights))  UNION ALL  (SELECT weight   FROM weights   WHERE weight &lt; (SELECT AVG(weight) - 3 * STDDEV(weight) FROM weights));<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/strong><\/p>\n<p><strong>\u041a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p><code>AVG(weight)<\/code> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p><code>STDDEV(weight)<\/code> \u2014 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>AVG(weight) + 3 * STDDEV(weight)<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432. \u0412\u0435\u0441\u0430 \u0432\u044b\u0448\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>AVG(weight) - 3 * STDDEV(weight)<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432. \u0412\u0435\u0441\u0430 \u043d\u0438\u0436\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 <code>SELECT weight<\/code> \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u0432\u0435\u0441\u0430, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u043e\u0440\u043e\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 <code>SELECT weight<\/code> \u2014 \u0438\u0449\u0435\u0442 \u0432\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430.<\/p>\n<\/li>\n<li>\n<p><code>UNION ALL<\/code> \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u043e\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2.45<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2.38<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2.31<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-1.92<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-2.05<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-2.15<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0417\u0434\u0435\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>2.45, 2.38, 2.31<\/strong> \u2014 \u044d\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u0435\u0441\u0430, \u0430 <strong>-1.92, -2.05, -2.15<\/strong> \u2014 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u044b\u0435.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"12\" id=\"12\"><\/a><\/p>\n<h3>\u041f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0430. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0435\u0441\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u0415\u0441\u043b\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437.<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Python, \u0430 \u043d\u0435 \u0432 SQL, \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437 \u043d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0411\u0414 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u2014 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<p><a class=\"anchor\" name=\"13\" id=\"13\"><\/a><\/p>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 1. \u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 SQL<\/h4>\n<p>\u0427\u0430\u0441\u0442\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u2014 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 Python, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442 \u043b\u0438\u0448\u043d\u044e\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p><strong>\u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0432 Python):<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd import sqlalchemy  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL engine = sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 \u0432 Pandas df = pd.read_sql(\"SELECT * FROM weights\", engine)  # \u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0441\u0430 \u0441\u043b\u043e\u044f 2 \u0443\u0436\u0435 \u0432 Python filtered_df = df[df[\"layer\"] == 2]<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0430\u043a:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0411\u0430\u0437\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>Python \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0445\u043e\u0442\u044f SQL \u043c\u043e\u0433 \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0432 SQL<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"sql\"># \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u0438, \u0433\u0434\u0435 layer = 2 df = pd.read_sql(\"SELECT * FROM weights WHERE layer = 2\", engine)<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0431\u0430\u0437\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0432 Python \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441 HAVING<\/strong><\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u0443\u0436\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u0435\u0435 100 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432.<\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">SELECT layer, COUNT(neuron) AS neuron_count   FROM weights   GROUP BY layer   HAVING COUNT(neuron) &gt; 100;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>GROUP BY layer<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0441\u043b\u043e\u044f\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><code>COUNT(neuron) AS neuron_count<\/code> \u2014 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435.<\/p>\n<\/li>\n<li>\n<p><code>HAVING COUNT(neuron) &gt; 100<\/code> \u2014 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u043b\u043e\u0438, \u0433\u0434\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 100.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 Python, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 SQL \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u043b\u0438\u0448\u043d\u0435\u0435.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"14\" id=\"14\"><\/a><\/p>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 2. \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<pre><code class=\"sql\">SELECT * FROM weights WHERE model_id = 1 AND layer = 2;<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0430\u043a: <\/strong>\u0435\u0441\u043b\u0438 <code>weights<\/code> \u2014 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0431\u0430\u0437\u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0435. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0435\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u00a0<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u043f\u043e\u0438\u0441\u043a:<\/p>\n<pre><code class=\"sql\">CREATE INDEX idx_weights_model_layer  ON weights (model_id, layer);<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0430\u0437\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e <code>model_id<\/code>\u0438 <code>layer<\/code>, \u0438 \u043f\u043e\u0438\u0441\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<pre><code class=\"sql\">SELECT * FROM weights WHERE model_id = 1 AND layer = 2;<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0431\u0430\u0437\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0438 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"15\" id=\"15\"><\/a><\/p>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DuckDB, ClickHouse \u0438 TimescaleDB<\/h4>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438 \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DuckDB \u2014 \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0451\u043c\u0430\u043c\u0438 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 ClickHouse, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0410 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c TimescaleDB.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p><strong>1. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0434\u0432\u0438\u0436\u043a\u043e\u043c DuckDB<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0432 Pandas DataFrame \u0438 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DuckDB. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0431\u043e\u0440\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a Pandas DataFrame \u0447\u0435\u0440\u0435\u0437 DuckDB<\/strong><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"bash\">pip install duckdb pandas<\/code><\/pre>\n<p>\u041f\u0438\u0448\u0435\u043c \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">import duckdb import pandas as pd  # \u0421\u043e\u0437\u0434\u0430\u0451\u043c DataFrame \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 data = {     \"model_id\": [1, 1, 1, 2, 2],       \"layer\": [1, 1, 2, 1, 2],       \"neuron\": [1, 2, 1, 3, 4],       \"weight\": [0.23, -0.45, 0.78, 1.2, -0.9]   } df = pd.DataFrame(data)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a DataFrame \u0447\u0435\u0440\u0435\u0437 DuckDB result = duckdb.query(\"\"\"     SELECT model_id, AVG(weight) AS avg_weight       FROM df       GROUP BY model_id   \"\"\").df()  print(result)  # \u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>pd.DataFrame(data)<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 DataFrame \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code>duckdb.query(...)<\/code> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY model_id<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><code>.df()<\/code> \u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 Pandas DataFrame.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>model_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.05<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.20<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u2014 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441, \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043a \u043d\u0443\u043b\u044e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><strong>\u00a02. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0430\u0437\u044b ClickHouse<\/strong><\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0451 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ClickHouse. \u042d\u0442\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0411\u0414 \u0437\u0430 \u0441\u0447\u0451\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432 \u0432 ClickHouse:<\/strong><\/p>\n<pre><code class=\"sql\">SELECT model_id,               layer,                  AVG(weight) AS avg_weight   FROM weights            GROUP BY model_id, layer   ORDER BY model_id, layer;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>model_id<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><code>layer<\/code> \u2014 \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c.<\/p>\n<\/li>\n<li>\n<p><code>AVG(weight) AS avg_weight<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY model_id, layer<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044e.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY model_id, layer<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>model_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.12<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.34<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.78<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.22<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.45<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.31<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435:<\/strong> \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 1 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 <strong>0.12<\/strong>, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 <strong>-0.34<\/strong>. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/strong> \u0435\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0441\u043b\u043e\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0430\u0447\u0435, \u0447\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435, \u0438\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u043e\u0451\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u0431\u0440\u043e\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u044f\u043c\u0438:<\/strong> \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 2 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 <strong>-0.22<\/strong>, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 <strong>0.45<\/strong>. \u042d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0434\u0438\u043d, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0438\u0445 \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><strong>3. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TimescaleDB<\/strong><\/p>\n<p>TimescaleDB \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. TimescaleDB \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0438\u0445 \u0437\u0430 \u0441\u0447\u0451\u0442:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b (sharding) \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0436\u0430\u0442\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u043c\u0435\u0441\u0442\u043e \u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0434\u0438\u0441\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u2014 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c PostgreSQL.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f TimescaleDB<\/strong><\/p>\n<pre><code class=\"sql\">-- \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0441 \u043e\u0442\u043c\u0435\u0442\u043a\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 CREATE TABLE weights_timeseries (     time TIMESTAMPTZ NOT NULL,  -- \u0412\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u0438     model_id INT,               -- \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438     layer INT,                  -- \u041d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f     weight FLOAT                -- \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 );  -- \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0433\u0438\u043f\u0435\u0440\u0442\u0430\u0431\u043b\u0438\u0446\u0443 TimescaleDB SELECT create_hypertable('weights_timeseries', 'time');  -- \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 (\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438) INSERT INTO weights_timeseries (time, model_id, layer, weight) VALUES      ('2024-03-12 10:00:00', 1, 1, 0.23),     ('2024-03-12 10:05:00', 1, 1, -0.45),     ('2024-03-12 10:10:00', 1, 2, 0.78);  -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 24 \u0447\u0430\u0441\u0430 SELECT AVG(weight) AS avg_weight FROM weights_timeseries WHERE time &gt; now() - interval '1 day';<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>CREATE TABLE weights_timeseries (...)<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>SELECT create_hypertable('weights_timeseries', 'time')<\/code> \u2014 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0433\u0438\u043f\u0435\u0440\u0442\u0430\u0431\u043b\u0438\u0446\u0443 TimescaleDB, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><code>INSERT INTO weights_timeseries (...)<\/code> \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043c\u0435\u0442\u043a\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><code>SELECT AVG(weight) FROM weights_timeseries WHERE time &gt; now() - interval '1 day'<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 24 \u0447\u0430\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0441\u043e\u0432 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 24 \u0447\u0430\u0441\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"3\">\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p align=\"left\">0.187<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043d\u0443\u043b\u044e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0441\u043b\u043e1\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0441 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p><em>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a \u2014 \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0443. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u0437\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439: \u043e\u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0448\u0443\u043c\u044b, \u0430 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438.<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TimescaleDB \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0432\u0441\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"16\" id=\"16\"><\/a><\/p>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0435\u0441\u043e\u0432 (<code>weights<\/code>) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u043a, \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043d\u043e\u0432\u043e. \u042d\u0442\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<pre><code class=\"sql\">SELECT      model_id,                    layer,                       AVG(weight) AS avg_weight   FROM weights                 GROUP BY model_id, layer;<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u043d\u0435 \u0442\u0430\u043a:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0431\u0430\u0437\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0441\u0442\u0440\u043e\u043a, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u043d\u043e\u0432\u0430 \u0438 \u0441\u043d\u043e\u0432\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432 (precomputed aggregates).\u00a0<\/p>\n<pre><code class=\"sql\">CREATE TABLE weight_aggregates AS   SELECT      model_id,                       layer,                          AVG(weight) AS avg_weight,      MAX(weight) AS max_weight,      MIN(weight) AS min_weight   FROM weights                    GROUP BY model_id, layer;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>CREATE TABLE weight_aggregates AS SELECT ...<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>AVG(weight) AS avg_weight<\/code> \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u043f\u043e \u0441\u043b\u043e\u044f\u043c \u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c.<\/p>\n<\/li>\n<li>\n<p><code>MAX(weight) AS max_weight<\/code> \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u0432 \u0441\u043b\u043e\u0435.<\/p>\n<\/li>\n<li>\n<p><code>MIN(weight) AS min_weight<\/code> \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441 \u0432 \u0441\u043b\u043e\u0435.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY model_id, layer<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0435\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"sql\">-- \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u0447\u0451\u0442\u0430 SELECT * FROM weight_aggregates WHERE model_id = 1;<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0447\u0451\u0442, \u0447\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"17\" id=\"17\"><\/a><\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 3. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h3>\n<p>SQL \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432: \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u0441\u0430 \u0443\u0436\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435, \u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c, \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p><a class=\"anchor\" name=\"18\" id=\"18\"><\/a><\/p>\n<h4>\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/h4>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430.<\/p>\n<pre><code class=\"sql\">-- \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 SELECT layer, AVG(weight) AS avg_weight   FROM weights                              WHERE model_id = 1                        GROUP BY layer                            ORDER BY layer;<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.12<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.25<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.33<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b: \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u043e\u0451\u0432, \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u2014 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0441\u043b\u043e\u044f.<\/p>\n<p><strong>\u041a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 SQL, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Pandas, Matplotlib \u0438 Seaborn.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd   import matplotlib.pyplot as plt   import seaborn as sns   import sqlalchemy    # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL engine = sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Pandas DataFrame df = pd.read_sql(\"\"\"     SELECT layer, AVG(weight) AS avg_weight       FROM weights                                  GROUP BY layer                                ORDER BY layer; \"\"\", engine)  # \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 plt.figure(figsize=(8, 5)) sns.barplot(x=df[\"layer\"], y=df[\"avg_weight\"], palette=\"viridis\")    # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438 plt.xlabel(\"\u0421\u043b\u043e\u0439\")   plt.ylabel(\"\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441\")   plt.title(\"\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c\")    # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a plt.show()<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")<\/code> \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435 PostgreSQL.<\/p>\n<\/li>\n<li>\n<p><code>pd.read_sql(...)<\/code> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DataFrame.<\/p>\n<\/li>\n<li>\n<p><code>sns.barplot(x=df[\"layer\"], y=df[\"avg_weight\"], palette=\"viridis\")<\/code> \u2014 \u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443, \u0433\u0434\u0435 X \u2014 \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f, Y \u2014 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p><code>plt.xlabel(\"\u0421\u043b\u043e\u0439\")<\/code>, <code>plt.ylabel(\"\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441\")<\/code>, <code>plt.title(\"\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c\")<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p><code>plt.show()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/strong><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f psycopg2 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 SQLAlchemy.<\/p>\n<pre><code class=\"bash\">pip install pandas matplotlib seaborn sqlalchemy psycopg2<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <code>create_engine()<\/code> \u043d\u0430 \u0441\u0432\u043e\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u0434 \u0432 Jupyter Notebook, Google Colab \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e4e\/f33\/81c\/e4ef3381c34880e69c32346b37a50342.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" width=\"1415\" height=\"947\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e4e\/f33\/81c\/e4ef3381c34880e69c32346b37a50342.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"19\" id=\"19\"><\/a><\/p>\n<h4>\u0420\u0430\u0441\u0447\u0451\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/h4>\n<p>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0433\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u0435\u0441\u0430\u0445, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u0435\u043b\u0438\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043f\u043e\u043b\u0430\u043c.<\/p>\n<p>\u041c\u0435\u0434\u0438\u0430\u043d\u0430 \u043d\u0435 \u0438\u0441\u043a\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438, \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0441\u043b\u043e\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<p><strong>SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u044b:<\/strong><\/p>\n<pre><code class=\"sql\">SELECT layer,                                                           PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY weight)           AS median_weight                                         FROM weights WHERE model_id = 1                                                GROUP BY layer                                                    ORDER BY layer;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY weight)<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 (50-\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0438\u043b\u044c).<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY layer<\/code> \u2014 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f.<\/p>\n<\/li>\n<li>\n<p><code>WHERE model_id = 1<\/code> \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY layer<\/code> \u2014 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u0441\u043b\u043e\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.14<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.20<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.30<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u044f\u043c\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2014 \u043e\u043d \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u044f\u043c\u0438.<\/p>\n<p><strong>Python-\u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd   import matplotlib.pyplot as plt   import seaborn as sns   import sqlalchemy    # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 PostgreSQL engine = sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Pandas DataFrame df = pd.read_sql(\"\"\"     SELECT layer,             PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY weight) AS median_weight     FROM weights     WHERE model_id = 1     GROUP BY layer     ORDER BY layer; \"\"\", engine)  # \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a plt.figure(figsize=(8, 5)) sns.lineplot(x=df[\"layer\"], y=df[\"median_weight\"], marker=\"o\", linestyle=\"-\", color=\"b\")  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438 plt.xlabel(\"\u0421\u043b\u043e\u0439\")   plt.ylabel(\"\u041c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0441\")   plt.title(\"\u041c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c\")    # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a plt.show()<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")<\/code> \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435 PostgreSQL.<\/p>\n<\/li>\n<li>\n<p><code>pd.read_sql(...)<\/code> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Pandas DataFrame.<\/p>\n<\/li>\n<li>\n<p><code>sns.lineplot(x=df[\"layer\"]<\/code>, <code>y=df[\"median_weight\"]<\/code>, <code>marker=\"o\", linestyle=\"-\"<\/code>, <code>color=\"b\")<\/code> \u2014 \u0441\u0442\u0440\u043e\u0438\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>plt.xlabel(\"\u0421\u043b\u043e\u0439\")<\/code> \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u044c X.<\/p>\n<\/li>\n<li>\n<p><code>plt.ylabel(\"\u041c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0441\")<\/code> \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u044c Y.<\/p>\n<\/li>\n<li>\n<p><code>plt.title(\"\u041c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c\")<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p><code>plt.show()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/strong><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f psycopg2 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 SQLAlchemy.<\/p>\n<pre><code class=\"bash\">pip install pandas matplotlib seaborn sqlalchemy psycopg2<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <code>create_engine()<\/code> \u043d\u0430 \u0441\u0432\u043e\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u0434 \u0432 Jupyter Notebook, Google Colab \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ac\/5c5\/235\/8ac5c5235915d72822f43c99cf590c8d.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" width=\"1415\" height=\"947\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ac\/5c5\/235\/8ac5c5235915d72822f43c99cf590c8d.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<p><a class=\"anchor\" name=\"20\" id=\"20\"><\/a><\/p>\n<h4>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0432\u0435\u0441\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u041e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432\u0435\u0441\u0430 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<pre><code class=\"sql\">SELECT width_bucket(weight, -1, 1, 10) AS bucket, -- \u0434\u0435\u043b\u0438\u043c \u0432\u0435\u0441\u0430 \u043d\u0430 10 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u043e\u0442 -1 \u0434\u043e 1        COUNT(*) AS weight_count                   -- \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 FROM weights WHERE model_id = 1 GROUP BY bucket ORDER BY bucket;<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>width_bucket(weight, -1, 1, 10)<\/code> \u2014 \u0434\u0435\u043b\u0438\u0442 \u0432\u0435\u0441\u0430 \u043d\u0430 10 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043e\u0442 -1 \u0434\u043e 1.<\/p>\n<\/li>\n<li>\n<p><code>COUNT(*) AS weight_count <\/code>\u2014 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d.<\/p>\n<\/li>\n<li>\n<p><code>WHERE model_id = 1<\/code> \u2014 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0441\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY bucket<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0441\u0430 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY bucket<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>avg_weight<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">15<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">30<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<td>\n<p align=\"left\">70<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">6<\/p>\n<\/td>\n<td>\n<p align=\"left\">60<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">7<\/p>\n<\/td>\n<td>\n<p align=\"left\">40<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">8<\/p>\n<\/td>\n<td>\n<p align=\"left\">25<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">9<\/p>\n<\/td>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Matplotlib \u0438 Seaborn.<\/p>\n<pre><code class=\"python\">import pandas as pd   import matplotlib.pyplot as plt   import seaborn as sns   import sqlalchemy    # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 PostgreSQL engine = sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Pandas DataFrame df = pd.read_sql(\"\"\"     SELECT width_bucket(weight, -1, 1, 10) AS bucket, COUNT(*) AS weight_count     FROM weights     WHERE model_id = 1     GROUP BY bucket     ORDER BY bucket; \"\"\", engine)  # \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 plt.figure(figsize=(8, 5)) sns.barplot(x=df[\"bucket\"], y=df[\"weight_count\"], palette=\"magma\")  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438 plt.xlabel(\"\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432\u0435\u0441\u043e\u0432\")   plt.ylabel(\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432\")   plt.title(\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\")    # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a plt.show()<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>sqlalchemy.create_engine(\"postgresql:\/\/user:password@localhost\/dbname\")<\/code> \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435 PostgreSQL.<\/p>\n<\/li>\n<li>\n<p><code>pd.read_sql(...)<\/code> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Pandas DataFrame.<\/p>\n<\/li>\n<li>\n<p><code>sns.barplot(x=df[\"bucket\"]<\/code>, <code>y=df[\"weight_count\"]<\/code>, <code>palette=\"magma\")<\/code> \u2014 \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>plt.xlabel(\"\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432\u0435\u0441\u043e\u0432\")<\/code> \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u044c X.<\/p>\n<\/li>\n<li>\n<p><code>plt.ylabel(\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432\")<\/code> \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u044c Y.<\/p>\n<\/li>\n<li>\n<p><code>plt.title(\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\")<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p><code>plt.show()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/strong><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f psycopg2 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 SQLAlchemy.<\/p>\n<pre><code class=\"bash\">pip install pandas matplotlib seaborn sqlalchemy psycopg2<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <code>create_engine()<\/code> \u043d\u0430 \u0441\u0432\u043e\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u0434 \u0432 Jupyter Notebook, Google Colab \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d5\/208\/f69\/4d5208f6995f8827f465b9e627fef599.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" width=\"1376\" height=\"947\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4d5\/208\/f69\/4d5208f6995f8827f465b9e627fef599.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"21\" id=\"21\"><\/a><\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 4. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/h3>\n<p>SQL \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u043e \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043f\u043e\u0445\u0430\u0445.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>\u041d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435: <\/strong>\u0435\u0441\u043b\u0438 \u0432\u0435\u0441\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u043b\u0438 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: <\/strong>\u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u0437\u043a\u0438\u0435, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438 \u043f\u043e\u0434 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f (\u0448\u0443\u043c).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"22\" id=\"22\"><\/a><\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043f\u043e\u0445\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u044d\u043f\u043e\u0445\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"sql\">SELECT w1.layer, w1.neuron,          w2.weight - w1.weight AS weight_change   FROM weights w1   JOIN weights w2   ON w1.model_id = w2.model_id   AND w1.layer = w2.layer   AND w1.neuron = w2.neuron   WHERE w1.epoch = 10   AND w2.epoch = 20   ORDER BY weight_change DESC;<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<ol>\n<li>\n<p><code>JOIN weights w2 ON w1.model_id = w2.model_id ...<\/code> \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0435\u0441\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043f\u043e\u0445\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>WHERE w1.epoch = 10 AND w2.epoch = 20<\/code> \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u043d\u0430 10-\u0439 \u0438 20-\u0439 \u044d\u043f\u043e\u0445\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>w2.weight - w1.weight AS weight_change <\/code>\u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0432\u0435\u0441\u0430\u0445 \u043c\u0435\u0436\u0434\u0443 \u044d\u043f\u043e\u0445\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY weight_change DESC<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0442 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a \u0441\u0430\u043c\u044b\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>neuron<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>weight_change<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.05<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.12<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.30<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0.50<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f (0.05) \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0447\u0442\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0443\u0447\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u043a\u0438\u0435 \u0441\u043a\u0430\u0447\u043a\u0438 (-0.50) \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e, \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043b\u043e\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a:<\/p>\n<ul>\n<li>\n<p>\u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"23\" id=\"23\"><\/a><\/p>\n<h4>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432\u0435\u0441\u043e\u0432<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e \u0432\u0435\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u043f\u043e\u0445\u0430\u043c\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043b\u0438\u0431\u043e \u0434\u043e\u0441\u0442\u0438\u0433 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<p>SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u044d\u043f\u043e\u0445\u0430\u043c\u0438 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043f\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"sql\">SELECT w1.layer, w1.neuron,          ABS(w2.weight - w1.weight) AS weight_change   FROM weights w1   JOIN weights w2   ON w1.model_id = w2.model_id   AND w1.layer = w2.layer   AND w1.neuron = w2.neuron   WHERE w1.epoch = 10   AND w2.epoch = 20   ORDER BY weight_change ASC;<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<ol>\n<li>\n<p><code>ABS(w2.weight - w1.weight) AS weight_change<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0432\u0435\u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY weight_change ASC<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0435\u0441\u0430 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>neuron<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>weight_change<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.001<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">7<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.003<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.005<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f (0.001), \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0443\u0447\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f (0.005), \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u043b\u043e\u0441\u044c, \u043d\u043e \u0435\u0449\u0451 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0430 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u044f\u043c, \u0432\u044b\u0434\u0435\u043b\u044f\u044f \u0441\u043b\u043e\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0438\u043b\u0438 \u0441\u043b\u0430\u0431\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u0441\u043e\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"24\" id=\"24\"><\/a><\/p>\n<h4>\u041e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>\u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430 \u0435\u0451 \u0432\u0435\u0441\u043e\u0432. \u0421\u0438\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u2014 \u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/strong><\/p>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u0445 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0440\u0430\u0437\u0431\u0440\u043e\u0441, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0441\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"sql\">SELECT model_id,          STDDEV(weight) AS weight_stddev   FROM weights   GROUP BY model_id   ORDER BY weight_stddev DESC;<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<ol>\n<li>\n<p><code>STDDEV(weight) AS weight_stddev<\/code> \u2014 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b \u0432\u0435\u0441\u0430 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY model_id<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY weight_stddev DESC<\/code> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442 \u0441\u0430\u043c\u044b\u0445 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>layer<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>weight_stddev<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.45<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.30<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.15<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (0.45) \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 (0.30) \u2014 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u0437\u043a\u043e\u0435 (0.15) \u2014 \u0432\u0435\u0441\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p><a class=\"anchor\" name=\"25\" id=\"25\"><\/a><\/p>\n<h4>DuckDB \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 Pandas DataFrame, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 SQL-\u0431\u0430\u0437\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f DuckDB.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445:<\/p>\n<pre><code class=\"python\">import duckdb   import pandas as pd    # \u0421\u043e\u0437\u0434\u0430\u0451\u043c DataFrame \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439   data = {       \"model_id\": [1, 1, 2, 2, 3, 3],       \"layer\": [1, 2, 1, 2, 1, 2],       \"weight\": [0.12, -0.34, 0.22, -0.45, 0.31, -0.28]   }   df = pd.DataFrame(data)    # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 DuckDB   result = duckdb.query(\"\"\"       SELECT model_id, STDDEV(weight) AS weight_stddev       FROM df       GROUP BY model_id       ORDER BY weight_stddev DESC   \"\"\").df()    print(result)<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430:<\/strong><\/p>\n<ul>\n<li>\n<p><code>SELECT model_id, STDDEV(weight)<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>FROM df<\/code> \u2014 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a Pandas DataFrame \u043a\u0430\u043a \u043a SQL-\u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<\/li>\n<li>\n<p><code>GROUP BY model_id<\/code> \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><code>ORDER BY weight_stddev DESC<\/code> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u0435\u0441\u043e\u0432 \u043f\u0435\u0440\u0432\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"26\" id=\"26\"><\/a><\/p>\n<h3>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435: \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 SQL, \u043c\u043e\u0436\u043d\u043e \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b.<\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/strong><\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0441\u0432\u043e\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u0437 <code>torchvision.models<\/code> (PyTorch) \u0438\u043b\u0438 <code>tf.keras.applications<\/code> (TensorFlow). \u0417\u0430\u0442\u0435\u043c \u0438\u0437\u0443\u0447\u0438\u0442\u0435, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u044f\u0445. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043b\u043e\u0438 \u0441 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438.\u00a0<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/strong><\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0432 SQL \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0435\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 <code>pandas.to_sql()<\/code>. \u0412 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (<code>VIEW<\/code>), \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435.<\/p>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432<\/strong><\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432 \u0438\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435. SQL \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Matplotlib \u0438 Seaborn.<\/p>\n<p><strong>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><strong>SHAP<\/strong> \u2014 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>LIME<\/strong> \u2014 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Captum (PyTorch)<\/strong> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0438 \u0441\u0442\u0440\u043e\u0438\u0442 \u043a\u0430\u0440\u0442\u044b \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a SQL \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438<\/strong><\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u0442\u0435, \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c SQL \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432, \u043d\u043e \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQL \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u043e\u0441\u044b, \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438. \u0410 \u0435\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u0431\u0430\u0437\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0430\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<hr\/>\n<p>SQL \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u0430\u043c\u0438, \u043d\u043e \u0438 \u043a\u0440\u0443\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/496\/5ac\/71b\/4965ac71bbe207862b57cc6898db39b5.png\" width=\"1560\" height=\"315\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/496\/5ac\/71b\/4965ac71bbe207862b57cc6898db39b5.png\"\/><\/figure>\n<blockquote>\n<p>\u0412\u043b\u0430\u0434\u0435\u043d\u0438\u0435 SQL \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0441 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435: \u0441 \u043d\u0438\u043c \u043f\u0440\u043e\u0449\u0435 \u0432\u043e\u0439\u0442\u0438 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0423\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0441\u0432\u043e\u0438\u0442\u044c SQL \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0432 \u043a\u0430\u0440\u044c\u0435\u0440\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0443\u0440\u0441\u0435 \u00ab<a href=\"https:\/\/netology.ru\/programs\/sql-lessons?utm_source=habr&amp;utm_medium=externalblog&amp;utm_campaign=up_it_sql_ou_habr_brand_article-25032025_media\">SQL \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>\u00bb. \u0421 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c DSHABR10 \u0446\u0435\u043d\u0430 \u0435\u0449\u0451 \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435.\u00a0<\/p>\n<\/blockquote>\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\/891690\/\"> https:\/\/habr.com\/ru\/articles\/891690\/<\/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<p>SQL \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432, \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0445 \u043b\u043e\u0433\u0438\u043a\u0438. SQL \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0432\u0435\u0441\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<div class=\"persona\">\n<h5 class=\"persona__heading\">\u0414\u0435\u043d\u0438\u0441 \u041c\u0430\u043a\u0430\u0440\u0446\u0435\u0432<\/h5>\n<p>\u0418\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0420\u043e\u0441\u0441\u0435\u043b\u044c\u0445\u043e\u0437\u0431\u0430\u043d\u043a\u0435, \u0430\u0432\u0442\u043e\u0440 <a href=\"https:\/\/t.me\/it_koursy_obychenie\">\u043a\u0430\u043d\u0430\u043b\u0430<\/a> \u043e\u0431 IT-\u043a\u0443\u0440\u0441\u0430\u0445. <br \/>\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430.<\/p>\n<\/div>\n<p><a class=\"anchor\" name=\"0\" id=\"0\"><\/a><\/p>\n<p><strong>\u0414\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435:<\/strong><\/p>\n<ol>\n<li>\n<p><a href=\"#1\">\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0431\u0430\u0437\u0430: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0435\u0441\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#3\">\u041c\u0438\u043d\u0438\u043c\u0443\u043c SQL \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">\u0417\u0430\u0434\u0430\u0447\u0430 1. \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#5\">\u041a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u041a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#8\">\u0417\u0430\u0434\u0430\u0447\u0430 2. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#9\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#10\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#11\">\u041f\u043e\u0438\u0441\u043a \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043c\u0430\u043b\u044b\u0445 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#12\">\u041f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0430. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#13\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 1. \u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 SQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#14\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 2. \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#15\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DuckDB, ClickHouse \u0438 TimescaleDB<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#16\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#17\">\u0417\u0430\u0434\u0430\u0447\u0430 3. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#18\">\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#19\">\u0420\u0430\u0441\u0447\u0451\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u043f\u043e \u0441\u043b\u043e\u044f\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#20\">\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#21\">\u0417\u0430\u0434\u0430\u0447\u0430 4. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#22\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043f\u043e\u0445\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#23\">\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432\u0435\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#24\">\u041e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#25\">DuckDB \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#26\">\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435: \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443<\/a><\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0431\u0430\u0437\u0430: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0435\u0441\u0430<\/h3>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h4>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432. \u041e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0445, \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u044b\u0434\u0430\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0435\u0441\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0435\u0441\u0430 \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438 \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0432\u0435\u0441, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u0430 \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u0440\u0442\u0438\u0440\u044b, \u043e\u0434\u0438\u043d \u043d\u0435\u0439\u0440\u043e\u043d \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043d\u0430\u0442. \u0412\u044b\u0441\u043e\u043a\u0438\u0439 \u0432\u0435\u0441 \u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u00ab\u0440\u0430\u0439\u043e\u043d\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440 \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u0446\u0435\u043d\u044b, \u0430 \u043d\u0438\u0437\u043a\u0438\u0439 \u2014 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0440\u043e\u043b\u0438.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043a\u043e\u0448\u0435\u043a \u0438 \u0441\u043e\u0431\u0430\u043a, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u0443\u0448\u0435\u0439, \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u043e\u0441\u0430, \u0446\u0432\u0435\u0442 \u0448\u0435\u0440\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. <a href=\"https:\/\/www.researchgate.net\/figure\/Deep-learning-example-of-an-artificial-neural-network-where-an-image-is-pushed-through_fig1_370676547\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u044c. \u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u0447\u043d\u0451\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430\u0443\u0433\u0430\u0434, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u041a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0435\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438.\u00a0<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u041e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u0439 \u0440\u0438\u0441\u043a, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0430\u0451\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u00ab\u041e\u0434\u043e\u0431\u0440\u0435\u043d\u043e\u00bb \u0438\u043b\u0438 \u00ab\u041e\u0442\u043a\u0430\u0437\u0430\u043d\u043e\u00bb. \u041e\u043d \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0445\u043e\u0434\u0430, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0437\u0430\u0434\u043e\u043b\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/strong><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432\u0435\u0441\u043e\u0432 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0444\u043e\u0442\u043e \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0441 \u0431\u0435\u043b\u044b\u043c \u0444\u043e\u043d\u043e\u043c, \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043d \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0444\u043e\u043d \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u044b\u0439 \u0438\u043b\u0438 \u0446\u0432\u0435\u0442\u043d\u043e\u0439, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0438\u043b\u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0441\u0430 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e.<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0435\u0451 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0435\u0441\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0440\u0435\u0437\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0443\u043f\u0438\u0442 \u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0442\u043e\u0432\u0430\u0440. \u041d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u043a\u043e \u0443\u043f\u0430\u043b\u0430, \u0430 \u0432\u0435\u0441\u0430 \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043a\u0430\u0447\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.<\/strong><\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u043b\u0438 \u043d\u0430 \u0441\u043d\u0438\u043c\u043a\u0430\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432. \u041d\u0430 \u0432\u0441\u0435\u0445 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445 \u0431\u043e\u043b\u044c\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u0434\u044f\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438. \u041c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0448\u0438\u043b\u0430, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0431\u043e\u043b\u0435\u0437\u043d\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0430\u043a\u0438\u0445 \u0441\u043d\u0438\u043c\u043a\u0430\u0445. \u041a\u043e\u0433\u0434\u0430 \u0435\u0439 \u0434\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0432\u043e\u0434\u044f\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043b\u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0445 \u0438 \u0431\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c.<\/em><\/p>\n<\/li>\n<li>\n<p><strong>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u2014 \u0432\u044b\u0431\u0440\u043e\u0441\u044b.\u00a0<\/strong><\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0438\u043b\u0438, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0431\u043b\u0438\u0437\u043a\u0438\u043c\u0438 \u043a \u043d\u0443\u043b\u044e. \u0422\u0430\u043a\u0438\u0435 \u0441\u043a\u0430\u0447\u043a\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u0445. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0440: \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u044e\u043c\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c \u0430\u043d\u043a\u0435\u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0435\u0441\u043e\u0432, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u0442\u0430\u0436 \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0437\u043a\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440 \u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/em><\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \u044d\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c, \u0430 \u043c\u0430\u043b\u043e\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443.<\/p>\n<\/blockquote>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c. \u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u0435\u0434\u0451\u0442 \u043a \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u0442\u0435\u0440\u044f\u043c, \u0441\u0431\u043e\u0438 \u0432 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u2014 \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u0443, \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445 \u2014 \u043a \u0440\u0438\u0441\u043a\u0430\u043c \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0435\u0451 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445: \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u043e\u043d\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043b\u0438 \u043a \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0438 \u043d\u0435 \u0443\u0445\u0443\u0434\u0448\u0430\u044e\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0435\u0451 \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>\u041c\u0438\u043d\u0438\u043c\u0443\u043c SQL \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0435\u0441\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c, \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 SQL-\u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p><code>SELECT<\/code><strong> <\/strong>\u2014<strong> \u0432\u044b\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1 <\/strong>\u2192 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438:\u00a0<\/p>\n<pre><code class=\"sql\">SELECT * FROM weights;<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>weights<\/code>: \u0432\u0435\u0441\u0430, \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u043e\u0451\u0432 \u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2 <\/strong>\u2192 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c:\u00a0<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights WHERE layer = 3;<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0438 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p><code>WHERE<\/code> \u2014 <strong>\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 0.5:<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights WHERE weight &gt; 0.5;<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>weights<\/code>, \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 weight \u0431\u043e\u043b\u044c\u0448\u0435 0.5. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p><code>ORDER BY<\/code><strong> \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e (ASC) \u0438\u043b\u0438 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e (DESC).<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 10 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438:<\/p>\n<pre><code class=\"sql\">SELECT neuron, weight FROM weights ORDER BY weight DESC LIMIT 10;<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u0430 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p><code>GROUP BY<\/code><strong> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<\/strong><\/p>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> \u2192 \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u043f\u043e \u0441\u043b\u043e\u044f\u043c:<\/p>\n<pre><code class=\"sql\">SELECT layer, AVG(weight) FROM weights GROUP BY layer;<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0433\u0434\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><code>HAVING <\/code><strong>\u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438<\/strong><\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a WHERE, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b GROUP BY.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440:<\/strong> \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0438 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0432\u0435\u0441\u043e\u043c:<\/p>\n<pre><code class=\"sql\">SELECT layer, AVG(weight) FROM weights  GROUP BY layer HAVING AVG(weight) &gt; 0.2;<\/code><\/pre>\n<p>\u0421\u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u0441 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435, \u0433\u0434\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 0.2.<\/p>\n<p><code>JOIN <\/code><strong>\u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446<\/strong><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0443\u0436\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 <\/strong>\u2192 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u043b\u043e\u044f\u0445 \u0438 \u0438\u0445 \u0432\u0435\u0441\u0430\u0445:<\/p>\n<pre><code class=\"sql\">SELECT layers.layer_number, weights.neuron, weights.weight FROM layers JOIN weights ON layers.id = weights.layer_id;<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>layers<\/code> \u0438 <code>weights<\/code> \u043f\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u0441\u043b\u043e\u044f (<code>layer_id<\/code>). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432, \u0438\u0445 \u0432\u0435\u0441\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442.\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c SQL \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<blockquote>\n<p><a href=\"#0\">\u041a \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 1. \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0412\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0432 \u0444\u0430\u0439\u043b\u044b <code>.pt<\/code> \u2014 PyTorch \u0438\u043b\u0438 <code>.h5<\/code> \u2014 TensorFlow. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451, \u043d\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0418 \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0441\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u043e<\/strong>. \u0418\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c, \u043a\u0430\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043a\u043e\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u0440\u043c\u0430\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. <\/strong>\u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. <\/strong>\u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0438\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u044b \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0441\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b.\u00a0<\/p>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h4>\u041a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430 \u0432 SQL<\/h4>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0435\u0441\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 <strong>\u043c\u0430\u0442\u0440\u0438\u0446<\/strong> \u2014 \u0442\u0430\u0431\u043b\u0438\u0446, \u0433\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432, \u0438\u043b\u0438 <strong>\u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432<\/strong> \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u0432<\/p>\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-454115","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454115","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=454115"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454115\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}