{"id":321304,"date":"2021-04-12T15:00:49","date_gmt":"2021-04-12T15:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321304"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321304","title":{"rendered":"\u0410\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0436\u0430\u0442\u0438\u044f zlib \u0434\u043b\u044f \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0421\u0431\u0435\u0440 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/sberbank\/blog\/550056\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2014 \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 (\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0430\u043c\u0430).<\/p>\n<blockquote>\n<p>\u041c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u043e\u0439: \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0436\u0430\u0442\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e zlib \u0438 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b\u0438 \u0441\u0430\u043c\u044b\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u043b\u0430\u0431\u043e \u0441\u0436\u0438\u043c\u0430\u044e\u0449\u0438\u0435\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435&nbsp; \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. \u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u00d71.2\u2014\u00d78 (\u043c\u0435\u043d\u044c\u0448\u0435 1.2 \u2014 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0443\u0441\u043e\u0440, \u0431\u043e\u043b\u044c\u0448\u0435 8 \u2014 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u0441\u043f\u0430\u043c).&nbsp;<\/p>\n<\/blockquote>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u044f\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u041d\u043e \u0440\u0430\u0437\u0432\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f zlib \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u0441\u0436\u0438\u043c\u0430\u0435\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0434\u043b\u0438\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 50 \u0434\u043e 280 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ba2\/6fa\/c88\/ba26fac88b2928f64bbe7196b17d0516.png\" width=\"801\" height=\"511\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">import zlib import numpy as np import matplotlib import matplotlib.pyplot as plt import seaborn as sns from scipy.optimize import curve_fit  with open('\/content\/test.txt', 'r', encoding='utf-8') as f:   text = f.read() sntc = text.split('\\n')  l_sntc = []  # \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 k_zlib = []  # \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  for s in sntc:   l_sntc.append(len(s))   k_zlib.append(len(s) \/ len(zlib.compress(s.encode(), -1)))<\/code><\/pre>\n<h4>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0434\u043b\u0438\u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>1. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (25 &#8212; 75 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044c). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u044b \u043e\u0442 92 \u0434\u043e 175 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432:<\/p>\n<pre><code class=\"python\">mp_1 = np.percentile(np.array(l_sntc), [25, 75]) print('\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d: ' + str(mp_1))<\/code><\/pre>\n<p>2. \u0420\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e \u0434\u043b\u0438\u043d\u0435 \u0433\u0440\u0443\u043f\u043f\u044b. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 25 \u0438 (25 + w) \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u043c&nbsp;<strong>\u0438\u043b\u0438<\/strong>&nbsp;75 \u0438 (75 &#8212; w) \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u043c (\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c&nbsp;<strong>\u043c\u0435\u043d\u044c\u0448\u0435\u0435<\/strong>&nbsp;\u0438\u0437 \u0434\u0432\u0443\u0445 \u0434\u0435\u043b\u044c\u0442), \u0433\u0434\u0435 w &#8212; \u043e\u043a\u043d\u043e (\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c 2.5 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044f).<\/p>\n<ul>\n<li>\n<p>\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">w = 2.5  # \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u0439 mp_2 = np.percentile(np.array(l_sntc), [25 + w, 75 - w]) dl = int(min(mp_2[0] - mp_1[0], mp_1[1] - mp_2[1])) print('\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435: ' + str(dl))<\/code><\/pre>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 3 \u0441\u0438\u043c\u0432\u043e\u043b\u0430.  <\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e \u0434\u043b\u0438\u043d\u0435 +- 3 \u0441\u0438\u043c\u0432\u043e\u043b\u0430:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0434\u043b\u0438\u043d\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 id_sntc = range(len(sntc))  # \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 x = zip(l_sntc, id_sntc) xs = sorted(x, key = lambda tup: tup[0]) l_sntc_s = [x[0] for x in xs] id_snt\u0441_s = [x[1] for x in xs]  gr = 0  # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0443\u043f\u043f k_gr = [[]]  # \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 l_gr = [[]]  # \u0434\u043b\u0438\u043d\u044b \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 sl0 = l_sntc_s[l_sntc_s.index(mp_1[0])] # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u044b \u0432 \u0433\u0440\u0443\u043f\u043f\u0435  nt = l_sntc_s.index(mp_1[1]) for i in range(nt, len(l_sntc_s)):     if l_sntc_s[i] &gt; l_sntc_s[nt]:         nt = i         break  for i in range(l_sntc_s.index(mp_1[0]), nt):     if l_sntc_s[i] &gt; sl0 + dl:         sl0 = l_sntc_s[i]         k_gr.append([])         l_gr.append([])         gr += 1     else:         k_gr[gr].append(k_zlib[id_snt\u0441_s[i]])         l_gr[gr].append(l_sntc_s[i])  print('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0443\u043f\u043f: ' + str(gr))<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 20 \u0433\u0440\u0443\u043f\u043f. <\/p>\n<p>3. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u044f\u0442\u0438\u0434\u0435\u0441\u044f\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044e \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 \u0438\u0445 \u0434\u043b\u0438\u043d\u044b:<\/p>\n<pre><code class=\"python\">x = [0] y = [0]  for i in range(gr + 1):     x.append(np.percentile(np.array(l_gr[i]), 50))     y.append(np.percentile(np.array(k_gr[i]), 50))<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a9\/d3b\/71f\/8a9d3b71f6de347b267ec0fae71cd327.png\" width=\"500\" height=\"353\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430:<\/p>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y = a \\cdot  x^{b},\" alt=\"y = a \\cdot  x^{b},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58f\/b22\/c42\/58fb22c42190c9e27c0c43e53552a42e.svg\" width=\"71\" height=\"21\"><\/p>\n<p>\u0433\u0434\u0435 x &#8212; \u0434\u043b\u0438\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, y &#8212; \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0410\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041c\u041d\u041a<\/h4>\n<pre><code class=\"python\">x = np.array(x) y = np.array(y)  #  \u041c\u041d\u041a def func(x, a, b):     return a * x ** b  popt, pcov = curve_fit(func, x, y, (0.27, 0.24), maxfev=10 ** 6) a, b = popt  print('a = {0}\\nb = {1}'.format(*tuple(popt))) print('\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438: ' + str(np.corrcoef(y, a * x ** b)[0][1]))<\/code><\/pre>\n<p>a = 0.17601951773514363, b = 0.3256903074228561, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438: 0.9999489378452683<\/p>\n<p>  \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y = 0.18 \\cdot  x^{0.33},\" alt=\"y = 0.18 \\cdot  x^{0.33},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/635\/609\/681\/6356096815f5068736207d48e93b1ef2.svg\" width=\"106\" height=\"21\"><\/p>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 (\u043d\u0430 \u0432\u0441\u0451\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0434\u043b\u0438\u043d 50 &#8212; 280 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432) \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0441\u0436\u0430\u0442\u0438\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u043e\u0442 \u0434\u043b\u0438\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e &#171;c&#187; \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#171;y = \u0441&#187; (\u043d\u0430 \u043f\u044f\u0442\u0438\u0434\u0435\u0441\u044f\u0442\u043e\u043c \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0431\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u043e\u0442 \u0434\u043b\u0438\u043d\u044b:<\/p>\n<pre><code class=\"python\">c = np.percentile(np.array(k_zlib), 50)  graph = plt.figure() axes = graph.add_axes([0, 0, 1, 1]) axes.set_xlabel('\u0414\u043b\u0438\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f') axes.set_ylabel('\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f') axes.set_title('\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439') axes.plot([60, 280], [c, c], color='r') axes.plot(range(60, 281), a * np.array(range(60, 281)) ** b, color='b')<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b63\/5a2\/2f6\/b635a22f6f988b8df892c6eaa16b1ee6.png\" width=\"500\" height=\"353\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f. \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0440\u043e\u0447\u0435 ~130 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u0436\u0435\u043d\u043d\u044b\u043c, \u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u0438\u043d\u043d\u0435\u0435 ~130 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 &#8212; \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c. \u0418 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043f\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443 \u0441\u0436\u0430\u0442\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438, \u0442\u043e \u043e\u0442\u0441\u0435\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,&nbsp;\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043b\u0438\u043d <strong>\u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e<\/strong> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f.&nbsp;\u0418 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c.  <\/p>\n<h4>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0445 \u0434\u043b\u0438\u043d\u044b<\/h4>\n<pre><code class=\"python\">k_zlib_f = np.array(k_zlib) * c \/ (a * np.array(l_sntc) ** b)<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438&nbsp;<strong>\u043d\u0435 \u043e\u0442\u0441\u0435\u044f\u043b\u0438\u0441\u044c \u0431\u044b \u0431\u0435\u0437 \u043d\u0435\u0451:<\/strong>  <\/p>\n<ul>\n<li>\n<p>\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0441\u043f\u0430\u043c\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">p_zlib_1 = np.percentile(np.array(k_zlib), 99.95) p_zlib_2 = np.percentile(np.array(k_zlib_f), 99.95)  for i in range(len(sntc)):   if k_zlib_f[i] &gt; p_zlib_2 and k_zlib[i] &lt;= p_zlib_1:     print(sntc[i])<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e0c\/7a7\/bca\/e0c7a7bcacaedfe8dcb158379ceeefbb.png\" width=\"1195\" height=\"505\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u043e <strong>\u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 <\/strong>\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445<strong> \u0431\u044b\u043b \u0437\u0430\u043d\u0438\u0436\u0435\u043d<\/strong> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0434\u043a\u043e \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0434\u043b\u0438\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/kopylov-scl\/zlib-text-preprocessing\/\" rel=\"noopener noreferrer nofollow\">\u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u042f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u0437\u044f\u043b \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0430\u043c\u0430.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/551982\/\"> https:\/\/habr.com\/ru\/post\/551982\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0421\u0431\u0435\u0440 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/sberbank\/blog\/550056\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2014 \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 (\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0430\u043c\u0430).<\/p>\n<blockquote>\n<p>\u041c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u043e\u0439: \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0436\u0430\u0442\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e zlib \u0438 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b\u0438 \u0441\u0430\u043c\u044b\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u043b\u0430\u0431\u043e \u0441\u0436\u0438\u043c\u0430\u044e\u0449\u0438\u0435\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435&nbsp; \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. \u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u00d71.2\u2014\u00d78 (\u043c\u0435\u043d\u044c\u0448\u0435 1.2 \u2014 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0443\u0441\u043e\u0440, \u0431\u043e\u043b\u044c\u0448\u0435 8 \u2014 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u0441\u043f\u0430\u043c).&nbsp;<\/p>\n<\/blockquote>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u044f\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u041d\u043e \u0440\u0430\u0437\u0432\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f zlib \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u0441\u0436\u0438\u043c\u0430\u0435\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0434\u043b\u0438\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 50 \u0434\u043e 280 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">import zlib import numpy as np import matplotlib import matplotlib.pyplot as plt import seaborn as sns from scipy.optimize import curve_fit  with open('\/content\/test.txt', 'r', encoding='utf-8') as f:   text = f.read() sntc = text.split('\\n')  l_sntc = []  # \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 k_zlib = []  # \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  for s in sntc:   l_sntc.append(len(s))   k_zlib.append(len(s) \/ len(zlib.compress(s.encode(), -1)))<\/code><\/pre>\n<h4>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0434\u043b\u0438\u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>1. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (25 &#8212; 75 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044c). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u044b \u043e\u0442 92 \u0434\u043e 175 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432:<\/p>\n<pre><code class=\"python\">mp_1 = np.percentile(np.array(l_sntc), [25, 75]) print('\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d: ' + str(mp_1))<\/code><\/pre>\n<p>2. \u0420\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e \u0434\u043b\u0438\u043d\u0435 \u0433\u0440\u0443\u043f\u043f\u044b. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 25 \u0438 (25 + w) \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u043c&nbsp;<strong>\u0438\u043b\u0438<\/strong>&nbsp;75 \u0438 (75 &#8212; w) \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u043c (\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c&nbsp;<strong>\u043c\u0435\u043d\u044c\u0448\u0435\u0435<\/strong>&nbsp;\u0438\u0437 \u0434\u0432\u0443\u0445 \u0434\u0435\u043b\u044c\u0442), \u0433\u0434\u0435 w &#8212; \u043e\u043a\u043d\u043e (\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c 2.5 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044f).<\/p>\n<ul>\n<li>\n<p>\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">w = 2.5  # \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435\u0439 mp_2 = np.percentile(np.array(l_sntc), [25 + w, 75 - w]) dl = int(min(mp_2[0] - mp_1[0], mp_1[1] - mp_2[1])) print('\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435: ' + str(dl))<\/code><\/pre>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 3 \u0441\u0438\u043c\u0432\u043e\u043b\u0430.  <\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e \u0434\u043b\u0438\u043d\u0435 +- 3 \u0441\u0438\u043c\u0432\u043e\u043b\u0430:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0434\u043b\u0438\u043d\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 id_sntc = range(len(sntc))  # \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 x = zip(l_sntc, id_sntc) xs = sorted(x, key = lambda tup: tup[0]) l_sntc_s = [x[0] for x in xs] id_snt\u0441_s = [x[1] for x in xs]  gr = 0  # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0443\u043f\u043f k_gr = [[]]  # \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 l_gr = [[]]  # \u0434\u043b\u0438\u043d\u044b \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 sl0 = l_sntc_s[l_sntc_s.index(mp_1[0])] # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u044b \u0432 \u0433\u0440\u0443\u043f\u043f\u0435  nt = l_sntc_s.index(mp_1[1]) for i in range(nt, len(l_sntc_s)):     if l_sntc_s[i] &gt; l_sntc_s[nt]:         nt = i         break  for i in range(l_sntc_s.index(mp_1[0]), nt):     if l_sntc_s[i] &gt; sl0 + dl:         sl0 = l_sntc_s[i]         k_gr.append([])         l_gr.append([])         gr += 1     else:         k_gr[gr].append(k_zlib[id_snt\u0441_s[i]])         l_gr[gr].append(l_sntc_s[i])  print('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0443\u043f\u043f: ' + str(gr))<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 20 \u0433\u0440\u0443\u043f\u043f. <\/p>\n<p>3. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u044f\u0442\u0438\u0434\u0435\u0441\u044f\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044e \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 \u0438\u0445 \u0434\u043b\u0438\u043d\u044b:<\/p>\n<pre><code class=\"python\">x = [0] y = [0]  for i in range(gr + 1):     x.append(np.percentile(np.array(l_gr[i]), 50))     y.append(np.percentile(np.array(k_gr[i]), 50))<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430:<\/p>\n<\/li>\n<\/ul>\n<p>\u0433\u0434\u0435 x &#8212; \u0434\u043b\u0438\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, y &#8212; \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0410\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041c\u041d\u041a<\/h4>\n<pre><code class=\"python\">x = np.array(x) y = np.array(y)  #  \u041c\u041d\u041a def func(x, a, b):     return a * x ** b  popt, pcov = curve_fit(func, x, y, (0.27, 0.24), maxfev=10 ** 6) a, b = popt  print('a = {0}\\nb = {1}'.format(*tuple(popt))) print('\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438: ' + str(np.corrcoef(y, a * x ** b)[0][1]))<\/code><\/pre>\n<p>a = 0.17601951773514363, b = 0.3256903074228561, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438: 0.9999489378452683<\/p>\n<p>  \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 (\u043d\u0430 \u0432\u0441\u0451\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0434\u043b\u0438\u043d 50 &#8212; 280 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432) \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0441\u0436\u0430\u0442\u0438\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u043e\u0442 \u0434\u043b\u0438\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e &#171;c&#187; \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#171;y = \u0441&#187; (\u043d\u0430 \u043f\u044f\u0442\u0438\u0434\u0435\u0441\u044f\u0442\u043e\u043c \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0431\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u043e\u0442 \u0434\u043b\u0438\u043d\u044b:<\/p>\n<pre><code class=\"python\">c = np.percentile(np.array(k_zlib), 50)  graph = plt.figure() axes = graph.add_axes([0, 0, 1, 1]) axes.set_xlabel('\u0414\u043b\u0438\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f') axes.set_ylabel('\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f') axes.set_title('\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439') axes.plot([60, 280], [c, c], color='r') axes.plot(range(60, 281), a * np.array(range(60, 281)) ** b, color='b')<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f. \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0440\u043e\u0447\u0435 ~130 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u0436\u0435\u043d\u043d\u044b\u043c, \u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u0438\u043d\u043d\u0435\u0435 ~130 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 &#8212; \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c. \u0418 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043f\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0443 \u0441\u0436\u0430\u0442\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438, \u0442\u043e \u043e\u0442\u0441\u0435\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,&nbsp;\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043b\u0438\u043d <strong>\u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e<\/strong> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f.&nbsp;\u0418 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0434\u043b\u0438\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c.  <\/p>\n<h4>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0445 \u0434\u043b\u0438\u043d\u044b<\/h4>\n<pre><code class=\"python\">k_zlib_f = np.array(k_zlib) * c \/ (a * np.array(l_sntc) ** b)<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438&nbsp;<strong>\u043d\u0435 \u043e\u0442\u0441\u0435\u044f\u043b\u0438\u0441\u044c \u0431\u044b \u0431\u0435\u0437 \u043d\u0435\u0451:<\/strong>  <\/p>\n<ul>\n<li>\n<p>\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0441\u043f\u0430\u043c\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">p_zlib_1 = np.percentile(np.array(k_zlib), 99.95) p_zlib_2 = np.percentile(np.array(k_zlib_f), 99.95)  for i in range(len(sntc)):   if k_zlib_f[i] &gt; p_zlib_2 and k_zlib[i] &lt;= p_zlib_1:     print(sntc[i])<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u043e <strong>\u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 <\/strong>\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445<strong> \u0431\u044b\u043b \u0437\u0430\u043d\u0438\u0436\u0435\u043d<\/strong> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u0436\u0430\u0442\u0438\u044f. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0434\u043a\u043e \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0434\u043b\u0438\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/kopylov-scl\/zlib-text-preprocessing\/\" rel=\"noopener noreferrer nofollow\">\u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u042f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u0437\u044f\u043b \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0430\u043c\u0430.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/551982\/\"> https:\/\/habr.com\/ru\/post\/551982\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-321304","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321304","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=321304"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321304\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}