{"id":205360,"date":"2013-12-09T15:21:03","date_gmt":"2013-12-09T11:21:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=205360"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=205360","title":{"rendered":"<span class=\"post_title\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/204500\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u0433\u043e \u0441\u043a\u043e\u0440\u0438\u043d\u0433\u0430. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u0442\u043e\u0433\u043e \u0436\u0435 <a href=\"https:\/\/www.tcsbank.ru\/tournament\/\">\u0442\u0443\u0440\u043d\u0438\u0440\u0430<\/a>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u00ab\u0417\u0430\u0434\u0430\u0447\u0438 \u043e \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430\u0445\u00bb (\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u21162).<br \/>  \u041f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (<a href=\"http:\/\/pandas.pydata.org\/pandas-docs\/stable\/\">pandas<\/a>, <a href=\"http:\/\/scikit-learn.org\/\">scikit-learn<\/a>, <a href=\"https:\/\/pymorphy2.readthedocs.org\/en\/latest\/index.html\">pymorphy<\/a>).<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0447\u0438\u0441\u0442\u043e\u0442\u0443. \u0410 \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043f\u043e\u043b\u0435 \u00ab\u043a\u0435\u043c \u0432\u044b\u0434\u0430\u043d \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u00bb, \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043e\u0442\u0435\u043d. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043d\u0435 \u043e\u0448\u0438\u0431\u0441\u044f \u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u044f: \u00ab\u043a\u043e\u0434 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00bb, \u00ab\u0441\u0435\u0440\u0438\u044e\/\u043d\u043e\u043c\u0435\u0440 \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430\u00bb. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0432\u0435\u0440\u044f\u0442\u044c \u00ab\u043a\u043e\u0434 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00bb \u0438 \u00ab\u043a\u0435\u043c \u0432\u044b\u0434\u0430\u043d \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u00bb.<br \/>  \u0417\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434\u044b \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 <a href=\"https:\/\/static.tcsbank.ru\/documents\/olymp\/passport_test_set.csv\">\u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/a>, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 <a href=\"https:\/\/static.tcsbank.ru\/documents\/olymp\/passport_training_set.csv\">\u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435<\/a>.<\/p>\n<h4>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<\/p>\n<pre><code class=\"python\">from pandas import read_csv import pymorphy2 from sklearn.feature_extraction.text import HashingVectorizer from sklearn.cross_validation import train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score, roc_auc_score from sklearn.decomposition import PCA  train = read_csv('https:\/\/static.tcsbank.ru\/documents\/olymp\/passport_training_set.csv',';', index_col='id' ,encoding='cp1251') train.head(5) <\/code><\/pre>\n<p>  <\/p>\n<table>\n<tr>\n<th><\/th>\n<th>passport_div_code<\/th>\n<th>passport_issuer_name<\/th>\n<th>passport_issue_month\/year<\/th>\n<\/tr>\n<tr>\n<th>id<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>422008<\/td>\n<td>\u0411\u0415\u041b\u041e\u0412\u0421\u041a\u0418\u041c \u0423\u0412\u0414 \u041a\u0415\u041c\u0415\u0420\u041e\u0412\u0421\u041a\u041e\u0419 \u041e\u0411\u041b\u0410\u0421\u0422\u0418<\/td>\n<td>11M2001<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>500112<\/td>\n<td>\u0422\u041f \u21162 \u0412 \u0413\u041e\u0420. \u041e\u0420\u0415\u0425\u041e\u0412\u041e-\u0417\u0423\u0415\u0412\u041e \u041e\u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u041c\u041e &#8230;<\/td>\n<td>03M2009<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>642001<\/td>\n<td>\u0412\u041e\u041b\u0416\u0421\u041a\u0418\u041c \u0420\u041e\u0412\u0414 \u0413\u041e\u0420.\u0421\u0410\u0420\u0410\u0422\u041e\u0412\u0410<\/td>\n<td>04M2002<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>162004<\/td>\n<td>\u0423\u0412\u0414 \u041c\u041e\u0421\u041a\u041e\u0412\u0421\u041a\u041e\u0413\u041e \u0420\u0410\u0419\u041e\u041d\u0410 \u0413.\u041a\u0410\u0417\u0410\u041d\u042c<\/td>\n<td>12M2002<\/td>\n<\/tr>\n<tr>\n<th>5<\/th>\n<td>80001<\/td>\n<td>\u041e\u0422\u0414\u0415\u041b\u041e\u041c \u041e\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f \u041a\u0410\u041b\u041c\u042b\u041a\u0418\u042f \u0412 \u0413 \u042d\u041b\u0418\u0421\u0422\u0410<\/td>\n<td>08M2009<\/td>\n<\/tr>\n<\/table>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u0435 \u00ab\u043a\u0435\u043c \u0432\u044b\u0434\u0430\u043d \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u00bb \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">example_code = train.passport_div_code[train.passport_div_code.duplicated()].values[0] for i in train.passport_issuer_name[train.passport_div_code == example_code].drop_duplicates():     print i <\/code><\/pre>\n<p>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416. \u0420-\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420. \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420-\u041d\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u041e\u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u041a \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420-\u041e\u041d\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u041a \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u041e\u0422\u0414\u0415\u041b\u0415\u041d\u0418\u0415\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u041e\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u0418\u0413\u041e\u0420\u0421\u041a\u041e\u041c \u0420\u0410\u0419\u041e\u041d\u0415<br \/>  \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420. \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u0413\u041e \u0420-\u041d\u0410<br \/>  \u041e\u0422\u0414\u0415\u041b\u041e\u041c \u0423\u0424\u041c\u0421 \u0420\u041e\u0421\u0421\u0418\u0418 \u041f\u041e \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0415 \u041a\u0410\u0420\u0415\u041b\u0418\u042f \u0412 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u041c<br \/>  \u0423\u0424\u041c\u0421 \u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0418 \u041a\u0410\u0420\u0415\u041b\u0418\u0418 \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u041e\u0413\u041e \u0420-\u041e\u041d<br \/>  \u041c\u0415\u0414\u0412\u0415\u0416\u042c\u0415\u0413\u041e\u0420\u0421\u041a\u0418\u041c \u041e\u0412\u0414<\/p>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043f\u043e\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0440\u0438\u0432\u043e. \u041d\u043e \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043a \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 (\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u043c\u0443) \u0432\u0438\u0434\u0443.<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0431\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u0443\u043a\u0432\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438. \u042d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 str, \u0441\u0442\u043e\u043b\u0431\u0446\u0430 DataFrame&#8217;a. \u042d\u0442\u043e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c \u043a\u0430\u043a \u0441 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0443 \u043f\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c:<\/p>\n<pre><code class=\"python\">train.passport_issuer_name = train.passport_issuer_name.str.lower() train[train.passport_div_code == example_code].head(5) <\/code><\/pre>\n<p>  <\/p>\n<table>\n<tr>\n<th><\/th>\n<th>passport_div_code<\/th>\n<th>passport_issuer_name<\/th>\n<th>passport_issue_month\/year<\/th>\n<\/tr>\n<tr>\n<th>id<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<tr>\n<th>19<\/th>\n<td>100010<\/td>\n<td>\u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0444\u043c\u0441 \u0440\u043e\u0441\u0441\u0438\u0438 \u043f\u043e \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u043a\u0430\u0440\u0435\u043b\u0438\u044f \u0432&#8230;<\/td>\n<td>04M2008<\/td>\n<\/tr>\n<tr>\n<th>22<\/th>\n<td>100010<\/td>\n<td>\u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0444\u043c\u0441 \u0440\u043e\u0441\u0441\u0438\u0438 \u043f\u043e \u0440. \u043a\u0430\u0440\u0435\u043b\u0438\u044f \u0432 \u043c\u0435\u0434\u0432\u0435\u0436\u044c&#8230;<\/td>\n<td>10M2009<\/td>\n<\/tr>\n<tr>\n<th>5642<\/th>\n<td>100010<\/td>\n<td>\u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0444\u043c\u0441 \u0440\u043e\u0441\u0441\u0438\u0438 \u043f\u043e \u0440\u0435\u0441\u043f \u043a\u0430\u0440\u0435\u043b\u0438\u044f \u0432 \u043c\u0435\u0434\u0432\u0435&#8230;<\/td>\n<td>08M2008<\/td>\n<\/tr>\n<tr>\n<th>6668<\/th>\n<td>100010<\/td>\n<td>\u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0444\u043c\u0441 \u0440\u043e\u0441\u0441\u0438\u0438 \u043f\u043e \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u043a\u0430\u0440\u0435\u043b\u0438\u044f \u0432&#8230;<\/td>\n<td>08M2011<\/td>\n<\/tr>\n<tr>\n<th>8732<\/th>\n<td>100010<\/td>\n<td>\u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0444\u043c\u0441 \u0440\u043e\u0441\u0441\u0438\u0438 \u043f\u043e \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u043a\u0430\u0440\u0435\u043b\u0438\u044f \u0432&#8230;<\/td>\n<td>08M2012<\/td>\n<\/tr>\n<\/table>\n<p>  C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0434\u043e \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0439\u043e\u043d, \u0433\u043e\u0440\u043e\u0434 \u0438 \u0442.\u0434. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. <b>Pandas<\/b> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443. \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">train.passport_issuer_name = train.passport_issuer_name.str.replace(u'\u0440-(\u0430|\u0439|\u043e|\u043d|\u0435)*',u'\u0440\u0430\u0439\u043e\u043d') train.passport_issuer_name = train.passport_issuer_name.str.replace(u' \u0433( |\\.|(\u043e\u0440(\\.| )))', u' \u0433\u043e\u0440\u043e\u0434 ') train.passport_issuer_name = train.passport_issuer_name.str.replace(u' \u0440(\\.|\u0435\u0441\u043f )', u' \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 ') train.passport_issuer_name = train.passport_issuer_name.str.replace(u' \u0430\u0434\u043c([\u0430-\u044f]*)(\\.)?', u' \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 ') train.passport_issuer_name = train.passport_issuer_name.str.replace(u' \u043e\u043a\u0440(\\.| |\u0443\u0433\u0430( )?)', u' \u043e\u043a\u0440\u0443\u0433 ') train.passport_issuer_name = train.passport_issuer_name.str.replace(u' \u0430\u043e ', u' \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433 ') <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 \u0432\u0441\u0435\u0445 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0431\u0443\u043a\u0432, \u0434\u0435\u0444\u0438\u0441\u043e\u0432 \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0430\u0441\u043f\u043e\u0440\u0442 \u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u0430\u043c\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438, \u0438 \u044d\u0442\u043e \u0443\u0445\u0443\u0434\u0448\u0438\u0442 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443:<\/p>\n<pre><code class=\"python\">train.passport_issuer_name = train.passport_issuer_name.str.replace(u' - ?', u'-') train.passport_issuer_name = train.passport_issuer_name.str.replace(u'[^\u0430-\u044f -]','') train.passport_issuer_name = train.passport_issuer_name.str.replace(u'- ',' ') train.passport_issuer_name = train.passport_issuer_name.str.replace(u'  *',' ') <\/code><\/pre>\n<p>  \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0438\u043f\u0430 \u0423\u0412\u0414, \u0423\u0424\u041d\u0421, \u0426\u0410\u041e, \u0412\u0410\u041e \u0438 \u0442.\u0434., \u0442.\u043a. \u044d\u0442\u0438\u0445 \u0438\u0445 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u00ab\u0423\u0412\u0414\u00bb \u0438 \u00ab\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b\u00bb, \u0442\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0442. \u043a. \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<br \/>  \u0418\u0442\u0430\u043a \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0435. \u0418, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0443:<\/p>\n<pre><code class=\"python\">sokr = {u'\u043d\u0430\u043e': u'\u043d\u0435\u043d\u0435\u0446\u043a\u0438\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0445\u043c\u0430\u043e': u'\u0445\u0430\u043d\u0442\u044b-\u043c\u0430\u043d\u0441\u0438\u0439\u0441\u043a\u0438\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0447\u0430\u043e': u'\u0447\u0443\u043a\u043e\u0442\u0441\u043a\u0438\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u044f\u043d\u0430\u043e': u'\u044f\u043c\u0430\u043b\u043e-\u043d\u0435\u043d\u0435\u0446\u043a\u0438\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0432\u0430\u043e': u'\u0432\u043e\u0441\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0446\u0430\u043e': u'\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0437\u0430\u043e': u'\u0437\u0430\u043f\u0430\u0434\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'c\u0430\u043e': u'\u0441\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u044e\u0430\u043e': u'\u044e\u0436\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u044e\u0437\u0430\u043e': u'\u044e\u0433\u043e-\u0437\u0430\u043f\u0430\u0434\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u044e\u0432\u0430\u043e': u'\u044e\u0433\u043e-\u0432\u043e\u0441\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0441\u0432\u0430\u043e': u'\u0441\u0435\u0432\u0435\u0440\u043e-\u0432\u043e\u0441\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u0441\u0437\u0430\u043e': u'\u0441\u0435\u0432\u0435\u0440\u043e-\u0437\u0430\u043f\u0430\u0434\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433', u'\u043e\u0443\u0444\u043c\u0441': u'\u043e\u0442\u0434\u0435\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b', u'\u043e\u0444\u043c\u0441': u'\u043e\u0442\u0434\u0435\u043b \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b', u'\u0443\u0444\u043c\u0441': u'\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b', u'\u0443\u0432\u0434': u'\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u0440\u043e\u0432\u0434': u'\u0440\u0430\u0439\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0434\u0435\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u0433\u043e\u0432\u0434': u'\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u0442\u0434\u0435\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u0440\u0443\u0432\u0434': u'\u0440\u0430\u0439\u043e\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u043e\u0432\u0434': u'\u043e\u0442\u0434\u0435\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u043e\u0443\u0432\u0434': u'\u043e\u0442\u0434\u0435\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u0435\u043b', u'\u043c\u0440\u043e': u'\u043c\u0435\u0436\u0440\u0430\u0439\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0434\u0435\u043b', u'\u043f\u0441': u'\u043f\u0430\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u0441\u0442\u043e\u043b', u'\u0442\u043f': u'\u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442'} <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0443 \u0430\u0431\u0440\u0438\u0432\u0435\u0430\u0442\u0443\u0440 \u0438 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<pre><code class=\"python\">for i in sokr.iterkeys():     train.passport_issuer_name = train.passport_issuer_name.str.replace(u'( %s )|(^%s)|(%s$)' % (i,i,i), u' %s ' % (sokr[i]))      #\u0443\u0434\u0430\u043b\u0438\u043c \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 \u0438 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 train.passport_issuer_name = train.passport_issuer_name.str.lstrip() train.passport_issuer_name = train.passport_issuer_name.str.rstrip() <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u044f \u00ab\u043a\u0435\u043c \u0432\u044b\u0434\u0430\u043d \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u00bb \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c. \u0418 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u043e\u043b\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u0442\u0430 \u0432\u044b\u0434\u0430\u0447\u0438.<br \/>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435: <i>\u043c\u0435\u0441\u044f\u0446<b>M<\/b>\u0433\u043e\u0434<\/i>.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0431\u0443\u043a\u0432\u0443 \u00abM\u00bb \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u0435 \u043a \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u0442\u0438\u043f\u0443. \u041d\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0442.\u043a. \u043d\u0430 \u043e\u0434\u0438\u043d \u043c\u0435\u0441\u044f\u0446 \u0432 \u0433\u043e\u0434\u0443 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432\u044b\u0434\u0430\u0432\u0430\u0432\u0448\u0438\u0445 \u043f\u0430\u0441\u043f\u043e\u0440\u0442, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u0440\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u043c \u0435\u0433\u043e \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code class=\"python\">train = train.drop(['passport_issue_month\/year'], axis=1) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \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 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0431\u044b\u043b\u043e \u0438\u0445 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435.<br \/>  \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"http:\/\/scikit-learn.org\/\">scikit-learn<\/a> \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u043e \u043d\u0430\u0441 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <a href=\"http:\/\/scikit-learn.org\/stable\/modules\/feature_extraction.html#feature-extraction\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432<\/a> \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0437 \u043d\u0438\u0445 \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0434\u0432\u0430:  <\/p>\n<ol>\n<li><a href=\"http:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.feature_extraction.FeatureHasher.html#sklearn.feature_extraction.FeatureHasher\">FeatureHasher<\/a><\/li>\n<li><a href=\"http:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer\">CountVectorizer<\/a><\/li>\n<li><a href=\"http:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.feature_extraction.text.HashingVectorizer.html#sklearn.feature_extraction.text.HashingVectorizer\">HashingVectorizer<\/a><\/li>\n<\/ol>\n<p>  <b>FeatureHasher<\/b> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"http:\/\/ru.wikipedia.org\/wiki\/Murmur2\">Murmurhash3<\/a>)<br \/>  <b>CountVectorizer<\/b> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u043c\u0430\u0442\u0440\u0446\u0438\u0446\u0443, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430(\u0441\u043b\u043e\u0432\u0430) \u0432 \u0442\u0435\u043a\u0441\u0442. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 FeatureHasher \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c <a href=\"http:\/\/lingvocourse.ru\/wiki\/index.php\/%D0%A2%D0%BE%D0%BA%D0%B5%D0%BD%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80\">\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440<\/a>), \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<br \/>  \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b CountVectorizer \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438:  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>\u0440\u0430\u0437 \u0434\u0432\u0430 \u0442\u0440\u0438<\/td>\n<\/tr>\n<tr>\n<td>\u0442\u0440\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0434\u0432\u0430 \u0434\u0432\u0430<\/td>\n<\/tr>\n<tr>\n<td>\u0440\u0430\u0437 \u0440\u0430\u0437 \u0440\u0430\u0437 \u0447\u0435\u0442\u044b\u0440\u0435<\/td>\n<\/tr>\n<\/table>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 CountVectorizer \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438\u0437 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442:<\/p>\n<p>  [\u0440\u0430\u0437, \u0434\u0432\u0430, \u0442\u0440\u0438, \u0447\u0435\u0442\u044b\u0440\u0435]<\/p>\n<p>  \u0414\u043b\u0438\u043d\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u0437 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u043d\u043e\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e 4). \u0410 \u043d\u043e\u043c\u0435\u0440\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0440\u0430\u0437 \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<p>  \u0440\u0430\u0437 \u0434\u0432\u0430 \u0442\u0440\u0438 &#8212;&gt; [1,1,1,0]<br \/>  \u0442\u0440\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0434\u0432\u0430 \u0434\u0432\u0430 &#8212;&gt; [0,2,1,1]<\/p>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:  <\/p>\n<table>\n<tr>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>1,1,1,0<\/td>\n<\/tr>\n<tr>\n<td>0,2,1,1<\/td>\n<\/tr>\n<tr>\n<td>3,0,0,1<\/td>\n<\/tr>\n<\/table>\n<p>  <b>HashingVectorizer<\/b> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043c\u0435\u0441\u044c\u044e \u0434\u0432\u0443\u0445 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0412 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u043a\u0430\u043a \u0432 <i>FeatureHasher<\/i>) \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440 (\u043a\u0430\u043a \u0432 <i>CountVectorizer<\/i>). \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u043b\u0438\u0436\u0435 \u043a FeatureHasher.<br \/>  \u0418\u0442\u0430\u043a, \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043d\u0430 \u043d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: &quot;<i>\u2026 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a<b>\u0430<\/b> \u043a\u0430\u0440\u0435\u043b\u0438\u044f&#8230;<\/i>&quot; \u0438 &quot;<i>\u2026 \u043f\u043e \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a<b>\u0435<\/b> \u043a\u0430\u0440\u0435\u043b\u0438\u044f&#8230;<\/i>&quot;.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043a <a href=\"http:\/\/pymorphy2.readthedocs.org\/en\/0.1\/glossary.html#term-1\">\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435<\/a>.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 <a href=\"http:\/\/habrahabr.ru\/post\/176575\/\">pymorphy<\/a> \u0438\u043b\u0438 <a href=\"http:\/\/nltk.org\/\">nltk<\/a>. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439, \u0442.\u043a. \u043e\u043d \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c. \u0418\u0442\u0430\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043e\u0447\u0438\u0441\u043a\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">def f_tokenizer(s):     morph = pymorphy2.MorphAnalyzer()     if type(s) == unicode:         t = s.split(' ')     else:         t = s     f = []     for j in t:         m = morph.parse(j.replace('.',''))         if len(m) &lt;&gt; 0:             wrd = m[0]             if wrd.tag.POS not in ('NUMR','PREP','CONJ','PRCL','INTJ'):                 f.append(wrd.normal_form)     return f <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ul>\n<li>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043d\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0430\u0437\u0431\u043e\u0440<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0438\u0432\u043d\u043e\u043c, \u043f\u0440\u0435\u0434\u043b\u043e\u0433\u043e\u043c, \u0441\u043e\u044e\u0437\u043e\u043c, \u0447\u0430\u0441\u0442\u0438\u0446\u0435\u0439 \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u043e\u043c\u0435\u0442\u0438\u0435\u043c \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <i>CountVectorizer<\/i>. \u041e\u043d \u0432\u044b\u0431\u0440\u0430\u043d \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u0430\u043a \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 \u043e\u043d \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">coder = HashingVectorizer(tokenizer=f_tokenizer, n_features=256) <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>n_features<\/i>. \u0427\u0435\u0440\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u0438\u043d\u0430 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 256 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 <i>HashingVectorizer<\/i> \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0434 <i>CountVectorizer<\/i>, \u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043a\u0430\u043a SVM.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043a \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443:<\/p>\n<pre><code class=\"python\">TrainNotDuble = train.drop_duplicates() trn = coder.fit_transform(TrainNotDuble.passport_issuer_name.tolist()).toarray() <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<pre><code class=\"python\">target = TrainNotDuble.passport_div_code.values <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u0437\u0430\u0434\u0430\u0447 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"http:\/\/ru.wikipedia.org\/wiki\/Random_forest\">RandomForest<\/a>. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u043c\u0435\u043d\u0435\u0435 50%) \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<br \/>  \u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0442. \u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/chart.googleapis.com\/chart?cht=tx&amp;chl=Accuracy%20%3D%20%5Cfrac%7BP%7D%7BN%7D\" title=\"LaTeX:Accuracy = \\frac{P}{N}\"\/><br \/>  , \u0433\u0434\u0435 <i>P<\/i> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043d\u044f\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0430 <i>N<\/i> \u2013 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<br \/>  \u0412 \u043f\u0430\u043a\u0435\u0442\u0435 scikit-learn \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f: <b><a href=\"http:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.metrics.accuracy_score.html#sklearn.metrics.accuracy_score\">accuracy_score<\/a><\/b><br \/>  \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u00ab\u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u00bb, \u0442.\u043a. 256 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e:<\/p>\n<pre><code class=\"python\">pca = PCA(n_components = 15) trn = pca.fit_transform(trn) <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">model = RandomForestClassifier(n_estimators = 100, criterion='entropy')  TRNtrain, TRNtest, TARtrain, TARtest = train_test_split(trn, target, test_size=0.4) model.fit(TRNtrain, TARtrain) print 'accuracy_score: ', accuracy_score(TARtest, model.predict(TRNtest)) <\/code><\/pre>\n<p>  accuracy_score: 0.6523456<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432 65% \u0431\u043b\u0438\u0437\u043a\u0430 \u043a \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044e. \u0427\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u043f\u0438\u0441\u043a\u0438. \u0414\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043f\u0440\u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044f, \u0442. \u0435. \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c\u0441\u044f \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0435\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438.<br \/>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u044d\u0442\u0430\u043f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043e\u043f\u0443\u0449\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e, \u0442. \u043a. \u0432 \u043d\u0435\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 (\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0437\u044f\u0432 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438)<br \/>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0447\u0438 \u0435\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/205360\/\"> http:\/\/habrahabr.ru\/post\/205360\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/204500\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u0433\u043e \u0441\u043a\u043e\u0440\u0438\u043d\u0433\u0430. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u0442\u043e\u0433\u043e \u0436\u0435 <a href=\"https:\/\/www.tcsbank.ru\/tournament\/\">\u0442\u0443\u0440\u043d\u0438\u0440\u0430<\/a>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u00ab\u0417\u0430\u0434\u0430\u0447\u0438 \u043e \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430\u0445\u00bb (\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u21162).<br \/>  \u041f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (<a href=\"http:\/\/pandas.pydata.org\/pandas-docs\/stable\/\">pandas<\/a>, <a href=\"http:\/\/scikit-learn.org\/\">scikit-learn<\/a>, <a href=\"https:\/\/pymorphy2.readthedocs.org\/en\/latest\/index.html\">pymorphy<\/a>).  <\/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-205360","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205360","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=205360"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205360\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=205360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=205360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=205360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}