{"id":306856,"date":"2020-07-13T15:00:46","date_gmt":"2020-07-13T15:00:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306856"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306856","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c DS \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510724\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ew\/83\/fu\/ew83fubxvj8v2l04nqj8vkmicta.jpeg\"><\/p>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u043a\u0435\u0439\u0441\u044b \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435:<\/p>\n<ol>\n<li> <a href=\"https:\/\/newtechaudit.ru\/chernovik-sozdannyj-13-05-2020-v-1343\/\" rel=\"nofollow\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439 RSS-\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440<\/a><\/li>\n<li><a href=\"https:\/\/newtechaudit.ru\/parser-novostnyh-rss-lent\/\" rel=\"nofollow\">\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0445 \u043b\u0435\u043d\u0442 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c<\/a><\/li>\n<\/ol>\n<p>  \u0412 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u043c \u043a\u0435\u0439\u0441\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0437\u044b\u043a\u0430 Python, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: Selenium, BeautifulSoup. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u043e 27 \u0442\u044b\u0441\u044f\u0447 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2018 \u0433\u043e\u0434\u0430. \u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0437\u044b\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u043b 2 \u0430\u0431\u0437\u0430\u0446\u0430 \u043b\u0438\u0441\u0442\u0430 \u04104. \u0412 70 % \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f 30% \u2014 \u043e\u0446\u0435\u043d\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0446\u0435\u043d\u043a\u0438, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u043c. \u041c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u044b\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u0443 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f 30% \u043e\u0442\u0437\u044b\u0432\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0431\u044b\u043b\u0438 \u043e\u0442 1 \u0434\u043e 5, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043e\u0442\u0437\u044b\u0432 \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443, \u0442. \u0435. \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u043d \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0432 \u0420\u043e\u0441\u0441\u0438\u0438: \u043e\u0446\u0435\u043d\u043a\u0438 1,2 \u2014 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 0; \u043e\u0446\u0435\u043d\u043a\u0438 3,4,5 \u2013 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 1. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u0435\u043b\u0430\u0441\u044c \u043a \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"python\">dataframe.tail(5) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/we\/wj\/1b\/wewj1b4r-f2drc8vdkxuniogau0.jpeg\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1<\/i><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 XGBoost \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u043c. \u0423\u0447\u0438\u0442\u0435\u043b\u0435\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u0412 \u0440\u043e\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 Word2Vec, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u043a: \u043b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"python\">from nltk.tokenize import sent_tokenize from nltk.corpus import stopwords from nltk.tokenize import word_tokenize<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">def tokenize_ru(x):       tokens = x.lower()        tokens = re.sub(r'[^\\w\\s]+|[\\d]',' ',tokens)        tokens = word_tokenize(tokens)        tokens = [i for i in tokens if (i not in string.punctuation)]        stop_words = stopwords.words('russian')        stop_words.extend(['\u0447\u0442\u043e', '\u044d\u0442\u043e', '\u0442\u0430\u043a', '\u0432\u043e\u0442', '\u0431\u044b\u0442\u044c', '\u043a\u0430\u043a', '\u0432', '\u2014', '\u2013', '\u043a', '\u043d\u0430', '...'])        tokens = [i for i in tokens if (i not in stop_words)]        tokens = [i.replace(&quot;\u00ab&quot;, &quot;&quot;).replace(&quot;\u00bb&quot;, &quot;&quot;) for i in tokens]        return tokens<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 GridSearch.<\/p>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 8 (max_depth=8) \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 (n_estimators=88). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 XGBoost \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e: n_estimators=100, max_depth=3.<\/p>\n<pre><code class=\"python\">xgb_word2vec = Pipeline([               (&quot;word2vec&quot;, MeanVect(w2v)),                ('model_fitting',  xgb)])   xgb_word2vec.fit(X_train2, y_train2)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u2\/bb\/u9\/u2bbu97mg296fz44uq6yf4vxn80.jpeg\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2<\/i><\/p>\n<p>  \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 Confusion matrix (\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u041f\u0443\u0442\u0430\u043d\u0438\u0446\u044b) \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<pre><code class=\"python\">import seaborn as sns import matplotlib.pylab as plt %matplotlib inline from matplotlib.pylab import rcParams rcParams['figure.figsize'] = 3, 3 plt.figure(figsize=(2,2)) sns.set(font_scale=1.5) ax = sns.heatmap((pd.crosstab(y_test2, pred2).apply(lambda r: r\/r.sum()*100, axis=0)), cbar=None, annot=True, cmap=&quot;Blues&quot;) ax.set_ylabel(&quot;&quot;) ax.set_xlabel(&quot;&quot;) plt.yticks(rotation=0, size = 15) plt.xticks(rotation=0, size = 15)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zz\/jb\/w_\/zzjbw_dele4bai2panjn7fqyzrc.jpeg\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3<\/i><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SGDClassifier \u0438 \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u043e\u0432 TF-IDF.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u0438\u0445 Confusion matrix:<\/p>\n<p>  1. SGDClassifier + Word2Vec (\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rp\/dn\/gd\/rpdngd5gbz6qny-zpggnsqvo0vs.jpeg\"><\/p>\n<p>  2. SGDClassifier+ TF-IDF (\u0420\u0438\u0441\u0443\u043d\u043e\u043a 5).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2m\/37\/2x\/2m372xild8ugy3dc4nrze_wff94.jpeg\"><\/p>\n<p>  3. XGBoost+ TF-IDF (\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qa\/yh\/mb\/qayhmbyyvianjzeycktthm7xjj0.jpeg\"><\/p>\n<p>  \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f f-mera \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 f-mera = 2*Precision*Recall\/(Precision+Recall), \u0433\u0434\u0435 Precision(\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c) \u0438 Recall(\u043f\u043e\u043b\u043d\u043e\u0442\u0430) \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0437 Confusion matrix, \u044d\u0442\u043e \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u043e\u0439, \u0434\u043b\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u041b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 SGDClassifier + TF-IDF.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0432 \u0443\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0441 \u043b\u0443\u0447\u0448\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u0437\u044b\u0432\u044b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2016 \u043f\u043e 2018 \u0433\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 f-mera: 0.9326314212969897. \u042d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0438\u0441\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432.<\/p>\n<pre><code class=\"python\">precision_recall_fscore_support(y_prov, predtest, average='macro')<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1v\/yd\/yu\/1vydyu1kkzolkbkxv2qfb58hhew.jpeg\"><\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435 \u043e\u0446\u0435\u043d\u0435\u043d\u043d\u044b\u0445 30 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043e\u0442\u0437\u044b\u0432\u043e\u0432.<\/p>\n<p>  \u0412\u044b\u0432\u043e\u0434: \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (NLP) \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u043a\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f SGDClassifier \u0441 TF-IDF, \u043d\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043f\u0435\u0445\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u041d\u0430 \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0435 <b>15.07.2020 10-00 \u043c\u0441\u043a<\/b> \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/newtechaudit.ru\/onlajn-vebinar-analiz-otzyvov-klientov-razmeshhyonnyh-v-internet\/\" rel=\"nofollow\">newtechaudit.ru\/onlajn-vebinar-analiz-otzyvov-klientov-razmeshhyonnyh-v-internet<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ig\/1y\/uo\/ig1yuoia05uj7s2dlv2bannpgf0.png\"><\/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\/510724\/\"> https:\/\/habr.com\/ru\/post\/510724\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510724\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ew\/83\/fu\/ew83fubxvj8v2l04nqj8vkmicta.jpeg\"><\/p>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u043a\u0435\u0439\u0441\u044b \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435:<\/p>\n<ol>\n<li> <a href=\"https:\/\/newtechaudit.ru\/chernovik-sozdannyj-13-05-2020-v-1343\/\" rel=\"nofollow\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439 RSS-\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440<\/a><\/li>\n<li><a href=\"https:\/\/newtechaudit.ru\/parser-novostnyh-rss-lent\/\" rel=\"nofollow\">\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0445 \u043b\u0435\u043d\u0442 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c<\/a><\/li>\n<\/ol>\n<p>  \u0412 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u043c \u043a\u0435\u0439\u0441\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0437\u044b\u043a\u0430 Python, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: Selenium, BeautifulSoup. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u043e 27 \u0442\u044b\u0441\u044f\u0447 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2018 \u0433\u043e\u0434\u0430. \u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0437\u044b\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u043b 2 \u0430\u0431\u0437\u0430\u0446\u0430 \u043b\u0438\u0441\u0442\u0430 \u04104. \u0412 70 % \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f 30% \u2014 \u043e\u0446\u0435\u043d\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0446\u0435\u043d\u043a\u0438, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u043c. \u041c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u044b\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u0443 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f 30% \u043e\u0442\u0437\u044b\u0432\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0431\u044b\u043b\u0438 \u043e\u0442 1 \u0434\u043e 5, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043e\u0442\u0437\u044b\u0432 \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443, \u0442. \u0435. \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u043d \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0432 \u0420\u043e\u0441\u0441\u0438\u0438: \u043e\u0446\u0435\u043d\u043a\u0438 1,2 \u2014 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 0; \u043e\u0446\u0435\u043d\u043a\u0438 3,4,5 \u2013 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 1. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u0435\u043b\u0430\u0441\u044c \u043a \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.  <\/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-306856","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306856","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=306856"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306856\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}