{"id":355464,"date":"2024-05-20T23:09:19","date_gmt":"2024-05-20T23:09:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=355464"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-20T23:09:19","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=355464","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435: \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eaa\/94b\/3e7\/eaa94b3e7aa692f215596505749cdbd2.png\" width=\"1023\" height=\"576\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eaa\/94b\/3e7\/eaa94b3e7aa692f215596505749cdbd2.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0415\u0433\u043e\u0440 \u0413\u0435\u0440\u0448\u0435\u0432\u0441\u043a\u0438\u0439 \u0438 \u041d\u0438\u043a\u0438\u0442\u0430 \u0413\u043e\u0440\u0431\u0430\u0447\u0451\u0432, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438\u00a0<a href=\"https:\/\/newtechaudit.ru\/\"><u>\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/u><\/a>.<\/p>\n<p><strong>\u0410\u0443\u0434\u0438\u0442<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0410\u0443\u0434\u0438\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u043f\u044b\u0442 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0442\u0435\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0430\u0443\u0434\u0438\u0442 \u0432 \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0443\u044e \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u0440\u0443\u043f\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 (ML) \u0432 \u0430\u0443\u0434\u0438\u0442. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043e\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.geeksforgeeks.org\/5-mind-blowing-ways-facebook-uses-machine-learning\/\">\u0432 Facebook<\/a> \u0438 <a href=\"https:\/\/www.geeksforgeeks.org\/how-amazon-uses-machine-learning\/\">Amazon<\/a>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430, \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u043a\u043e\u0432 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u0442\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0432 \u0430\u0443\u0434\u0438\u0442\u0435.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0430\u0439\u0442\u0430 Kaggle, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e <a href=\"https:\/\/www.kaggle.com\/datasets\/sid321axn\/audit-data\"><u>Audit Data<\/u><\/a>: \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0440\u043c.<\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 import numpy as np import pandas as pd  import seaborn as sns import matplotlib.pyplot as plt  from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler  # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 df = pd.read_csv('audit_data.csv') df.head()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9ad\/a89\/8bb\/9ada898bbe6adfa430b1683f621138d2.png\" width=\"1003\" height=\"169\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ad\/a89\/8bb\/9ada898bbe6adfa430b1683f621138d2.png\"\/><\/figure>\n<pre><code class=\"python\">df.info()<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cf1\/5dc\/d1a\/cf15dcd1a791af6e473ed45b0cf144f9.png\" width=\"370\" height=\"589\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cf1\/5dc\/d1a\/cf15dcd1a791af6e473ed45b0cf144f9.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cf1\/5dc\/d1a\/cf15dcd1a791af6e473ed45b0cf144f9.png\" width=\"370\" height=\"589\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cf1\/5dc\/d1a\/cf15dcd1a791af6e473ed45b0cf144f9.png\"\/><\/figure>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043f\u0438\u044e data-\u0444\u0440\u0435\u0439\u043c\u0430 df_ml = df.copy()  # \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u043c\u0438 df_ml.Money_Value.fillna(value = df_ml.Money_Value.median(), inplace=True) df_ml['LOCATION_ID'].unique()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4d\/acb\/60b\/b4dacb60bf7e00dcdc6aa38c12ea09e7.png\" width=\"583\" height=\"98\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4d\/acb\/60b\/b4dacb60bf7e00dcdc6aa38c12ea09e7.png\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"python\">location_dummies = pd.get_dummies(df_ml['LOCATION_ID'], prefix='location') df_ml = pd.concat([df_ml, location_dummies], axis=1) df_ml = df_ml.drop('LOCATION_ID', axis=1)  X = df_ml.drop(columns = 'Risk') y = df_ml.Risk<\/code><\/pre>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 X_train, X_test, y_train, y_test = train_test_split(X, y, train_size=0.7,stratify = y, shuffle=True, random_state=42)<\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import GradientBoostingClassifier from sklearn import svm from sklearn import metrics<\/code><\/pre>\n<pre><code class=\"python\"># \u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 models = {     \"Logistic Regression\": LogisticRegression(solver= 'liblinear', random_state=42),     \"Decision Tree\": DecisionTreeClassifier(),     \"Random Forest\": RandomForestClassifier(n_estimators=100, random_state=0),     \"GB\": GradientBoostingClassifier()  }  model_list=[] accuracy_list=[] recall_list=[] precision_list=[] specificity_list=[] f1_score_list=[]   for i in range(len(list(models))):     model=list(models.values())[i]     model.fit(X_train,y_train)      y_train_pred = model.predict(X_train)     y_test_pred = model.predict(X_test)          score = round(model.score(X_test, y_test), 4)             tn, fp, fn, tp = metrics.confusion_matrix(y_test, y_test_pred).ravel()            recall = round(tp\/(tp+fn), 3)        precision = round(tp\/(tp+fp), 3)       specificity =round(tn\/(tn+fp),3)      f1_score =  round(2*precision*recall\/(precision + recall), 3)          print(list(models.keys())[i])     model_list.append(list(models.keys())[i])          print('Model performance for Test set')     print(\"- Accuracy: {}\".format(score))     print(\"- Recall: {}\".format(recall))     print(\"- Precision: {}\".format(precision))     print(\"- Specificity: {}\".format(specificity))     print(\"- f1_score: {}\".format(f1_score))          accuracy_list.append(score)     recall_list.append(recall)     precision_list.append(precision)     specificity_list.append(specificity)     f1_score_list.append(f1_score)          print('='*35)     print('\\n')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/96f\/c75\/fc4\/96fc75fc4497b388a2a11826832752d6.png\" width=\"641\" height=\"330\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96f\/c75\/fc4\/96fc75fc4497b388a2a11826832752d6.png\"\/><\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043e\u0431\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0444\u0438\u0440\u043c\u0430\u043c, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0436\u0443\u0442, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u0438 \u0444\u0438\u0440\u043c\u044b \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><strong>\u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f,<\/strong> \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443;<\/p>\n<\/li>\n<li>\n<p><strong>\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f,<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u043e\u0439 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0441\u0442 \u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043b\u0435\u0441,<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u0440\u0435\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432;<\/p>\n<\/li>\n<li>\n<p><strong>\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433<\/strong>\u00a0\u2014 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438: <\/p>\n<ul>\n<li>\n<p><strong>Accuracy<\/strong> (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>accuracy = (TP + TN) \/ (TP + TN + FP + FN)<\/code>, \u0433\u0434\u0435 TP (True Positive)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, TN (True Negative)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, FP (False Positive)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438 FN (False Negative)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>Precision<\/strong> (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>precision = TP \/ (TP + FP)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Recall<\/strong> (\u043f\u043e\u043b\u043d\u043e\u0442\u0430): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>recall = TP \/ (TP + FN)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Specificity<\/strong> (\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>specificity = TN \/ (TN + FP)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>F1 score<\/strong>: \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 precision \u0438 recall. \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>F1 score = 2 * (precision * recall) \/ (precision + recall)<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0436\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d23\/1f8\/caf\/d231f8cafee4b1ead54ef318910b7db8.jpg\" alt=\"\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0441\u0435\u0431\u044f \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.\" title=\"\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0441\u0435\u0431\u044f \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.\" width=\"1920\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d23\/1f8\/caf\/d231f8cafee4b1ead54ef318910b7db8.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0441\u0435\u0431\u044f \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/figcaption><\/div>\n<\/figure>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/h2>\n<p>\u0412 \u0430\u0443\u0434\u0438\u0442\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0451 \u0446\u0435\u043b\u044c\u00a0\u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u0421 Kaggle \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.kaggle.com\/datasets\/krishnaraj30\/salary-prediction-data-simple-linear-regression\"><u>Salary Prediction Data<\/u><\/a>, \u0432 \u043d\u0451\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u0435. \u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438.<\/p>\n<pre><code class=\"python\"># \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 df = pd.read_csv('Salary_Data.csv') df.head(10) target = 'Salary' X = df.loc[:,df.columns!=target] y = df.loc[:,df.columns==target]<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e59\/7cd\/7c5\/e597cd7c574c5dbc59c6f6da11af450c.png\" width=\"203\" height=\"302\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e59\/7cd\/7c5\/e597cd7c574c5dbc59c6f6da11af450c.png\"\/><\/figure>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 x_train, x_test, y_train, y_test= train_test_split(X, y, test_size= .2, random_state=0)  <\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c from sklearn.linear_model import LinearRegression lr= LinearRegression()    lr.fit(x_train, y_train)   y_pred= lr.predict(x_test)   x_pred= lr.predict(x_train)<\/code><\/pre>\n<pre><code class=\"python\"># \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u044b \u043e\u0442 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b import matplotlib.pyplot as mtp   mtp.scatter(x_train, y_train, color=\"green\")     mtp.plot(x_train, x_pred, color=\"red\")      mtp.title(\"Salary vs Experience (Training Dataset)\")    mtp.xlabel(\"Years of Experience\")    mtp.ylabel(\"Salary(In Rupees)\")    mtp.show()    <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d88\/b69\/d45\/d88b69d45cc56d9805169f9b2ba8ea9b.png\" width=\"636\" height=\"462\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d88\/b69\/d45\/d88b69d45cc56d9805169f9b2ba8ea9b.png\"\/><\/figure>\n<pre><code class=\"python\">mtp.scatter(x_test, y_test, color=\"blue\")     mtp.plot(x_train, x_pred, color=\"red\")      mtp.title(\"Salary vs Experience (Test Dataset)\")    mtp.xlabel(\"Years of Experience\")    mtp.ylabel(\"Salary(In Rupees)\")    mtp.show()  <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e1c\/c37\/60e\/e1cc3760ede30ccb315c689a4a6fa23e.png\" width=\"648\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e1c\/c37\/60e\/e1cc3760ede30ccb315c689a4a6fa23e.png\"\/><\/figure>\n<pre><code class=\"python\">from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error  regressor = LinearRegression() regressor.fit(x_train,y_train) r2_score = regressor.score(x_test,y_test) r2_score = r2_score*100  predict = lr.predict(x_test) mse = mean_squared_error(predict,y_test, squared=False) mae = mean_absolute_error(predict,y_test)<\/code><\/pre>\n<p>\u0423 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. <\/p>\n<ul>\n<li>\n<p><strong>Mean Squared Error, MSE<\/strong> (\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430): \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438. MSE \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 MSE, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>Mean Absolute Error, MAE<\/strong> (\u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430): \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. MAE \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.  <\/p>\n<\/li>\n<li>\n<p><strong>Coefficient of Determination, R^2<\/strong> (\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438): \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R^2 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1, \u0433\u0434\u0435 1\u00a0\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 0\u00a0\u2014 \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <\/p>\n<\/li>\n<\/ul>\n<p> \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438:<\/p>\n<p><strong>R^2 = <\/strong>98,8169515729126 %<\/p>\n<p><strong>MAE<\/strong> = 2446,1723690465064<\/p>\n<p><strong>MSE<\/strong> = 3580,979237321345<\/p>\n<p>\u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0441\u0442\u0430\u0436\u0430, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u0435\u0434\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b, \u0441\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 Kaggle \u0438 \u0431\u0435\u0440\u0451\u043c data-\u0444\u0440\u0435\u0439\u043c <a href=\"https:\/\/www.kaggle.com\/datasets\/arjunbhasin2013\/ccdata\"><u>Credit Card Dataset<\/u><\/a>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u0445 \u043a\u0430\u0440\u0442\u0430\u0445 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u044c, \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u0445\u043e\u0436\u0438\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"python\"># \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 df=pd.read_csv('CC GENERAL.csv') df.head()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a6e\/865\/70b\/a6e86570bf0cdab722fcad413f2baadb.png\" width=\"670\" height=\"120\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6e\/865\/70b\/a6e86570bf0cdab722fcad413f2baadb.png\"\/><\/figure>\n<pre><code class=\"python\">df.info()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/edc\/348\/dfa\/edc348dfa3728a8d4e1897115e1f5810.png\" width=\"531\" height=\"562\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/edc\/348\/dfa\/edc348dfa3728a8d4e1897115e1f5810.png\"\/><\/figure>\n<pre><code class=\"python\">df.isnull().sum()<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0c5\/624\/ffd\/0c5624ffdbd9f233d38d026a1236a389.png\" width=\"333\" height=\"431\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0c5\/624\/ffd\/0c5624ffdbd9f233d38d026a1236a389.png\"\/><\/figure>\n<pre><code class=\"python\"># \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u043c\u0438 df['MINIMUM_PAYMENTS']=df['MINIMUM_PAYMENTS'].fillna(df['MINIMUM_PAYMENTS'].mean())  from sklearn.cluster import KMeans  wcss=[]  for k in range(1,11):     kmeans=KMeans(n_clusters=k, init='k-means++', random_state=0)     kmeans.fit(X)     wcss.append(kmeans.inertia_)<\/code><\/pre>\n<pre><code class=\"python\"># \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u00ab\u043b\u043e\u043a\u0442\u044f\u00bb plt.plot(range(1,11), wcss) plt.title('The elbow method') plt.xlabel('Number of Clusters') plt.ylabel('WCSS') plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bae\/ac7\/e09\/baeac7e090304acddb7cc7fab1073219.png\" width=\"598\" height=\"453\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bae\/ac7\/e09\/baeac7e090304acddb7cc7fab1073219.png\"\/><\/figure>\n<pre><code class=\"python\">kmeans=KMeans(n_clusters=4, init='k-means++', random_state=0) y_kmeans=kmeans.fit_predict(X)  cdf['cluster']=y_kmeans cdf1=cdf[cdf.cluster==0] cdf2=cdf[cdf.cluster==1] cdf3=cdf[cdf.cluster==2] cdf4=cdf[cdf.cluster==3]  plt.figure(figsize=(10,10))  plt.scatter(cdf1['PURCHASES'], cdf1[\"PAYMENTS\"], color='green') plt.scatter(cdf2['PURCHASES'], cdf2[\"PAYMENTS\"], color='red') plt.scatter(cdf3['PURCHASES'], cdf3[\"PAYMENTS\"], color='orange') plt.scatter(cdf4['PURCHASES'], cdf4[\"PAYMENTS\"], color='blue')   plt.xlabel(\"Purchases\") plt.ylabel(\"Payments\") plt.legend()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ef\/4d4\/e42\/5ef4d4e423ee2db0fefb99f028c05cf1.png\" width=\"868\" height=\"833\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ef\/4d4\/e42\/5ef4d4e423ee2db0fefb99f028c05cf1.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 4 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0412 \u0430\u0443\u0434\u0438\u0442\u0435 \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0438.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f  <\/h2>\n<p>\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0435\u0451 \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0410\u0443\u0434\u0438\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439, \u0432\u0438\u0434\u0435\u043e \u0441 \u043a\u0430\u043c\u0435\u0440; \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0438\u0437 \u043d\u0435\u0433\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441 Kaggle \u043d\u0430\u0431\u043e\u0440 <a href=\"https:\/\/www.kaggle.com\/datasets\/omgits0mar\/signature-verification-and-identification\/code\"><u>Handwritten Signature Identification<\/u><\/a>, \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0445 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438.<\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import pathlib import cv2 import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.models import Sequential  import warnings warnings.filterwarnings('ignore') os.environ[\"KMP_WARNINGS\"] = \"FALSE\"  TRAIN_PATH = pathlib.Path(\"Train\") VAL_PATH = pathlib.Path(\"Test\")  img = cv2.imread(\"Train\/PersonA\/Copy of personA_1.png\") plt.imshow(img)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/969\/592\/2de\/9695922de8de52c282253f88fbd09485.png\" width=\"562\" height=\"332\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/969\/592\/2de\/9695922de8de52c282253f88fbd09485.png\"\/><\/figure>\n<pre><code class=\"python\">img.shape  num_classes = 5 # \u0438\u043c\u0435\u0435\u0442\u0441\u044f 5 \u0447\u0435\u043b\u043e\u0432\u0435\u043a: A,B,C,D,E img_height = 224 img_width = 224  from tensorflow.keras.applications import MobileNetV3Large from tensorflow.keras.applications.mobilenet import preprocess_input from tensorflow.keras.preprocessing import image<\/code><\/pre>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DataGen \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0438\u0445.  <\/p>\n<pre><code class=\"python\">BATCH_SIZE = 32 IMAGE_SIZE = (img_height, img_width)  train_data_generator = image.ImageDataGenerator(                                  horizontal_flip=True,                                  preprocessing_function=preprocess_input                                             ) test_data_generator = image.ImageDataGenerator(                                  preprocessing_function=preprocess_input)   train_generator = train_data_generator.flow_from_directory                                                 (directory= TRAIN_PATH,                                                 target_size=IMAGE_SIZE,                                                 color_mode= 'rgb',                                                 class_mode= 'categocal',                                                 batch_size= BATCH_SIZE)  val_generator = test_data_generator.flow_from_directory                                                 (directory= VAL_PATH,                                                 target_size=IMAGE_SIZE,                                                 color_mode= 'rgb',                                                 class_mode= 'categorical',                                                 batch_size= BATCH_SIZE)<\/code><\/pre>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c MobileNetv3, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043d\u0430 ImageNet, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c Adam.<\/p>\n<pre><code class=\"python\">base = MobileNetV3Large(weights='imagenet', include_top=False) base.trainable = False  model = Sequential([     base,     layers.GlobalAveragePooling2D(),     layers.Dense(256, activation='relu'),     layers.Dropout(0.1),     layers.Dense(128, activation='relu'),     layers.Dense(num_classes, activation = 'softmax') ])  model.compile(     optimizer=\"adam\",     loss=tf.keras.losses.CategoricalCrossentropy(from_logits=True),     metrics=['accuracy'])<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 10 \u044d\u043f\u043e\u0445\u0430\u0445. \u042d\u043f\u043e\u0445\u0430 (Epoch)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0446\u0438\u043a\u043b\u043e\u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 time, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 import time  start = time.time() history = model.fit_generator(train_generator, validation_data=val_generator, epochs=10) print(\"Total time: \", time.time() - start, \"seconds\")<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab7\/b66\/d0a\/ab7b66d0ad504ec0b6c392ded8cb598e.png\" width=\"647\" height=\"298\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ab7\/b66\/d0a\/ab7b66d0ad504ec0b6c392ded8cb598e.png\"\/><\/figure>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u00a0\u2014 \u0434\u043e\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u041f\u043e\u0442\u0435\u0440\u0438\u00a0\u2014 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<pre><code class=\"python\">acc = history.history['accuracy'] val_acc = history.history['val_accuracy']  loss = history.history['loss'] val_loss = history.history['val_loss'] plt.style.use('ggplot')  # \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 plt.figure(figsize=(8, 8)) plt.subplot(2, 1, 1) plt.plot(acc, label='Training Accuracy') plt.plot(val_acc, label='Validation Accuracy') plt.legend(loc='lower right') plt.ylabel('Accuracy') plt.title('Training and Validation Accuracy')  # \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c plt.subplot(2, 1, 2) plt.plot(loss, label='Training Loss') plt.plot(val_loss, label='Validation Loss') plt.legend(loc='upper right') plt.ylabel('Cross Entropy') plt.title('Training and Validation Loss') plt.xlabel('epoch') plt.show() model.save('MobileNetV3Large.h5')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3e\/b4f\/89b\/c3eb4f89ba2adcc9a0046a0847a494f7.png\" width=\"531\" height=\"539\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c3e\/b4f\/89b\/c3eb4f89ba2adcc9a0046a0847a494f7.png\"\/><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u0438\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043f\u043e\u0445. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 8 \u044d\u043f\u043e\u0445\u0430\u0445 \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430.<\/p>\n<pre><code class=\"python\">from keras.preprocessing import image from tensorflow.keras.utils import load_img  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 img = load_img(\"\/kaggle\/input\/signature-verification-and-identification\/Test\/PersonE\/Copy of personE_22.png\",target_size=(224,224)) img = np.asarray(img) plt.imshow(img) img = np.expand_dims(img, axis=0) img= preprocess_input(img)  output = saved_model.predict(img) print(output) if np.argmax(output) == 0 :   print(\"PersonA\") elif np.argmax(output) == 1 :   print(\"PersonB\") elif np.argmax(output) == 2 :   print(\"PersonC\") elif np.argmax(output) == 3 :   print(\"PersonD\") elif np.argmax(output) == 4 :   print(\"PersonE\")<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"python\">1\/1 [==============================] - 1s 1s\/step [[4.0784580e-06 1.9883872e-04 1.6808448e-05 5.4550100e-08 9.9978024e-01]] PersonE<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d79\/c87\/ef9\/d79c87ef92d7d32fb13eb65b32560c25.png\" width=\"287\" height=\"282\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d79\/c87\/ef9\/d79c87ef92d7d32fb13eb65b32560c25.png\"\/><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0430, \u0447\u044c\u044f \u044d\u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u0447\u0442\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435.<\/p>\n<h2>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u0440\u0438\u0441\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:  <\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/strong>: \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0430\u0443\u0434\u0438\u0442\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u043e\u0432 \u043e\u0442 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. <\/p>\n<ul>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430<\/strong>: \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435<\/strong>: \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0439, \u0440\u0438\u0441\u043a\u043e\u0432 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0430\u0443\u0434\u0438\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u0438\u043b\u0438 \u0440\u0438\u0441\u043a\u0430\u0445 \u0437\u0430\u0440\u0430\u043d\u0435\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043e \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0438\u0441\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/strong>: \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u0430\u043c. \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u043b\u0435\u0447\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>: \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0435 \u0438\u043b\u0438 \u0438\u0441\u043a\u0430\u0436\u0451\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u0430\u043c \u0438 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438<\/strong>: \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438\u043b\u0438 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0438\u0437\u044b<\/strong>: \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0432 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u0433\u043e \u0443\u0447\u0451\u0442\u0430 \u0440\u0438\u0441\u043a\u043e\u0432 \u0438 \u043d\u044e\u0430\u043d\u0441\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e\u00a0\u0442\u0430\u043a: ML\u00a0\u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e\u00a0\u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u043a\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e ML \u0441\u00a0\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/762472\/\"> https:\/\/habr.com\/ru\/articles\/762472\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0415\u0433\u043e\u0440 \u0413\u0435\u0440\u0448\u0435\u0432\u0441\u043a\u0438\u0439 \u0438 \u041d\u0438\u043a\u0438\u0442\u0430 \u0413\u043e\u0440\u0431\u0430\u0447\u0451\u0432, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438\u00a0<a href=\"https:\/\/newtechaudit.ru\/\"><u>\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/u><\/a>.<\/p>\n<p><strong>\u0410\u0443\u0434\u0438\u0442<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0410\u0443\u0434\u0438\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u043f\u044b\u0442 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0442\u0435\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0430\u0443\u0434\u0438\u0442 \u0432 \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0443\u044e \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u0440\u0443\u043f\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 (ML) \u0432 \u0430\u0443\u0434\u0438\u0442. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043e\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.geeksforgeeks.org\/5-mind-blowing-ways-facebook-uses-machine-learning\/\">\u0432 Facebook<\/a> \u0438 <a href=\"https:\/\/www.geeksforgeeks.org\/how-amazon-uses-machine-learning\/\">Amazon<\/a>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430, \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0438\u0441\u043a\u043e\u0432 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u0442\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0432 \u0430\u0443\u0434\u0438\u0442\u0435.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0430\u0439\u0442\u0430 Kaggle, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e <a href=\"https:\/\/www.kaggle.com\/datasets\/sid321axn\/audit-data\"><u>Audit Data<\/u><\/a>: \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0440\u043c.<\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 import numpy as np import pandas as pd  import seaborn as sns import matplotlib.pyplot as plt  from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler  # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 df = pd.read_csv('audit_data.csv') df.head()<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"python\">df.info()<\/code><\/pre>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043f\u0438\u044e data-\u0444\u0440\u0435\u0439\u043c\u0430 df_ml = df.copy()  # \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u043c\u0438 df_ml.Money_Value.fillna(value = df_ml.Money_Value.median(), inplace=True) df_ml['LOCATION_ID'].unique()<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"python\">location_dummies = pd.get_dummies(df_ml['LOCATION_ID'], prefix='location') df_ml = pd.concat([df_ml, location_dummies], axis=1) df_ml = df_ml.drop('LOCATION_ID', axis=1)  X = df_ml.drop(columns = 'Risk') y = df_ml.Risk<\/code><\/pre>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 X_train, X_test, y_train, y_test = train_test_split(X, y, train_size=0.7,stratify = y, shuffle=True, random_state=42)<\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import GradientBoostingClassifier from sklearn import svm from sklearn import metrics<\/code><\/pre>\n<pre><code class=\"python\"># \u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 models = {     \"Logistic Regression\": LogisticRegression(solver= 'liblinear', random_state=42),     \"Decision Tree\": DecisionTreeClassifier(),     \"Random Forest\": RandomForestClassifier(n_estimators=100, random_state=0),     \"GB\": GradientBoostingClassifier()  }  model_list=[] accuracy_list=[] recall_list=[] precision_list=[] specificity_list=[] f1_score_list=[]   for i in range(len(list(models))):     model=list(models.values())[i]     model.fit(X_train,y_train)      y_train_pred = model.predict(X_train)     y_test_pred = model.predict(X_test)          score = round(model.score(X_test, y_test), 4)             tn, fp, fn, tp = metrics.confusion_matrix(y_test, y_test_pred).ravel()            recall = round(tp\/(tp+fn), 3)        precision = round(tp\/(tp+fp), 3)       specificity =round(tn\/(tn+fp),3)      f1_score =  round(2*precision*recall\/(precision + recall), 3)          print(list(models.keys())[i])     model_list.append(list(models.keys())[i])          print('Model performance for Test set')     print(\"- Accuracy: {}\".format(score))     print(\"- Recall: {}\".format(recall))     print(\"- Precision: {}\".format(precision))     print(\"- Specificity: {}\".format(specificity))     print(\"- f1_score: {}\".format(f1_score))          accuracy_list.append(score)     recall_list.append(recall)     precision_list.append(precision)     specificity_list.append(specificity)     f1_score_list.append(f1_score)          print('='*35)     print('\\n')<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043e\u0431\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0444\u0438\u0440\u043c\u0430\u043c, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0436\u0443\u0442, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u0438 \u0444\u0438\u0440\u043c\u044b \u043c\u043e\u0448\u0435\u043d\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><strong>\u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f,<\/strong> \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443;<\/p>\n<\/li>\n<li>\n<p><strong>\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f,<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u043e\u0439 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0441\u0442 \u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0442\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043b\u0435\u0441,<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u0440\u0435\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432;<\/p>\n<\/li>\n<li>\n<p><strong>\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0441\u0442\u0438\u043d\u0433<\/strong>\u00a0\u2014 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u044c \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438: <\/p>\n<ul>\n<li>\n<p><strong>Accuracy<\/strong> (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>accuracy = (TP + TN) \/ (TP + TN + FP + FN)<\/code>, \u0433\u0434\u0435 TP (True Positive)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, TN (True Negative)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, FP (False Positive)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438 FN (False Negative)\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>Precision<\/strong> (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>precision = TP \/ (TP + FP)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Recall<\/strong> (\u043f\u043e\u043b\u043d\u043e\u0442\u0430): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>recall = TP \/ (TP + FN)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Specificity<\/strong> (\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c): \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u043b\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>specificity = TN \/ (TN + FP)<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>F1 score<\/strong>: \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 precision \u0438 recall. \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <code>F1 score = 2 * (precision * recall) \/ (precision + recall)<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0436\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0441\u0435\u0431\u044f \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/figcaption><\/div>\n<\/figure>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/h2>\n<p>\u0412 \u0430\u0443\u0434\u0438\u0442\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0451 \u0446\u0435\u043b\u044c\u00a0\u2014 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u0421 Kaggle \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.kaggle.com\/datasets\/krishnaraj30\/salary-prediction-data-simple-linear-regression\"><u>Salary Prediction Data<\/u><\/a>, \u0432 \u043d\u0451\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u0435. \u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438.<\/p>\n<pre><code class=\"python\"># \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 df = pd.read_csv('Salary_Data.csv') df.head(10) target = 'Salary' X = df.loc[:,df.columns!=target] y = df.loc[:,df.columns==target]<\/code><\/pre>\n<figure class=\"\"><\/figure>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 x_train, x_test, y_train, y_test= train_test_split(X, y, test_size= .2, random_state=0)  <\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c from sklearn.linear_model import LinearRegression lr= LinearRegression()    lr.fit(x_train, y_train)   y_pred= lr.predict(x_test)   x_pred= lr.predict(x_train)<\/code><\/pre>\n<pre><code class=\"python\"># \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u044b \u043e\u0442 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b import matplotlib.pyplot as mtp   mtp.scatter(x_train, y_train, color=\"green\")     mtp.plot(x_train, x_pred, color=\"red\")      mtp.title(\"Salary vs Experience (Training Dataset)\")    mtp.xlabel(\"Years of Experience\")    mtp.ylabel(\"Salary(In Rupees)\")    mtp.show()    <\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"python\">mtp.scatter(x_test, y_test, color=\"blue\")     mtp.plot(x_train, x_pred, color=\"red\")      mtp.title(\"Salary vs Experience (Test Dataset)\")    mtp.xlabel(\"Years of Experience\")    mtp.ylabel(\"Salary(In Rupees)\")    mtp.show()  <\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"python\">from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error  regressor = LinearRegression() regressor.fit(x_train,y_train) r2_score = regressor.score(x_test,y_test) r2_score = r2_score*100  predict = lr.predict(x_test) mse = mean_squared_error(predict,y_test, squared=False) mae = mean_absolute_error(predict,y_test)<\/code><\/pre>\n<p>\u0423 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. <\/p>\n<ul>\n<li>\n<p><strong>Mean Squared Error, MSE<\/strong> (\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430): \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438. MSE \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 MSE, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>Mean Absolute Error, MAE<\/strong> (\u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430): \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. MAE \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.  <\/p>\n<\/li>\n<li>\n<p><strong>Coefficient of Determination, R^2<\/strong> (\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438): \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R^2 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1, \u0433\u0434\u0435 1\u00a0\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 0\u00a0\u2014 \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <\/p>\n<\/li>\n<\/ul>\n<p> \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438:<\/p>\n<p><strong>R^2 = <\/strong>98,8169515729126 %<\/p>\n<p><strong>MAE<\/strong> = 2446,1723690465064<\/p>\n<p><strong>MSE<\/strong> = 3580,979237321345<\/p>\n<p>\u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0441\u0442\u0430\u0436\u0430, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u0435\u0434\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b, \u0441\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 Kaggle \u0438 \u0431\u0435\u0440\u0451\u043c data-\u0444\u0440\u0435\u0439\u043c <a href=\"https:\/\/www.kaggle.com\/datasets\/arjunbhasin2013\/ccdata\"><u>Credit Card Dataset<\/u><\/a>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u0445 \u043a\u0430\u0440\u0442\u0430\u0445 \u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-355464","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/355464","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=355464"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/355464\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=355464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=355464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=355464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}