2024-10-10 22:31:48 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1. Датасет: Диабет у индейцев Пима\n",
"https://www.kaggle.com/datasets/uciml/pima-indians-diabetes-database\n",
"##### О наборе данных: \n",
"Этот набор данных был получен из Национального института диабета, болезней органов пищеварения и почек. Цель набора данных - диагностически предсказать, есть ли у пациента сахарный диабет, на основе определенных диагностических измерений, включенных в набор данных. Н а выбор этих образцов из более обширной базы данных было наложено несколько ограничений. В частности, все пациенты были женщинами в возрасте не менее 21 года, родом из племени пима.\n",
"##### Таким образом:\n",
"* Объект наблюдения - женщины племени пима, возрастом от 21 года.\n",
"* Атрибуты: Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age, Outcome.\n",
"* Проблемная область: Предсказание диабета у пациента на основе измерений."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 1,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество колонок: 9\n",
"Колонки: Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age, Outcome\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 768 entries, 0 to 767\n",
"Data columns (total 9 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Pregnancies 768 non-null int64 \n",
" 1 Glucose 768 non-null int64 \n",
" 2 BloodPressure 768 non-null int64 \n",
" 3 SkinThickness 768 non-null int64 \n",
" 4 Insulin 768 non-null int64 \n",
" 5 BMI 768 non-null float64\n",
" 6 DiabetesPedigreeFunction 768 non-null float64\n",
" 7 Age 768 non-null int64 \n",
" 8 Outcome 768 non-null int64 \n",
"dtypes: float64(2), int64(7)\n",
"memory usage: 54.1 KB\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Pregnancies</th>\n",
" <th>Glucose</th>\n",
" <th>BloodPressure</th>\n",
" <th>SkinThickness</th>\n",
" <th>Insulin</th>\n",
" <th>BMI</th>\n",
" <th>DiabetesPedigreeFunction</th>\n",
" <th>Age</th>\n",
" <th>Outcome</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>148</td>\n",
" <td>72</td>\n",
" <td>35</td>\n",
" <td>0</td>\n",
" <td>33.6</td>\n",
" <td>0.627</td>\n",
" <td>50</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>85</td>\n",
" <td>66</td>\n",
" <td>29</td>\n",
" <td>0</td>\n",
" <td>26.6</td>\n",
" <td>0.351</td>\n",
" <td>31</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>8</td>\n",
" <td>183</td>\n",
" <td>64</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>23.3</td>\n",
" <td>0.672</td>\n",
" <td>32</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>89</td>\n",
" <td>66</td>\n",
" <td>23</td>\n",
" <td>94</td>\n",
" <td>28.1</td>\n",
" <td>0.167</td>\n",
" <td>21</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0</td>\n",
" <td>137</td>\n",
" <td>40</td>\n",
" <td>35</td>\n",
" <td>168</td>\n",
" <td>43.1</td>\n",
" <td>2.288</td>\n",
" <td>33</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Pregnancies Glucose BloodPressure SkinThickness Insulin BMI \\\n",
"0 6 148 72 35 0 33.6 \n",
"1 1 85 66 29 0 26.6 \n",
"2 8 183 64 0 0 23.3 \n",
"3 1 89 66 23 94 28.1 \n",
"4 0 137 40 35 168 43.1 \n",
"\n",
" DiabetesPedigreeFunction Age Outcome \n",
"0 0.627 50 1 \n",
"1 0.351 31 0 \n",
"2 0.672 32 1 \n",
"3 0.167 21 0 \n",
"4 2.288 33 1 "
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 1,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\".//static//csv//diabetes.csv\", sep=\",\")\n",
"print('Количество колонок: ' + str(df.columns.size)) \n",
"print('Колонки: ' + ', '.join(df.columns)+'\\n')\n",
"\n",
"df.info()\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Получение сведений о пропущенных данных\n",
"Типы пропущенных данных:\n",
"\n",
"- None - представление пустых данных в Python\n",
"- NaN - представление пустых данных в Pandas\n",
"- '' - пустая строка"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 2,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Pregnancies 0\n",
"Glucose 0\n",
"BloodPressure 0\n",
"SkinThickness 0\n",
"Insulin 0\n",
"BMI 0\n",
"DiabetesPedigreeFunction 0\n",
"Age 0\n",
"Outcome 0\n",
"dtype: int64\n",
"\n",
"Pregnancies False\n",
"Glucose False\n",
"BloodPressure False\n",
"SkinThickness False\n",
"Insulin False\n",
"BMI False\n",
"DiabetesPedigreeFunction False\n",
"Age False\n",
"Outcome False\n",
"dtype: bool\n",
"\n",
"Pregnancies процент пустых значений: %0.00\n",
"Glucose процент пустых значений: %0.00\n",
"BloodPressure процент пустых значений: %0.00\n",
"SkinThickness процент пустых значений: %0.00\n",
"Insulin процент пустых значений: %0.00\n",
"BMI процент пустых значений: %0.00\n",
"DiabetesPedigreeFunction процент пустых значений: %0.00\n",
"Age процент пустых значений: %0.00\n",
"Outcome процент пустых значений: %0.00\n"
]
}
],
"source": [
"# Количество пустых значений признаков\n",
"print(df.isnull().sum())\n",
"print()\n",
"\n",
"# Есть ли пустые значения признаков\n",
"print(df.isnull().any())\n",
"print()\n",
"\n",
"# Процент пустых значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" print(f\"{i} процент пустых значений: %{null_rate:.2f}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Проверим выбросы и устраним их:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 3,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Колонка Pregnancies:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 4\n",
" Минимальное значение: 0.0\n",
" Максимальное значение: 13.5\n",
" 1-й квартиль (Q1): 1.0\n",
" 3-й квартиль (Q3): 6.0\n",
"\n",
"Колонка Glucose:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 5\n",
" Минимальное значение: 37.125\n",
" Максимальное значение: 199.0\n",
" 1-й квартиль (Q1): 99.0\n",
" 3-й квартиль (Q3): 140.25\n",
"\n",
"Колонка BloodPressure:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 45\n",
" Минимальное значение: 35.0\n",
" Максимальное значение: 107.0\n",
" 1-й квартиль (Q1): 62.0\n",
" 3-й квартиль (Q3): 80.0\n",
"\n",
"Колонка SkinThickness:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 1\n",
" Минимальное значение: 0.0\n",
" Максимальное значение: 80.0\n",
" 1-й квартиль (Q1): 0.0\n",
" 3-й квартиль (Q3): 32.0\n",
"\n",
"Колонка Insulin:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 34\n",
" Минимальное значение: 0.0\n",
" Максимальное значение: 318.125\n",
" 1-й квартиль (Q1): 0.0\n",
" 3-й квартиль (Q3): 127.25\n",
"\n",
"Колонка BMI:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 19\n",
" Минимальное значение: 13.35\n",
" Максимальное значение: 50.550000000000004\n",
" 1-й квартиль (Q1): 27.3\n",
" 3-й квартиль (Q3): 36.6\n",
"\n",
"Колонка DiabetesPedigreeFunction:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 29\n",
" Минимальное значение: 0.078\n",
" Максимальное значение: 1.2\n",
" 1-й квартиль (Q1): 0.24375\n",
" 3-й квартиль (Q3): 0.62625\n",
"\n",
"Колонка Age:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 9\n",
" Минимальное значение: 21.0\n",
" Максимальное значение: 66.5\n",
" 1-й квартиль (Q1): 24.0\n",
" 3-й квартиль (Q3): 41.0\n",
"\n"
]
}
],
"source": [
"numeric_columns = ['Pregnancies', 'Glucose', 'BloodPressure', 'SkinThickness', 'Insulin', 'BMI', 'DiabetesPedigreeFunction', 'Age']\n",
"for column in numeric_columns:\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" q1 = df[column].quantile(0.25) # Находим 1-й квартиль (Q1)\n",
" q3 = df[column].quantile(0.75) # Находим 3-й квартиль (Q3)\n",
" iqr = q3 - q1 # Вычисляем межквартильный размах (IQR)\n",
"\n",
" # Определяем границы для выбросов\n",
" lower_bound = q1 - 1.5 * iqr # Нижняя граница\n",
" upper_bound = q3 + 1.5 * iqr # Верхняя граница\n",
"\n",
" # Подсчитываем количество выбросов\n",
" outliers = df[(df[column] < lower_bound) | (df[column] > upper_bound)]\n",
" outlier_count = outliers.shape[0]\n",
"\n",
" # Устраняем выбросы: заменяем значения ниже нижней границы на саму нижнюю границу, а выше верхней — на верхнюю\n",
" df[column] = df[column].apply(lambda x: lower_bound if x < lower_bound else upper_bound if x > upper_bound else x)\n",
"\n",
" print(f\"Колонка {column}:\")\n",
" print(f\" Есть выбросы: {'Да' if outlier_count > 0 else 'Нет'}\")\n",
" print(f\" Количество выбросов: {outlier_count}\")\n",
" print(f\" Минимальное значение: {df[column].min()}\")\n",
" print(f\" Максимальное значение: {df[column].max()}\")\n",
" print(f\" 1-й квартиль (Q1): {q1}\")\n",
" print(f\" 3-й квартиль (Q3): {q3}\\n\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Постараемся выявить зависимости Outcome от остальных колонок:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 4,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABbhElEQVR4nO3de5zMZf/H8ffM7uyuZXeVdcyyIoTix5YbCSUb24G7UhFL7iSHVG5F3UISkm6VQgd0EqW4lfMxxxxDBzllnU9Ldqy1u7M7398f2w5j9ryzO/ut1/Px2Ifm+l7zvT4zs/Kea67vNRbDMAwBAAAAJZzV1wUAAAAAeUFwBQAAgCkQXAEAAGAKBFcAAACYAsEVAAAApkBwBQAAgCkQXAEAAGAKBFcAAACYAsEVAAAApkBwBQAUyOrVq2WxWLR69WpflwLgb4LgCuTTlClTFB0drYoVK8pms6lSpUpq1aqVPvnkEzmdTl+XhwLq0aOHLBaL6yc0NFQNGzbUhAkTlJKS4uvy4AOHDx9Wnz59FBkZqcDAQFWoUEEdO3bU+vXrC3Xe9957TzNmzPBOkcDfjMUwDMPXRQBm0qxZM1WuXFl33HGHQkNDdf78ef3www+aNWuWHn74YX3xxRe+LhEF0KNHD82aNUsffvihJOn8+fP6+uuvtXr1aj388MOaNWuWjysseZxOp1JTUxUQECCr9a81D7J+/Xp16NBBkvSvf/1L9erV08mTJzVjxgwdOHBAb731lgYMGFCgczdo0EDh4eHMVAMFQHAF8snhcMhms3m0DxgwQJMmTdLBgwcVGRlZ/IWhUHr06KE5c+YoMTHR1eZ0OtW0aVNt3bpVx44dU5UqVTzuZxiGkpOTVapUqeIsF0Xojz/+UL169WQYhtavX6+aNWu6jl26dEnR0dFav3691q5dq+bNm+f7/ARXoOD+Wm+RgWKQVWiV5AqrV848/e9//1NMTIyqVKmiwMBA1axZU6NGjVJ6errbfVu3bu32MXV4eLhiYmL0888/u/WzWCwaMWKEW9v48eNlsVjUunVrt/bk5GSNGDFCtWvXVlBQkCpXrqx//vOfOnDggCQpLi5OFovF4yPLfv36yWKxqEePHq62GTNmyGKxKCAgQGfOnHHrv3HjRlfdW7dudTv21VdfqUmTJipVqpTCw8P12GOP6dixYx7P3W+//abOnTurfPnyKlWqlOrUqaOXXnpJkjRixAi35yarn8wA0Lp1azVo0MDj/AVltVpdz2tcXJykjNf5nnvu0ZIlSxQVFaVSpUpp6tSpkjJmaZ955hlFREQoMDBQtWrV0rhx4zyWkJw9e1bdunVTaGioypYtq9jYWO3cudPj9ejRo4fKlCmjY8eOqWPHjipTpozKly+vf//73x6/Q2+88YaaN2+ucuXKqVSpUmrSpInmzJnj8ZgsFov69++vefPmqUGDBgoMDFT9+vW1ePFij77Hjh1Tr169XL+/NWrU0FNPPaXU1FRJ2a9x3bRpk+6++26FhYUpODhYrVq18vh4/cKFC3rmmWfcPoa/6667tH379lxflx9//FHt27dXaGioypQpozvvvFM//PCD63jm72tOPzl9VD916lSdPHlS48ePdwutklSqVCl9/PHHslgseuWVV1ztmb+nV8us5crfn19++UXff/+9q5Yr/+6eP39ezz77rOt5qVq1qrp37674+HhXn9OnT6tXr16qWLGigoKC1LBhQ3388cdu42b+/X7jjTf07rvv6vrrr1dwcLDatWunI0eOyDAMjRo1SlWrVlWpUqV0//3369y5cx71L1q0SC1btlTp0qUVEhKimJgY/fLLL9k+d0BR8/d1AYBZnT9/Xmlpabpw4YK2bdumN954Q4888oiqVavm6jNjxgyVKVNGzz33nMqUKaOVK1fq5Zdflt1u1/jx493OV7duXb300ksyDEMHDhzQm2++qQ4dOujw4cM51jBmzBiP9vT0dN1zzz1asWKFHnnkEQ0cOFAXLlzQsmXL9PPPP3v8Y5xp//79+uCDD7Idz8/PT5999pmeffZZV9v06dMVFBSk5ORkt74zZsxQz549dcstt2jMmDE6deqU3nrrLa1fv14//vijypYtK0natWuXWrZsKZvNpt69eysyMlIHDhzQt99+q9GjR+uf//ynatWq5Trvs88+qxtvvFG9e/d2td14443Z1lxYmUG/XLlyrrY9e/bo0Ucf1ZNPPqknnnhCderUUVJSklq1aqVjx47pySefVLVq1bRhwwYNHTpUJ06c0MSJEyVlzOLee++92rx5s5566inVrVtX//vf/xQbG5vl+Onp6YqOjlbTpk31xhtvaPny5ZowYYJq1qypp556ytXvrbfe0n333aeuXbsqNTVVs2bN0kMPPaTvvvtOMTExbudct26dvvnmG/Xt21chISF6++239cADD+jw4cOux3n8+HHdeuutOn/+vHr37q26devq2LFjmjNnjpKSkhQQEJBlvStXrlT79u3VpEkTDR8+XFarVdOnT9cdd9yhtWvX6tZbb5Uk9enTR3PmzFH//v1Vr149nT17VuvWrdPu3bvVuHHjbF+PX375RS1btlRoaKief/552Ww2TZ06Va1bt9b333+vpk2b6vbbb9enn37qus/o0aMlyfVmSFKOM6XffvutgoKC1Llz5yyP16hRQ7fddptWrlypS5cu5Wu2feLEiRowYIDKlCnjqqdixYqSpMTERLVs2VK7d+/W448/rsaNGys+Pl7z58/X0aNHFR4erkuXLql169bav3+/+vfvrxo1auirr75Sjx49dP78eQ0cONBtvM8//1ypqakaMGCAzp07p9dff12dO3fWHXfcodWrV+uFF17Q/v379c477+jf//63pk2b5rrvp59+qtjYWEVHR2vcuHFKSkrS5MmTddttt+nHH3/kkyX4hgG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XV61atfTiiy+qWbNmmjt3rlu
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArcAAAIjCAYAAAAZajMiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACEs0lEQVR4nOzdeXwU9f0/8NfM3tkj900g4Si3IOARQQG5BLy1SqWKiqIVvLBa0Xrg8aOoVaqiaGtBq9ajHlW/iCCiKCByCBbklgACSci52c3eM78/NllZcg1hd2aJr+fjwQN25p2d925i+8pnP/P5CLIsyyAiIiIi6gBErRsgIiIiIooVhlsiIiIi6jAYbomIiIiow2C4JSIiIqIOg+GWiIiIiDoMhlsiIiIi6jAYbomIiIiow2C4JSIiIqIOg+GWiIiIiDoMhlsiopPAiBEjMGLECK3bICJKeAy3RAlswYIFGDduHLKzs2EwGJCTk4Phw4fjtddegyRJWrdHJ+jrr7/GFVdcgfz8fBiNRiQnJ+OMM87AI488grKyMq3b6/DcbjceffRRnHLKKUhKSkJycjLOPvtsvPbaaziRnekXL16Mhx9+OHaNEtFxEeQT+S+YiOKquLgYubm5OPfcc+FwOFBTU4Nvv/0Wb731Fq688kr8+9//1rpFaqcHH3wQjz76KLp27YpJkyaha9eu8Hq92LBhA9577z1kZGRgz549kfrGUdsvv/xSm4Y7mLKyMowaNQrbtm3DpEmTMHz4cHi9Xrz33ntYuXIlrrzySrzxxhvQ6XTH/dwzZszA/PnzTyggE1H76bVugIhatnLlShgMhqhjt912G9LT0/H8889jzpw5KCws1KY5are3334bjz76KK644gr861//gtFojDr/zDPP4JlnntGou1+HKVOmYNu2bfjggw9w4YUXRo7fdtttuPvuu/HUU0/h1FNPxZ/+9CcNuySi9uC0BKIEdmywb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mU4//zzkZubi9tvvx05OTnYtm0bPvnkE9x+++0AgM8//xzjx49H165d8fDDD8Pj8eC5557D0KFDsXHjxsgvVDfffDP+85//YMaMGejTpw8qKyvxzTffYNu2bRg0aBCAcEgeP348Bg8ejIceegiiKGLhwoU499xz8fXXX+P0009vsVePx4MRI0Zg9+7dmDFjBoqKivDuu+/i2muvRU1NDW6//XZkZmbiX//6V+Rr3n//fXzwwQdRx1r6uQOAjz/+GABwzTXXNHter9fjqquuwuzZs7Fq1SqMHj1a2RsN4KabbsKhQ4ewbNmyqH4aTZ06FYsWLcL48eNxww03IBgM4uuvv8a3336LIUOGAABuuOEGvPrqq7j88stx1113Ye3atZgzZ05kpPlou3fvxlVXXYWbbroJv//97/HUU0/hggsuwIIFC3DffffhlltuARAO7FdccQV27NgR+aV469atGDp0KPLz83HvvffCarXinXfewcUXX4z33nsPl1xyieLXTZRQZCJKeD179pQBRP5cc801ciAQiKqpr69v8nU33XSTnJSUJHu93six4cOHy8OHD4+qu++++2QAcnl5eeQYAPmhhx6KPL7nnnvkrKwsefDgwVFf/89//lMGID/99NNNri9JkizLsrx3714ZgLxw4cLIuSuuuELu16+fXFBQIE+ZMiVyfOHChTIA+Xe/+53cv3//yHG32y07HA75qquukgHI69atk2VZlv1+v5yVlSX369dP9ng8kfpPPvlEBiA/+OCDkWPnnHOObLfb5X379jXb57G6dOkS1dvRhg8fLvft27fZc63573//KwOQ582b16SHI0eORP05+nt87Pet8X3au3dv1POsWLFCBiCvWLFClmVZDgaDclFRkdylSxe5urq6yTUbDRw4UM7KypIrKysjxzZv3iyLoihfc801kWPJycny9OnTW3x9kiTJPXr0kMeNGxf1/PX19XJRUZE8ZsyYFr9WlmV53rx5MgD59ddfjxzz+/1ycXGxbLPZZKfT2eRrHnroIfl4/u/s4osvlgE0eT+O9v7778sA5GeffVaW5abva6PmfranT5/ebD9ffPGFDEC+7bbbmpxrfK82bdokA5BvuOGGqPN//OMfZQDyF198ETnWpUsXGYC8evXqyLHPPvtMBiBbLJaon/OXXnqpSf+jRo2S+/fvH/W/D5IkyWeddZbco0ePFt8bokTHaQlEJ4GFCxdi2bJleOONNzB16lS88cYbUaOJAGCxWCL/rqurQ0VFBc4++2zU19dj+/btUbWBQAAVFRU4cuQI1qxZgw8++ACnnHIKMjIymr3+wYMH8dxzz+GBBx5oMtrYePPTrbfe2uTrjv449mgbNmzAu+++izlz5kRNrTja1Vdfje3bt0c+rn3vvfeQnJyMUaNGRdWtX78e5eXluOWWW2A2myPHJ06ciF69euH//u//AABHjhzBypUrcf3110eNeLfWZ1tCoRAqKipQUVEBv9+v6GucTicANHkfa2trkZmZGfVn06ZN7erraN9//z327t2LO+64IzKC3ajxdR8+fBibNm3Ctddei7S0tMj5U045BWPGjMHixYsjx1JSUrB27VocOnSo2ett2rQJu3btwlVXXYXKysrI++N2uzFq1CisXLmy1ZU+Fi9ejJycHPzud7+LHDMYDLjtttvgcrnw1VdftedtiFJXVwcAsNvtLdY0nmv8fsXCe++9B0EQ8NBDDzU51/i9aHyvZ86cGXX+rrvuAoDIz3OjPn36oLi4OPL4jDPOAACce+65UT/njcd/+uknAEBVVRW++OILXHHFFZH/vaioqEBlZSXGjRuHXbt2NTuth+hkwHBLdBIoLi7G6NGjcdVVV+Ef//gHHnnkESxcuDBqDuPWrVtxySWXIDk5GQ6HA5mZmfj9738PIBycjrZ69WpkZmYiKysLZ511FoLBIN59990WQ95DDz2EvLw83HTTTU3O7dmzBz179oR
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArcAAAIjCAYAAAAZajMiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACHEElEQVR4nOzdd3hUVf4G8PdOn7RJAukEEmroCAgEkCIlC9ixYKOIosLasMGigooC9p+KIoqI3VUWVlc6oghEEBCUTkJCgJAESJmU6XN/fwwZGJJJJmFy7yS+n+fJI3PumXu/M0l235w59xxBFEURRERERERNgELuAoiIiIiI/IXhloiIiIiaDIZbIiIiImoyGG6JiIiIqMlguCUiIiKiJoPhloiIiIiaDIZbIiIiImoyGG6JiIiIqMlguCUiIiKiJoPhloioHn7++WcIgoCff/5Z8mvPmTMHgiBIfl0iosaA4ZaoHhYtWoS0tDTExMRArVYjNjYWgwcPxqeffgqn0yl3eVRPEydOhCAI7i+VSoXExESMGzcOBw4ckLu8GiUlJXnUHh0djauuugorVqyQu7S/vXPnzuHJJ59Ehw4doNPpEBkZibS0NPzvf/+7rPN++eWXeOutt/xTJFETopK7AKLGaNmyZYiLi8Ozzz6LsLAwFBcX47fffsPEiROxevVqfPXVV3KXSPWk1Wrx0UcfAQDsdjsyMzOxaNEirFmzBgcOHEB8fLzMFXrXo0cPPP744wCA3NxcfPDBB7jpppvw/vvv44EHHpC5ur+nw4cPY9iwYThz5gwmTZqE3r17o7i4GF988QWuvfZaPPHEE3j11Vfrde4vv/wS+/btw6OPPurfookaOYZbonrYvHkz1Gq1R9vDDz+MZs2a4d1338W8efOQlJQkT3F0WVQqFe666y6Ptn79+uGaa67Bjz/+iPvuu0+mymqXkJDgUfv48ePRtm1bvPnmm17Drd1uh9PphEajkarMy1ZeXo7g4GC5y6iVzWbDzTffjKKiImzevBl9+/Z1H3vsscdw55134rXXXkPv3r1x2223yVgpUdPCaQlE9XBpsK1UGWgVigu/Wv/9738xZswYxMfHQ6vVok2bNnjxxRfhcDg8njtkyBCPj5WbN2+OMWPGYN++fR79BEHAnDlzPNpeffVVCIKAIUOGeLSbzWbMmTMH7du3h06nQ1xcHG666SZkZmYCALKzsyEIAj755BOP502bNg2CIGDixInutk8++QSCIECj0eDMmTMe/dPT091179y50+PYt99+i169ekGv16N58+a46667cOrUqSrv3aFDh3DrrbciK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ctx4403AnD9oTFv3jzce++96NOnD4xGI3bu3Indu3djxIgRAICxY8di//79eOihh5CUlISCggKsX78eOTk59f5EY+rUqYiKisJzzz2H8vJyAMBnn32GCRMmIC0tDQsWLEBFRQXef/99DBw4EH/88UeN18rPz0f//v1RUVHh/tRl2bJluO666/Ddd9/hxhtvRMeOHfHZZ5+5n7N48WIcPHgQb775prutW7duXq/xww8/AHCNoFfHYDDg+uuvx7Jly5CRkeHxM16bWbNmoaSkBCdPnnTXExISAsC3331RFHHddddh06ZNmDx5Mnr06IG1a9fiySefxKlTpzxeIwD8+uuv+P777zFt2jQAwLx583DNNdfgqaeewnvvvYepU6eiqKgIr7zyCu655x789NNP7uf+9NNPGDVqFHr16oXZs2dDoVBg6dKluPrqq/Hrr7+iT58+Pr9uIp+IRFRvHTp0EAG4v8aPHy/abDaPPhUVFVWed//994tBQUGi2Wx2tw0ePFgcPHiwR79//etfIgCxoKDA3QZAnD17tvvxU089JUZHR4u9evXyeP7HH38sAhDfeOONKtd3Op2iKIpiVlaWCEBcunSp+9itt94qdunSRUxMTBQnTJjgbl+6dKkIQLz99tvFrl27utvLy8vFsLAw8Y477hABiL///rsoiqJotVrF6OhosUuXLqLJZHL3/9///icCEJ977jl326BBg8TQ0FDx+PHj1dZ5qVatWnnUdrHBgweLnTt3rvZYbSZMmODx/az8SkhIEHft2uXRd9OmTSIAcdOmTaIo1u319ujRQ4yOjhbPnTvnbtu7d6+oUCjE8ePHu9tuuOEGUafTebwvBw4cEJVKpXjp/3y3atVKHDlypHjmzBnxzJkz4t69e8Vx48aJAMSHHnpIFMUL3++wsDCPnylRFMVhw4aJXbt29fiZdDqdYv/+/cV27dq527p37y6OGTPG63tYVFQkAhBfffVVr31EserP8cWvo7qfu4EDB4p2u93dXlpaKoaHh4v33Xefx/Pz8vJEg8FQpf1Sjz76qAhA/PXXXz3OmZycLCYlJYkOh6PKcyZMmCC2atWqxvNerEePHqLBYKixzxtvvCECEL///ntRFC+83qysLI9+l/68iaIojhkzptp6fPndX7lypQhAnDt3rsfxm2++WRQEQczIyHC3ARC1Wq1HTR988IEIQIyNjRWNRqO7febMmR71O51OsV27dmJaWprH73NFRYWYnJwsjhgxosb3h6g+OC2B6DIsXboU69evxxdffIHJkyfjiy++8BhNBAC9Xu/+d2lpKc6ePYurrroKFRUVOHTokEdfm82Gs2fP4syZM0hPT8eKFSvQrVs3NG/evNrrnzp1Cu+88w6effZZ96hNpeXLl6N58+Z46KGHqjzP2zJSu3btwrfffot58+Z5TK242N13341Dhw65px8sX74cBoMBw4YN8+i3c+dOFBQUYOrUqdDpdO72MWPGICUlxf3x75kzZ7B582bcc889HiPeNdVZG4fDgbNnz+Ls2bOwWq11eq5Op8P69euxfv16rF27Fh988AFCQkIwevRoHDlyxOvzfH29p0+fxp49ezBx4kRERka6+3Xr1g0jRozAqlWr3K9h7dq1uOGGGzzel44dOyI
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB20UlEQVR4nO3dd3hUVf4G8PdOn7RJI5VAIr0pAoKhiCWQRVZBUSwoiCi6siiirqBLU/lFxbYqgiDFhgVdWVFKAEEBA1JEOhIkgIEkhJRJmT7n90fIwJA2SSZzM/h+nicPzrln7v1mJuCbM+ecKwkhBIiIiIiImjmF3AUQEREREXmCwZWIiIiI/AKDKxERERH5BQZXIiIiIvILDK5ERERE5BcYXImIiIjILzC4EhEREZFfYHAlIiIiIr/A4EpEREREfoHBlYjoIps2bYIkSfjqq69q7bd06VJIkoSsrKwmqyUrKwuSJOG1116rs+/MmTMhSVK9r5GYmI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Oifu5UrVyIxMREDBgyo9vh1112HxMTEKmHREx9//LHrdamsp/Lv9OnTp9G7d28UFRVh/Pjx6NixI7Kzs/HVV1+hvLwcGo0Gubm56Nu3L8rLy12fFn344Ye49dZb8dVXX1WZvpCWlga9Xo8pU6YgMzMT77zzDtRqNRQKBQoLCzFz5kxs27YNS5cuRVJSEqZPn+567uzZszFt2jSMHDkSDz30EM6ePYt33nkH1113ndu/A0ReI4ioWh06dBAAXF+jR48WNpvNrU95eXmV5z3yyCMiICBAmM1mV9vAgQPFwIED3fo999xzAoDIy8tztQEQM2bMcD3+17/+JaKiokTPnj3dnr948WIBQLzxxhtVru90OoUQQhw/flwAEEuWLHEdGzlypOjatatISEgQY8aMcbUvWbJEABD33HOP6Natm6u9rKxMhISEiHvvvVcAEDt27BBCCGG1WkVUVJTo2rWrMJlMrv7fffedACCmT5/uarvuuutEcHCwOHHiRLV1Xqp169ZutV1s4MCBokuXLtUeq8v06dMFABEYGCiGDBkiZs+eLXbt2lWl38aNGwUAsXz5clFSUiIGDhwoIiMjxa+//urWr/I1O378uFvtAMRPP/3kasvLyxNarVY89dRT1dY1Z86cKuepVPkeRkREiIKCAlf7//73PwFArFy50tU2Y8YMcfE/6UePHhUKhULcdtttwuFwuJ334te+devWYujQoUIIIf7zn/8ISZLEiy++2OA6brrpJtGtWze3n3+n0yn69u0r2rVr52q76qqrXNetTmFhoQAg5syZU2OfmnTv3l1ERUWJc+fOudp+++03oVAoxOjRo6t9Tm0/d5cqKioSAMSwYcNq7XfrrbcKAMJoNAohhBgzZoxo3bp1lX6XvndCCBEYGFhtPaNHjxYKhcL1d/File/rpEmTBACxefNm17GSkhKRlJQkEhMTXT8PlT/rXbt2FVar1dX3nnvuEZIkiSFDhridPzk52a3+rKwsoVQqxezZs9367du3T6hUqirtRN7AqQJENViyZAnWrVuHTz/9FOPGjcOnn37qNhoDAHq93vXfJSUlyM/Px4ABA1BeXo7Dhw+79bXZbMjPz8fZs2eRkZGBb775BldeeaXbgpyLZWdn45133sG0adMQFBTkduzrr79GZGQkJk6cWOV5NS0U2rVrF5YvX460tDS36Q4Xu//++3H48GHXlICvv/4aBoMBN910k1u/nTt3Ii8vD4899pjbYqChQ4eiY8eOrlGms2fP4qeffsKDDz7oNlJdW511cTgcyM/PR35+vttHo3WZNWsWli1bhquvvhpr167F888/j549e6JHjx5uHyFXKi4uxuD
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArcAAAIjCAYAAAAZajMiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACLbElEQVR4nOzde5ycZX3//9d933Oe2fMxWTbZkAAhJJxP4SyHBERaBVpRixBRWwytQKsVUSRov7FqxVo51CqgVWof1lp/IpCEgyAQTkEOiQSyIUtCsufzzM7pPvz+mN0le0iyhM3MJHk/H488NnPPtTOfnQz6nmuv63MZnud5iIiIiIgcAMxCFyAiIiIiMl0UbkVERETkgKFwKyIiIiIHDIVbERERETlgKNyKiIiIyAFD4VZEREREDhgKtyIiIiJywFC4FREREZEDhsKtiIiIiBwwFG5FRGQCwzC49dZbR2/fd999GIZBS0tLwWoSEZkKhVuR/dDdd9/N0qVLqaurw+/3U19fz9lnn81Pf/pTXNctdHmyl66++mpisVihyzjgZLNZvv/973PSSSdRUlJCLBbjpJNO4vvf/z7ZbHavH/eZZ57h1ltvpa+vb/qKFZH3TeFWZD/0k5/8hGg0yle/+lV+/OMf8+Uvf5mGhgauvvpqPvGJTxS6PDkAXXnllSSTSWbPnl3oUt6TRCLBBRdcwOc//3nq6+v55je/ybe//W1mzpzJ5z//eS644AISicRePfYzzzzDihUrFG5Fioyv0AWIyHv35JNP4vf7x1z7u7/7O6qqqvjBD37AypUraWpqKkxxckCyLAvLsgpdxnt244038sQTT/Bv//ZvXHfddaPXr732Wu644w6uu+46/uEf/oG77rqrgFWKyHTSzK3Ifmh8sB0xEmhN893/tH/zm99w8cUXM3PmTILBIHPnzuXrX/86juOM+d5zzjkHwzBG/1RXV3PxxRezfv36MePGr8UE+Pa3v41hGJxzzjljrqdSKW699VYOP/xwQqEQM2bM4NJLL2Xz5s0AtLS0YBgG991335jvW758OYZhcPXVV49eG1nzGQgE6OzsHDN+7dq1o3W/+OKLY+775S9/yQknnEA4HKa6upq/+qu/Yvv27RNeu40bN/KXf/mX1NTUEA6HOeKII7j55psBuPXWW8e8NpP9+f3vfz/6Oi5cuHDC4++tpqYmPvShD/HUU09x8sknEwqFOPTQQ/npT386Zlw2m2XFihUcdthhhEIhqqqqOOOMM1izZs3omHPOOWfCvxHklkPs6cPQZGtup1rbriQSCf7+7/+exsZGgsEgRxxxBN/5znfwPG90zJ5e98l+nhHvvPMOP/7xjzn33HPHBNsRy5cv5wMf+AA/+tGPeOedd4BdvydHahl5799666184QtfAGDOnDmj9ez8+vzsZz/j5JNPJhKJUFFRwVlnncXq1avHPOadd97JUUcdRTAYZObMmSxfvnzCTPDIe+rVV1/l7LPPJhKJMG/ePP7nf/4HgCeeeIJTTjll9H37yCOPTKh9+/btfOpTn6Kuro5gMMhRRx3FPffcs8vXTmR/pplbkf1YX18ftm0zODjIunXr+M53vsMVV1zBrFmzRsfcd999xGIxbrzxRmKxGI899hi33HILAwMDfPvb3x7zePPnz+fmm2/G8zw2b97Md7/7XT74wQ+ydevW3dawcuXKCdcdx+FDH/oQjz76KFdccQWf//znGRwcZM2aNaxfv565c+dO+njNzc38x3/8xy6fz7Isfvazn3HDDTeMXrv33nsJhUKkUqkxY++77z6WLVvGSSedxMqVK2lvb+df//Vfefrpp/njH/9IeXk5AK+++ipnnnkmfr+fz372szQ1NbF582Z++9vf8k//9E9ceumlzJs3b/Rxb7jhBo488kg++9nPjl478sgjd1nz+9Xc3Mzll1/ONddcw1VXXcU999zD1VdfzQknnMBRRx0F5MLWypUr+fSnP83JJ5/MwMAAL774Ii+99BIXXHBBQWubjOd5/Nmf/RmPP/4411xzDcceeyyrVq3iC1/4Atu3b+f2228H4D//8z9Hv+cPf/gDP/zhD7n99tuprq4GoK6ubpfP8dBDD+E4Dp/85Cd3OeaTn/wkjz/+OA8//DCf/vSnp/xzX3rppbz55pv813/915h6ampqAFixYgW33norp512GrfddhuBQIDnnnuOxx57jCVLlgC5f7MVK1Zw/vnnc+211/LGG29w11138cILL/D000+P+RDb29vLhz70Ia644gr+4i/+grvuuosrrriCn//851x//fX8zd/8DR//+Mf59re/zeWXX862bdsoKSkBoL29nVNPPRXDMLjuuuuoqanhoYce4pprrmFgYIDrr79+yj+3yH7BE5H91hFHHOEBo38++clPetlsdsyYoaGhCd/313/9114kEvFSqdTotbPPPts7++yzx4z78pe/7AFeR0fH6DXA+9rXvjZ6+4tf/KJXW1vrnXDCCWO+/5577vEA77vf/e6E53dd1/M8z9uyZYsHePfee+/ofX/5l3/pLVy40GtsbPSuuuqq0ev33nuvB3gf+9jHvEWLFo1eTyQSXmlpqffxj3/cA7wXXnjB8zzPy2QyXm1trbdw4UIvmUyOjn/ggQc8wLvllltGr5111lleSUmJ9/bbb09a53izZ88eU9vOzj77bO+oo46a9L49ueqqq7xoNDrhuQDvySefHL3W0dHhBYNB7+///u9Hrx1zzDHexRdfvNvHn+zfeOR5Z8+ePeba+H/nkdd/y5Yt77m2yfzf//2fB3jf+MY3xly//PLLPcMwvObm5gnfM1kNu3P99dd7gPfHP/5xl2NeeuklD/BuvPFGz/Mmf0+OGP+afPvb3560nk2bNnmmaXof+chHPMdxxtw38p7q6OjwAoGAt2TJkjFjfvCDH3iAd88994xeO/vssz3Au//++0evbdy40QM80zS9Z599dvT6qlWrJtR/zTXXeDNmzPC6urrG1HLFFVd4ZWVlk/5vhMj+TMsSRPZj9957L2vWrOHnP/8511xzDT//+c/HzCYChMPh0b8PDg7S1dXFmWeeydDQEBs3bhwzNpvN0tXVRWdnJ2vXruXXv/41Rx999Ois1Hjbt2/n3/7t3/jqV786YZf/r371K6qrq/nbv/3bCd9nGMakj7du3Tp++ctfsnLlyjFLK3Z25ZVXsnHjxtHlB7/61a8oKyvjvPPOGzPuxRdfpKOjg8997nOEQqHR6xdffDHz58/nd7/7HQCdnZ08+eSTfOpTnxoz4727OvfEcRy6urro6uoik8ns1WPsbMGCBZx55pmjt2tqajjiiCN46623Rq+Vl5ezYcMGNm3a9L6fb7prm8yDDz6IZVn83d/93Zjrf//3f4/neTz00EPvu7bBwUGA0RnMyYzcNzAw8L6fb8T//d//4bout9xyy4T38ch76pFHHiGTyXD99dePGfOZz3yG0tLS0ffniFgsxhVXXDF6+4gjjqC8vJwjjzySU045ZfT6yN9HXn/P8/jVr37FJZdcgud5o+/Lrq4uli5dSn9/Py+99NK0/ewixUDhVmQ/tnjxYs4//3w+/vGP86Mf/YjbbruNe++9l6effnp0zIYNG/jIRz5CWVkZpaWl1NTU8Fd/9VcA9Pf3j3m8Z555hpqaGmpraznttNOwbZtf/vKXuwx5X/va15g5cyZ//dd/PeG+zZs3c8QRR+DzTX3105e+9CXOPPNMPvShD+1yTE1NDRdffPHoesF77rmHq666akKIePvtt4FcCBhv/vz5o/ePhIDpXCe7ceNGampqxqzfvf/++/f68caHboCKigp6e3tHb99222309fVx+OGHs2jRIr7whS/w6quv7vVzTmdtk3n77beZOXPmhOA5srxj5N/n/Rh57JGQO5mpBOD3avPmzZimyYIFC3Y5Zlfvz0AgwKGHHjrh5z/kkEMm/HdYVlZGY2PjhGvA6Ovf2dlJX18fP/zhD0ffkyN/li1bBkBHR8de/JQixUvhVuQAcvnllwPw3HPPAbn1sGeffTavvPIKt912G7/97W9Zs2YN//zP/wwwoSfu0Uc
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image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C3+8/oe81m81YsmQJlixZgkWLFuHll1+GzWbDxRdfjO+//77V7xk/fjyysrLw9ttvQwiBt99+G9dee+1J9d5s6dKl8Pv9uPvuu6Pei1//+tdwOByR1y8WTqcTAGC329uts9vtaGhoiPl6zb755hvs3bsXd999d2TUvVnze15WVoaNGzfixhtvRFZWVuT84MGDMW7cOHz88cctnrd55BkIfzIwfPhwCCFw8803R45nZGSgX79+2LNnT+TYggULMGDAAPTv3z/y76aqqgoXXnghAOCzzz6Ly89NlKo4VYDoFFFaWhr5+3XXXYeePXvi4Ycfxs0334yRI0cCAL777jv87//+Lz799NMW//Gvr6+Pevzll18iNzc38rhPnz54//332wxw06dPR1FREX7zm99EzUEEgN27d6Nfv34ndEPN7373O5x33nm45JJLcMcdd7Rak5ubi0mTJuG1117D8OHD8dprr2HKlCktgu7+/fsBoNW70fv3749Vq1YBQCRAxHNe6vbt2yOvoyzL6N27N6ZPn47rrruuw+/V6XQYO3Zs1LGLL74Yffr0wUMPPYR///vfLb7HYDDgqquuwvz583HWWWfh4MGDqq7VnrZeP6PRiJ49e0bOx6I5sDYH2LY4nU7k5eXFfL1mzXOs23vP2/v3M2DAACxatAhutxtWqzVy/PhffNLT02E2m1v84peenh61zNfOnTuxbdu2qP/
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAAIjCAYAAAAQgZNYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACYoklEQVR4nOzdd3xUVfo/8M+9d3omk0IKSQgEAoqKCoIiAmJB+WJZ68+CX5qK2EvWxqog665YEdf1q7s2LKur62JHiihrQ12liUongIH0TDK93Ht+f0wyMGSSTMJkZoKf9+uFYe48M/dhJonPnPuccyQhhAARERERUQ8kJzsBIiIiIqKuYjFLRERERD0Wi1kiIiIi6rFYzBIRERFRj8ViloiIiIh6LBazRERERNRjsZglIiIioh6LxSwRERER9VgsZomIiIiox2IxS0QJccopp+CUU07p9OPKy8shSRIee+yx+Cd1CGh5fRYuXBg+dv/990OSpOQldQiL9noTUXKxmKVu9eyzz2LChAnIz8+HXq9H7969MW7cOLzyyivQNC3Z6VEXTZs2DZIkhf9YrVYMGDAAF198Mf7973+n/Hv7888/4/7770d5eXm3nueUU06JeJ2ys7Nx/PHH48UXX0z51ygRFi5cGPH67P/n7rvvTmpur7/+OhYsWJDUHJLpq6++wgUXXID8/HwYjUaUlJRg5syZ2LVrV5ef0+124/7778fKlSvjlygRAF2yE6BD28svv4yCggLcd999sNlssNvt+OabbzBt2jR8/PHHeOONN5KdInWR0WjE888/DwDweDzYuXMnPvjgA1x88cU45ZRT8N5778Fms4Xjly1blqxUW/n5558xd+5cnHLKKSgpKenWc/Xp0wfz5s0DANTU1OCVV17BVVddhc2bN+Ohhx7qlnPee++9SS8GO+OPf/wj+vfvH3FsyJAhScom5PXXX8eGDRtw6623Rhzv168fPB4P9Hp9chJLgKeeegq33HILBgwYgJtuugkFBQX45Zdf8Pzzz+PNN9/E4sWLcdJJJ3X6ed1uN+bOnQsAXbpKQ9QWFrPUrT7//PNWv/Rvvvlm9OrVC3/9618xb968bi8mqHvodDr87//+b8SxP/3pT3jooYcwa9YszJgxA2+++Wb4PoPBkOgUU0JGRkbE6zRz5kwcfvjh+Otf/4oHHnigW4oinU4HnS5+v95dLhfS0tLi9nwHmjhxIkaMGNFtzx9PkiTBZDIlO41u89VXX+HWW2/FmDFjsGTJElgslvB91113HUaPHo2LL74YP/30E7KyspKYKdE+bDOgbtXW/6hbClhZ3vct+N577+Hss89GYWEhjEYjSktL8cADD0BV1YjHHnjpNicnB2effTY2bNgQESdJEu6///6IY48++igkSWo1KuD1enH//ffjsMMOg8lkQkFBAS688EJs27YNQNt9cjfccAMkScK0adPCx1ounRoMBtTU1ETEr1q1Kpz3999/H3Hfv/71LwwfPhxmsxk5OTn43//9X1RUVLR67TZu3IhLLrkEubm5MJvNOPzww3HPPfcA2Ncr2d6flkt8p5xySreMft19990488wz8a9//QubN28OHz+wZ9bv92P27NkYPnw4MjIykJaWhrFjx+Kzzz5r87mfeOIJ9OvXD2azGePGjWv1ngOh1+fiiy9GdnY2TCYTRowYgffffz98/8KFC/H//t//AwCceuqprV4XAPj4448xduxYpKWlIT09HWeffTZ++umniPNUVlZi+vTp6NOnD4xGIwoKCnDeeed12LpgsVhw4oknwuVyhb8/7HY7br31VhQXF8NoNGLgwIF4+OGHW7Ui2O12TJs2DRkZGcjMzMTUqVNht9tbnSNaz6zH48HNN9+MnJwcpKen43e/+x0qKipa/Zy0PPbnn3/GpEmTkJWVhTFjxoTvf+2118Lfp9nZ2bjsssuwe/fuVjl8++23+J//+R9kZGTAYrFg3Lhx+Oqrr9p9baKJ9nMMhH6HRPu5++qrr1BWVobc3FykpaXhggsuaPVzCITe43HjxiE9PR02mw3HH388Xn/9dQCh79WPPvoIO3fuDH9/tPzOaut3waeffhr+nsnMzMR5552HX375JSKm5bXdunUrpk2bhszMTGRkZGD69Olwu90xvR4d/Z44sAUo2p/2vkcfeOABSJKEl19+OaKQBYDS0lI88sgj2Lt3L/72t7+Fj7fVDz9t2rSI1y03NxcAMHfu3HAu+7+37f1ua7FmzRpMnDgRNpsNVqsVp59+Or755puImJbvhS+//BI333wzcnNzkZmZiZkzZ8Lv98Nut2PKlCnIyspCVlYW7rzzTgghIp5D0zQsWLAARx11FEwmE/Lz8zFz5kw0NDS0+dpR8nBklhLCbrcjGAzC4XDghx9+wGOPPYbLLrsMffv2DccsXLgQVqsVZWVlsFqt+PTTTzF79mw0NTXh0UcfjXi+wYMH45577oEQAtu2bcP8+fNx1llntdvPZbfbw5d796eqKs455xysWLECl112GW655RY4HA4sX74cGzZsQGlpadTn27p1K5577rk2z6coCl577TXcdttt4WMvvfQSTCYTvF5vROzChQsxffp0HH/88Zg3bx6qqqrw5JNP4quvvsKaNWuQmZkJAFi/fj3Gjh0LvV6Pa665BiUlJdi2bRs++OAD/PnPf8aFF16IgQMHhp/3tttuwxFHHIFrrrkmfOyII45oM+d4mTx5MpYtW4bly5fjsMMOixrT1NSE559/HpdffjlmzJgBh8OBF154ARMmTMB3332HoUOHRsS/8sorcDgcuOGGG+D1evHkk0/itNNOw48//oj8/HwAwE8//YTRo0ejqKgId999N9LS0vDWW2/h/PPPx7///W9ccMEFOPnkk3HzzTfjL3/5C/7whz+EX4+Wr6+++iqmTp2KCRMm4OGHH4bb7cYzzzyDMWPGYM2aNeH/OV900UX46aefcNNNN6GkpATV1dVYvnw5du3a1eHVhu3bt0NRFGRmZsLtdmPcuHGoqKjAzJkz0bdvX3z99deYNWsW9u7dG+7bFELgvPPOw5dffolrr70WRxxxBN555x1MnTo1pvdk2rRpeOuttzB58mSceOKJ+M9//oOzzz67zfj/9//+HwYNGoQHH3ww/D/6P//5z7jvvvtwySWX4Oqrr0ZNTQ2eeuopnHzyyRHfp59++ikmTpyI4cOHY86cOZBlGS+99BJOO+00fPHFFzjhhBMiztXY2Ija2tqIYzk5OTH9uw500003ISsrC3PmzEF5eTkWLFiAG2+8MeIqwcKFC3HllVfiqKOOwqxZs5CZmYk1a9ZgyZIlmDRpEu655x40Njbi119/xRNPPAEAsFqtbZ7zk08+wcSJEzFgwADcf//98Hg8eOqppzB69GisXr261ffDJZdcgv79+2PevHlYvXo1nn/+eeTl5eHhhx9u998Wy++JmTNnYvz48eHHTJ48GRdccAEuvPDC8LGWovJAbrcbK1aswNixY1u1fbS49NJLcc011+DDDz/sVCtLbm4unnnmGVx33XUR+RxzzDEAOv7dBoR+vseOHQubzYY777wTer0ef/vb33DKKafgP//5D0aOHBlxzptuugm9e/fG3Llz8c033+Dvf/87MjMz8fXXX6Nv37548MEHsXjxYjz66KMYMmQIpkyZEn7szJkzw6/3zTffjB07duCvf/0r1qxZg6+++uqQbjPpkQRRAhx++OECQPjPlClTRCAQiIhxu92tHjdz5kxhsViE1+sNHxs3bpwYN25cRNwf/vAHAUBUV1eHjwEQc+bMCd++8847RV5enhg+fHjE41988UUBQMyfP7/V+TVNE0IIsWPHDgFAvPTSS+H7LrnkEjFkyBBRXFwspk6dGj7+0ksvCQDi8ssvF0cffXT4uMvlEjabTUyaNEkAEP/973+FEEL4/X6Rl5cnhgwZIjweTzj+ww8/FADE7Nmzw8dOPvlkkZ6eLnbu3Bk1zwP169cvIrf9jRs3Thx11FFR7+vI1KlTRVpaWpv3r1mzRgAQt912W8T59n/dg8Gg8Pl8EY9raGgQ+fn54sorrwwfa3ntzWa
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB2M0lEQVR4nO3deXhTZd4+8PtkT5om3egGXZAdRB1AoawiSIfBXdxHUXB0FHEBHUVGcX3RQdTxh+LGrqgjDu4VENkpKCDDvlVKgW50TZs0+/n90TYampTUpDkJ3p/r4sI+59ucb1Ped+4+fc7zCKIoiiAiIiIiinAyqRsgIiIiIgoEgysRERERRQUGVyIiIiKKCgyuRERERBQVGFyJiIiIKCowuBIRERFRVGBwJSIiIqKowOBKRERERFGBwZWIiIiIogKDKxERERFFBQZXoij29ttvIzc3FykpKVAqlUhNTcWIESOwZMkSuN1uqdujELjxxhshCAIef/xxqVsJm8rKSjz22GPo0aMHNBoNEhISkJubi6+//jqo1122bBlef/310DRJRJIQRFEUpW6CiH6fnJwcpKWl4bLLLoPBYEBNTQ22bt2Kjz/+GDfddBM++ugjqVukIJhMJqSkpCA1NRUulwvHjx+HIAhSt9WuDh06hFGjRuH06dO46667MGDAANTU1ODDDz/Erl278Oijj2L27Nm/67WvuOIK7N27F4WFhaFtmojChsGVKIo5HA4olcoW41OmTMHcuXNx7NgxZGdnh78xComFCxfi3nvvxcqVK3HZZZdh3bp1GDFihNRttRuHw4F+/frhl19+wQ8//ICBAwd6rrlcLtx222345JNPPD+YtRWDK1H041IBoijmK7QC8IRVmezX/xP/4osvMG7cOKSnp0OtVqNLly54/vnn4XK5vD730ksvhSAInj9JSUkYN24c9u7d61UnCAKeeeYZr7HZs2dDEARceumlXuNWqxXPPPMMunfvDo1Gg7S0NFx33XUoKCgAABQWFkIQBCxatMjr8yZPngxBEHDnnXd6xhYtWgRBEKBSqXD69Gmv+vz8fE/f27dv97r26aefon///tBqtUhKSsJf//pXnDp1qsV7d/DgQdx4443o0KEDtFotevTogRkzZgAAnnnmGa/3xtefdevWed7H888/v8Xrt8WHH36Iyy+/HCNHjkSvXr3w4Ycf+qzbvXs3RowYAa1Wi06dOuGFF17AwoULIQhCi5CWl5eHYcOGISYmBrGxsRg3bhz27dsXUD+//PILbrjhBiQkJECn02HQoEH45ptvPNfXrVt31vfnzH8zv/XZZ59h7969eOKJJ7xCKwDI5XK88847iIuL83qN5n8PZ36dzb389vvxzTffeGatBUHw+qHubP9GAcBsNmPatGnIyMiAWq1Gjx498Morr+DM+R9BEPDAAw/g008/Re/evaHVapGTk4M9e/YAAN555x107doVGo0Gl156qc8gvW3bNvz5z3+G0WiETqfDiBEjsHnzZr/vHdEfhULqBogoeDU1NXA6nairq8OOHTvwyiuv4Oabb0ZmZqanZtGiRdDr9Zg6dSr0ej1++OEHPP300zCZTC1+9dqzZ0/MmDEDoiiioKAAr776Kv7yl7+gqKio1R5mzZrVYtzlcuGKK67AmjVrcPPNN+Ohhx5CXV0dVq9ejb1796JLly4+X+/o0aN47733/N5PLpfjgw8+wCOPPOIZW7hwITQaDaxWq1ftokWLcNddd+Hiiy/G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d94RAYipqame76koiuL06dO9+ne73WK3bt3E3Nxcr393FotF7Ny5s3j55Ze3+v4Qneu4VIDoHLBw4UKsXr0aH374ISZNmoQPP/zQaxYQALRaree/6+rqUFFRgWHDhsFiseDgwYNetQ6HAxUVFTh9+jTy8/OxYsUKXHDBBUhKSvJ5/1OnTuH//b//h6eeesozi9Xss88+Q1JSEqZMmdLi8/w9aLRjxw58+umnmDVrltdyh9+6/fbbcfDgQc+SgM8++wxGoxGjRo3yqtu+fTvKy8tx//33Q6PReMbHjRuHnj17en7Vffr0aWzYsAETJ070mqlurc+zcblcqKioQEVFBex2e5s+98MPP8S4ceMQGxsLAOjWrRv69+/fYrnAd999h5ycHFx00UWesYSEBNx2221edatXr0ZNTQ1uueUWT08VFRWQy+UYOHAg1q5d22o/3377LS655BIMHTrUM6bX63HPPfegsLAQ+/fvb9PX50tdXZ3n6/Wn+brJZAr6fs0C+Tf67bffQi6X48EHH/S6Pm3aNIiiiLy8PK/xUaNGec1gNy99uP76672+xubxX375BQCwa9cuHDlyBLfeeisqKys93yez2YxRo0Zhw4YN3DGE/tC4VIDoHJCTk+P571tvvRXnnXceZsyYgUmTJmHIkCEAgH379uGf//wnfvjhhxb/o19bW+v18ZYtW9ChQwfPx926dcPnn3/uN8DNnDkT6enpuPfee7F8+XKvawUFBejRowcUisD/380TTzyBYcOG4YorrsADDzzgs6ZDhw4YN24cFixYgAEDBmDBggWYMGFCi6B7/PhxAECPHj1avEbPnj2xadMmAL8Gh2DXpf7WwYMHPe+jTCZD165dMXPmTNx6662tft6BAwfw888/44477sDRo0c945deeinefPNNmEwmGAwGAI1f32+//83O/DX6kSNHAACXXXaZz3s2v54/x48fb7HuFPh1acTx48eDfu9iY2NRUVHRak1dXZ2nNlQC+Td6/PhxpKent7jvb7/+3zrzhx+j0QgAyMjI8DleXV0N4Nfv04QJE/z2Ultbi/j4eL/Xic5lDK5E56Dx48djxowZ2LZtG4YMGYKamhqMGDECBoMBzz33HLp06QKNRoOdO3fi8ccfbzGDc8EFF2DOnDkAGmci33jjDVx66aXYuXMnUlNTvWoPHDiARYsW4YMPPvD7sFhbrFq1Ct9
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
" # Создание диаграмм зависимости\n",
"for column in numeric_columns:\n",
" plt.figure(figsize=(8, 6)) # Установка размера графика\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" # Проверяем, содержит ли колонка только два уникальных значения (0 и 1)\n",
" if df[column].nunique() == 2 and set(df[column].unique()).issubset({0, 1}):\n",
" # Если да, то строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
" else:\n",
" # Если колонка числовая, создаем диаграмму рассеяния\n",
" plt.scatter(df['Outcome'], df[column], alpha=0.5) # Создаем диаграмму рассеяния\n",
" plt.title(f'Зависимость {column} от Outcome')\n",
" plt.xlabel('Outcome (0 = нет, 1 = да)')\n",
" plt.ylabel(column)\n",
" plt.xticks([0, 1]) # Установка меток по оси X\n",
" plt.grid() # Добавление сетки для удобства восприятия\n",
" else:\n",
" # Если колонка не числовая, строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
"\n",
" plt.show() # Отображение графика"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Разобьем наш набор на выборки относительно параметра Outcome:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 5,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [],
"source": [
"# Функция для создания выборок\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"def split_stratified_into_train_val_test(\n",
" df_input,\n",
" stratify_colname=\"y\",\n",
" frac_train=0.6,\n",
" frac_val=0.15,\n",
" frac_test=0.25,\n",
" random_state=None,\n",
"):\n",
"\n",
" if frac_train + frac_val + frac_test != 1.0:\n",
" raise ValueError(\n",
" \"fractions %f, %f, %f do not add up to 1.0\"\n",
" % (frac_train, frac_val, frac_test)\n",
" )\n",
"\n",
" if stratify_colname not in df_input.columns:\n",
" raise ValueError(\"%s is not a column in the dataframe\" % (stratify_colname))\n",
"\n",
" X = df_input # Contains all columns.\n",
" y = df_input[\n",
" [stratify_colname]\n",
" ] # Dataframe of just the column on which to stratify.\n",
"\n",
" # Split original dataframe into train and temp dataframes.\n",
" df_train, df_temp, y_train, y_temp = train_test_split(\n",
" X, y, stratify=y, test_size=(1.0 - frac_train), random_state=random_state\n",
" )\n",
"\n",
" # Split the temp dataframe into val and test dataframes.\n",
" relative_frac_test = frac_test / (frac_val + frac_test)\n",
" df_val, df_test, y_val, y_test = train_test_split(\n",
" df_temp,\n",
" y_temp,\n",
" stratify=y_temp,\n",
" test_size=relative_frac_test,\n",
" random_state=random_state,\n",
" )\n",
"\n",
" assert len(df_input) == len(df_train) + len(df_val) + len(df_test)\n",
"\n",
" return df_train, df_val, df_test"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 6,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Outcome\n",
"0 500\n",
"1 268\n",
"Name: count, dtype: int64\n",
"\n",
"Обучающая выборка: (460, 9)\n",
"Outcome\n",
"0 299\n",
"1 161\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAf8AAADECAYAAACROyhkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tY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Gw8OD+fr6qv4+c+YMA8AaN27MXr58qZq+Z88eBoCtXLlSVbebmxsbMGCAajmMMZaXl8dcXFxYv379NJbVvXt35unpqfpb26nU+Ph4JhAI2A8//KA27927d5menp7G9JiYGAaAhYSEqKbNnz+flVwtFy5cYAA0xqGOHz+uMb1p06YsICBAI/ZPPvmElV7VpWOfNWsWs7W1ZV5eXmptun37dsbn8zXG5NavX88AVDgO7evrq6rv77//Znp6euzLL7/UWrYy7cFY8XoqSSaTMU9PT9anTx+1uvh8Phs+fLjGtqhc51lZWczExIR17dqV5efnay0jk8mYra0t8/T0VCtz5MgRBoDNmzdPNW38+PGsadOmavVs3LiRAWDXrl3T+pkZYywiIoIBYJ9//nmZZRhjrG3btszS0lL1d8m2Lal0HOWd9vfx8WEmJiYsISFBbXrJ78WwYcOYvr4+e/TokWras2fPmImJCfPx8VFNU/YPpb9X3bp1Yzwej3300UeqaUVFRczR0VEt/qps69pUt/0ZY6x9+/bM1taWpaenq6ZFRkYyPp/Pxo0bp5oGgAFgZ8+eVU3Ly8tjrVq1Yvb29kwmkzHGGDtx4gQDwI4dO6a2nLZt26p95qCgIObk5KQRT+n1VXqbZ4yx8PBwBoBt27ZNNU3
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Контрольная выборка: (154, 9)\n",
"Outcome\n",
"0 101\n",
"1 53\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgsAAADECAYAAAARfmKGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3n0lEQVR4nO3dd3wT9f8H8FeSjnTSSVug0Fpo2asCMspepcoSUFHZtoiCCMpPUGQooqIIAiKoIDJkCnwFLBsFZEOByiqlZRT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FQqEQc+bM0Vv34sWLwsLCwmB5VFSUACBWrVqlWzZjxgxR8G05fPiwACDWrl2rt254eLjB8jp16oiQkBCD2N966y3x+Fv9eOxTpkwR1atXF4GBgXrHdPXq1UIul4vDhw/rrf/9998LAOLo0aMG2yuoU6dOuvp27twpLCwsxOTJk42WNed4CJH/PhWUm5srGjduLLp27apXl1wuFwMGDDA4F7XveUpKinBwcBBt2rQRWVlZRsvk5uaK6tWri8aNG+uV2bFjhwAgPv74Y92y4cOHizp16ujVs3z5cgFAnDx50ug+CyFERESEACDeeeedQssIIUTTpk2Fi4uL7u+Cx7agx+Mwdq5qdezYUTg4OIibN2/qLS94XfTv319YWVmJ6Oho3bK7d+8KBwcH0bFjR90y7f3h8euqbdu2QiaTibFjx+qWqVQqUatWLb34i3OuG1PS4//4uqdPnxb29vZi8ODBBudO8+bNRfXq1UVycrJu2fnz54VcLhfDhg3TLdOet4mJiXr
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Тестовая выборка: (154, 9)\n",
"Outcome\n",
"0 100\n",
"1 54\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAekAAADECAYAAAC7i9nLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA1QklEQVR4nO3dd1xT1/sH8E8SEvbeKAKKiHug8lNkuEWsq9a6t1Kr1tZ+v7S2tY5qtdpq3drWPeqs2lonVr/uDbiQooIiKks2hITk/P6gSbkkICBwQ3jerxev1puTc597cnOfnHPPvVfAGGMghBBCiM4R8h0AIYQQQrSjJE0IIYToKErShBBCiI6iJE0IIYToKErShBBCiI6iJE0IIYToKErShBBCiI6iJE0IIYToKErShBBCajXGGF6/fo3Y2Fi+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2Nio/128bYsrGYe2fVUlICCAmZubs6dPn3KWF/9eDBw4kEkkEvb48WP1shcvXjBzc3MWEBCgXqY6PpT8XnXq1IkJBAL2wQcfqJcVFhay+vXrc+KvyL6uTWXbv6TS2io7O5tZWVmxyZMnc5a/evWKWVpacpaXp12Lc3NzY2PHjtVYXtX7X3JyMpNIJKxXr16c78WaNWsYALZ582b1spL717FjxxgA1qdPH43vpDba9s8vvviCAWDJycnqZQDYtGnTSq1HtV/FxcVx/t2sWTPOsUB1/C9+fGnTpg1zcHBgaWlp6mVRUVFMKBSyMWPGqJepjjP9+/fnrPvDDz9kAFhUVBQnXtX+MXv2bCYSidjhw4c576toLihLpYa
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Вывод распределения количества наблюдений по меткам (классам)\n",
"print(df.Outcome.value_counts())\n",
"print()\n",
"\n",
"data = df.copy()\n",
"\n",
"df_train, df_val, df_test = split_stratified_into_train_val_test(\n",
" data, stratify_colname=\"Outcome\", frac_train=0.60, frac_val=0.20, frac_test=0.20\n",
")\n",
"\n",
"print(\"Обучающая выборка: \", df_train.shape)\n",
"print(df_train.Outcome.value_counts())\n",
"counts = df_train['Outcome'].value_counts()\n",
"plt.figure(figsize=(2, 2))# Установка размера графика\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)# Построение круговой диаграммы\n",
"plt.title('Распределение классов Outcome в обучающей выборке')# Добавление заголовка\n",
"plt.show()# Отображение графика\n",
"\n",
"print(\"Контрольная выборка: \", df_val.shape)\n",
"print(df_val.Outcome.value_counts())\n",
"counts = df_val['Outcome'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов Outcome в контрольной выборке')\n",
"plt.show()\n",
"\n",
"print(\"Тестовая выборка: \", df_test.shape)\n",
"print(df_test.Outcome.value_counts())\n",
"counts = df_test['Outcome'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов Outcome в тестовой выборке')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Сбалансируем распределение:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Балансировка данных оверсемплингом. Это метод, увеличивающий число наблюдений в меньшинственном классе для достижения более равномерного распределения классов."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 7,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка: (460, 9)\n",
"Outcome\n",
"0 299\n",
"1 161\n",
"Name: count, dtype: int64\n",
2024-10-11 18:29:39 +04:00
"Обучающая выборка после oversampling: (586, 9)\n",
2024-10-10 22:31:48 +04:00
"Outcome\n",
"0 299\n",
2024-10-11 18:29:39 +04:00
"1 287\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n"
]
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqIAAADECAYAAABEM0OdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+IElEQVR4nO3dd3hT1RsH8G+S7kVbSherpaWsAtUyFCgtiqxiBWQIKFtAwQWCgD/ZiAgyZAiobBAZCorIRhmWvWW12CIU6KSlO21yfn9gQtOkbVpSbsf38zx9IDf3nvvek5ObN+fceyITQggQERERET1jcqkDICIiIqLKiYkoEREREUmCiSgRERERSYKJKBERERFJgokoEREREUmCiSgRERERSYKJKBERERFJgokoEREREUnCTOoAiIiIyDClUomkpCSo1Wp4enpKHQ6RybFHlIiIKp0NGzYgOjpa+3jNmjWIiYmRLqA8zpw5g379+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t27p032hRAICwvD4cOHMXToUAQEBGDv3r0YN24cYmJitK9NacjMzERISAgiIyMxevRoeHt7Y+vWrRg0aBCSk5PxwQcfFLhtZGQkvv3222LtT3Oeys7Oxt69ezFv3jxYWVlhxowZJT6GxMREHDt2DMeOHcOQIUMQGBiIgwcPYuLEiYiOjsby5cu16xbndTOmzeZ3584ddOrUCfXr18eWLVtgZvY4XTBF2w4ICMDYsWN1lq1btw779+/XWWbsMRpzHs+rtD9zs7OzsX37du0
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Pregnancies</th>\n",
" <th>Glucose</th>\n",
" <th>BloodPressure</th>\n",
" <th>SkinThickness</th>\n",
" <th>Insulin</th>\n",
" <th>BMI</th>\n",
" <th>DiabetesPedigreeFunction</th>\n",
" <th>Age</th>\n",
" <th>Outcome</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
2024-10-11 18:29:39 +04:00
" <td>4.000000</td>\n",
" <td>171.000000</td>\n",
" <td>72.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>43.600000</td>\n",
" <td>0.479000</td>\n",
2024-10-10 22:31:48 +04:00
" <td>26.000000</td>\n",
2024-10-11 18:29:39 +04:00
" <td>1</td>\n",
2024-10-10 22:31:48 +04:00
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
2024-10-11 18:29:39 +04:00
" <td>4.000000</td>\n",
" <td>110.000000</td>\n",
" <td>76.000000</td>\n",
" <td>20.000000</td>\n",
" <td>100.000000</td>\n",
" <td>28.400000</td>\n",
" <td>0.118000</td>\n",
" <td>27.000000</td>\n",
2024-10-10 22:31:48 +04:00
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
2024-10-11 18:29:39 +04:00
" <td>3.000000</td>\n",
" <td>106.000000</td>\n",
" <td>72.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>25.800000</td>\n",
" <td>0.207000</td>\n",
" <td>27.000000</td>\n",
2024-10-10 22:31:48 +04:00
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
2024-10-11 18:29:39 +04:00
" <td>0.000000</td>\n",
" <td>141.000000</td>\n",
" <td>35.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>42.400000</td>\n",
" <td>0.205000</td>\n",
" <td>29.000000</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
2024-10-10 22:31:48 +04:00
" <td>1.000000</td>\n",
" <td>100.000000</td>\n",
" <td>66.000000</td>\n",
" <td>15.000000</td>\n",
" <td>56.000000</td>\n",
" <td>23.600000</td>\n",
" <td>0.666000</td>\n",
" <td>26.000000</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
2024-10-11 18:29:39 +04:00
" <th>581</th>\n",
" <td>4.223037</td>\n",
" <td>113.446073</td>\n",
" <td>77.243141</td>\n",
" <td>0.000000</td>\n",
2024-10-10 22:31:48 +04:00
" <td>0.000000</td>\n",
2024-10-11 18:29:39 +04:00
" <td>30.687204</td>\n",
" <td>0.404846</td>\n",
" <td>46.797068</td>\n",
2024-10-10 22:31:48 +04:00
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
2024-10-11 18:29:39 +04:00
" <th>582</th>\n",
" <td>3.000000</td>\n",
" <td>78.972919</td>\n",
" <td>65.566707</td>\n",
" <td>31.513540</td>\n",
" <td>79.243727</td>\n",
" <td>32.556671</td>\n",
" <td>0.711110</td>\n",
" <td>26.486460</td>\n",
2024-10-10 22:31:48 +04:00
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
2024-10-11 18:29:39 +04:00
" <th>583</th>\n",
" <td>3.000000</td>\n",
" <td>79.630698</td>\n",
" <td>76.091174</td>\n",
" <td>31.184651</td>\n",
" <td>73.323715</td>\n",
" <td>33.609117</td>\n",
" <td>1.024212</td>\n",
" <td>26.815349</td>\n",
2024-10-10 22:31:48 +04:00
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
2024-10-11 18:29:39 +04:00
" <th>584</th>\n",
" <td>2.984921</td>\n",
" <td>95.708532</td>\n",
" <td>66.462302</td>\n",
" <td>28.552777</td>\n",
" <td>159.015079</td>\n",
" <td>36.005535</td>\n",
" <td>0.685819</td>\n",
" <td>27.432143</td>\n",
2024-10-10 22:31:48 +04:00
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
2024-10-11 18:29:39 +04:00
" <th>585</th>\n",
" <td>10.312967</td>\n",
" <td>142.374065</td>\n",
" <td>77.082295</td>\n",
" <td>41.915212</td>\n",
" <td>124.164589</td>\n",
" <td>37.666584</td>\n",
" <td>0.495783</td>\n",
" <td>40.875312</td>\n",
2024-10-10 22:31:48 +04:00
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
2024-10-11 18:29:39 +04:00
"<p>586 rows × 9 columns</p>\n",
2024-10-10 22:31:48 +04:00
"</div>"
],
"text/plain": [
" Pregnancies Glucose BloodPressure SkinThickness Insulin \\\n",
2024-10-11 18:29:39 +04:00
"0 4.000000 171.000000 72.000000 0.000000 0.000000 \n",
"1 4.000000 110.000000 76.000000 20.000000 100.000000 \n",
"2 3.000000 106.000000 72.000000 0.000000 0.000000 \n",
"3 0.000000 141.000000 35.000000 0.000000 0.000000 \n",
"4 1.000000 100.000000 66.000000 15.000000 56.000000 \n",
2024-10-10 22:31:48 +04:00
".. ... ... ... ... ... \n",
2024-10-11 18:29:39 +04:00
"581 4.223037 113.446073 77.243141 0.000000 0.000000 \n",
"582 3.000000 78.972919 65.566707 31.513540 79.243727 \n",
"583 3.000000 79.630698 76.091174 31.184651 73.323715 \n",
"584 2.984921 95.708532 66.462302 28.552777 159.015079 \n",
"585 10.312967 142.374065 77.082295 41.915212 124.164589 \n",
2024-10-10 22:31:48 +04:00
"\n",
" BMI DiabetesPedigreeFunction Age Outcome \n",
2024-10-11 18:29:39 +04:00
"0 43.600000 0.479000 26.000000 1 \n",
"1 28.400000 0.118000 27.000000 0 \n",
"2 25.800000 0.207000 27.000000 0 \n",
"3 42.400000 0.205000 29.000000 1 \n",
"4 23.600000 0.666000 26.000000 0 \n",
2024-10-10 22:31:48 +04:00
".. ... ... ... ... \n",
2024-10-11 18:29:39 +04:00
"581 30.687204 0.404846 46.797068 1 \n",
"582 32.556671 0.711110 26.486460 1 \n",
"583 33.609117 1.024212 26.815349 1 \n",
"584 36.005535 0.685819 27.432143 1 \n",
"585 37.666584 0.495783 40.875312 1 \n",
2024-10-10 22:31:48 +04:00
"\n",
2024-10-11 18:29:39 +04:00
"[586 rows x 9 columns]"
2024-10-10 22:31:48 +04:00
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 7,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from imblearn.over_sampling import ADASYN\n",
"\n",
"ada = ADASYN()\n",
"\n",
"print(\"Обучающая выборка: \", df_train.shape)\n",
"print(df_train.Outcome.value_counts())\n",
"\n",
"X_resampled, y_resampled = ada.fit_resample(df_train, df_train[\"Outcome\"])\n",
"df_train_adasyn = pd.DataFrame(X_resampled)\n",
"\n",
"print(\"Обучающая выборка после oversampling: \", df_train_adasyn.shape)\n",
"print(df_train_adasyn.Outcome.value_counts())\n",
"\n",
"counts = df_train_adasyn['Outcome'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов Outcome в тренировочной выборке после ADASYN')\n",
"plt.show()\n",
"\n",
"df_train_adasyn"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Балансировка данных андерсемплингом. Этот метод помогает сбалансировать выборку, уменьшая количество экземпляров класса большинства, чтобы привести е г о в соответствие с классом меньшинства."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 8,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка после undersampling: (322, 9)\n",
"Outcome\n",
"0 161\n",
"1 161\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtwAAADECAYAAACss/a2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+PklEQVR4nO3dd3gUVdsG8Ht30xtpkEJLTCD0RIPwUkIAIUCCCIg0C1VAiiAIin5IFxUUkCKK0oRXqsIrIh2khSIdKQZMEAKkQUIKu0l2z/dH3DWT3YRNWYYk9++6csHOTnnmzNmZZ8+cOasQQggQEREREZFFKOUOgIiIiIioImPCTURERERkQUy4iYiIiIgsiAk3EREREZEFMeEmIiIiIrIgJtxERERERBbEhJuIiIiIyIKYcBMRERERWZCV3AEQERGRadnZ2bh//z50Oh18fX3lDoeISogt3EREVOmsXbsWcXFxhterVq1CfHy8fAHl8/vvv6N///7w9PSEra0tfHx88PLLL8sdFj2l/Pz8MHDgQLnDeCpMmzYNCoVCMu1pKZ9iJdyrVq2CQqEw/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16Gb6oX7hwASdOnDCU6alTp3Ds2DH07dsXNWrUQFxcHL766iu0bdsWly9fNmo8Ks21AcirI+np6Rg1ahTUajUWLlyI9u3b4+LFi/Dy8rJImU+ePBmfffYZXnzxRXTq1Annz59Hp06djBouzCKKYeXKlQKA2Lt3r0hKShK3bt0S69evFx4eHsL
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from imblearn.under_sampling import RandomUnderSampler\n",
"\n",
"rus = RandomUnderSampler()# Создание экземпляра RandomUnderSampler\n",
"\n",
"# Применение RandomUnderSampler\n",
"X_resampled, y_resampled = rus.fit_resample(df_train.drop(columns=['Outcome']), df_train['Outcome'])\n",
"\n",
"# Создание нового DataFrame\n",
"df_train_undersampled = pd.DataFrame(X_resampled)\n",
"df_train_undersampled['Outcome'] = y_resampled # Добавление целевой переменной\n",
"\n",
"# Вывод информации о новой выборке\n",
"print(\"Обучающая выборка после undersampling: \", df_train_undersampled.shape)\n",
"print(df_train_undersampled['Outcome'].value_counts())\n",
"\n",
"# Визуализация распределения классов\n",
"counts = df_train_undersampled['Outcome'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов Outcome в тренировочной выборке после Undersampling')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2. Датасет: Данные по инсультам\n",
"https://www.kaggle.com/datasets/fedesoriano/stroke-prediction-dataset\n",
"##### О наборе данных: \n",
"По данным Всемирной организации здравоохранения (В О З ), инсульт является второй по значимости причиной смертности во всем мире, на е г о долю приходится примерно 11% от общего числа смертей.\n",
"Этот набор данных используется для прогнозирования вероятности инсульта у пациента на основе входных параметров, таких как пол, возраст, различные заболевания и статус курильщика. Каждая строка в данных содержит соответствующую информацию о пациенте.\n",
"\n",
"Атрибуты:\n",
"1) id: уникальный идентификатор\n",
"2) gender: \"Male\", \"Female\" или \"Other\"\n",
"3) age: возраст пациента\n",
"4) hypertension: 0, если у пациента нет артериальной гипертензии, 1, если у пациента есть артериальная гипертензия\n",
"5) heart_disease: 0, если у пациента нет сердечных заболеваний, 1, если у пациента есть сердечные заболевания\n",
"6) ever_married: \"No\" или \"Yes\"\n",
"7) work_type: \"children\", \"Govt_jov\", \"Never_worked\", \"Private\" or \"Self-employed\"\n",
"8) Residence_type: \"Rural\" or \"Urban\"\n",
"9) avg_glucose_level: средний уровень глюкозы в крови\n",
"10) bmi: индекс массы тела\n",
"11) smoking_status: \"formerly smoked\", \"never smoked\", \"smokes\" или \"Unknown\"*\n",
"12) stroke: 1, если у пациента был инсульт, или 0, если нет.\n",
"##### Таким образом:\n",
"* Объект наблюдения - Реальные пациенты.\n",
"* Атрибуты: id, gender, age, hypertension, heart_disease, ever_married, work_type, Residence_type, avg_glucose_level, bmi, smoking_status, stroke.\n",
"* Проблемная область: Прогнозирование вероятности инсульта у пациента."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 11,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество колонок: 12\n",
"Колонки: id, gender, age, hypertension, heart_disease, ever_married, work_type, Residence_type, avg_glucose_level, bmi, smoking_status, stroke\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 5110 entries, 0 to 5109\n",
"Data columns (total 12 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 id 5110 non-null int64 \n",
" 1 gender 5110 non-null object \n",
" 2 age 5110 non-null float64\n",
" 3 hypertension 5110 non-null int64 \n",
" 4 heart_disease 5110 non-null int64 \n",
" 5 ever_married 5110 non-null object \n",
" 6 work_type 5110 non-null object \n",
" 7 Residence_type 5110 non-null object \n",
" 8 avg_glucose_level 5110 non-null float64\n",
" 9 bmi 4909 non-null float64\n",
" 10 smoking_status 5110 non-null object \n",
" 11 stroke 5110 non-null int64 \n",
"dtypes: float64(3), int64(4), object(5)\n",
"memory usage: 479.2+ KB\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>gender</th>\n",
" <th>age</th>\n",
" <th>hypertension</th>\n",
" <th>heart_disease</th>\n",
" <th>ever_married</th>\n",
" <th>work_type</th>\n",
" <th>Residence_type</th>\n",
" <th>avg_glucose_level</th>\n",
" <th>bmi</th>\n",
" <th>smoking_status</th>\n",
" <th>stroke</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>9046</td>\n",
" <td>Male</td>\n",
" <td>67.0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Urban</td>\n",
" <td>228.69</td>\n",
" <td>36.6</td>\n",
" <td>formerly smoked</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>51676</td>\n",
" <td>Female</td>\n",
" <td>61.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Rural</td>\n",
" <td>202.21</td>\n",
" <td>NaN</td>\n",
" <td>never smoked</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>31112</td>\n",
" <td>Male</td>\n",
" <td>80.0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Rural</td>\n",
" <td>105.92</td>\n",
" <td>32.5</td>\n",
" <td>never smoked</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>60182</td>\n",
" <td>Female</td>\n",
" <td>49.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Urban</td>\n",
" <td>171.23</td>\n",
" <td>34.4</td>\n",
" <td>smokes</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1665</td>\n",
" <td>Female</td>\n",
" <td>79.0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Rural</td>\n",
" <td>174.12</td>\n",
" <td>24.0</td>\n",
" <td>never smoked</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id gender age hypertension heart_disease ever_married \\\n",
"0 9046 Male 67.0 0 1 Yes \n",
"1 51676 Female 61.0 0 0 Yes \n",
"2 31112 Male 80.0 0 1 Yes \n",
"3 60182 Female 49.0 0 0 Yes \n",
"4 1665 Female 79.0 1 0 Yes \n",
"\n",
" work_type Residence_type avg_glucose_level bmi smoking_status \\\n",
"0 Private Urban 228.69 36.6 formerly smoked \n",
"1 Self-employed Rural 202.21 NaN never smoked \n",
"2 Private Rural 105.92 32.5 never smoked \n",
"3 Private Urban 171.23 34.4 smokes \n",
"4 Self-employed Rural 174.12 24.0 never smoked \n",
"\n",
" stroke \n",
"0 1 \n",
"1 1 \n",
"2 1 \n",
"3 1 \n",
"4 1 "
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 11,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\".//static//csv//stroke.csv\", sep=\",\")\n",
"print('Количество колонок: ' + str(df.columns.size)) \n",
"print('Колонки: ' + ', '.join(df.columns)+'\\n')\n",
"\n",
"df.info()\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Получение сведений о пропущенных данных\n",
"Типы пропущенных данных:\n",
"\n",
"- None - представление пустых данных в Python\n",
"- NaN - представление пустых данных в Pandas\n",
"- '' - пустая строка"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 10,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"id 0\n",
"gender 0\n",
"age 0\n",
"hypertension 0\n",
"heart_disease 0\n",
"ever_married 0\n",
"work_type 0\n",
"Residence_type 0\n",
"avg_glucose_level 0\n",
"bmi 201\n",
"smoking_status 0\n",
"stroke 0\n",
"dtype: int64\n",
"\n",
"id False\n",
"gender False\n",
"age False\n",
"hypertension False\n",
"heart_disease False\n",
"ever_married False\n",
"work_type False\n",
"Residence_type False\n",
"avg_glucose_level False\n",
"bmi True\n",
"smoking_status False\n",
"stroke False\n",
"dtype: bool\n",
"\n",
"id процент пустых значений: %0.00\n",
"gender процент пустых значений: %0.00\n",
"age процент пустых значений: %0.00\n",
"hypertension процент пустых значений: %0.00\n",
"heart_disease процент пустых значений: %0.00\n",
"ever_married процент пустых значений: %0.00\n",
"work_type процент пустых значений: %0.00\n",
"Residence_type процент пустых значений: %0.00\n",
"avg_glucose_level процент пустых значений: %0.00\n",
"bmi процент пустых значений: %3.93\n",
"smoking_status процент пустых значений: %0.00\n",
"stroke процент пустых значений: %0.00\n"
]
}
],
"source": [
"# Количество пустых значений признаков\n",
"print(df.isnull().sum())\n",
"print()\n",
"\n",
"# Есть ли пустые значения признаков\n",
"print(df.isnull().any())\n",
"print()\n",
"\n",
"# Процент пустых значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" print(f\"{i} процент пустых значений: %{null_rate:.2f}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Пропущенные данные существуют. Необходимо заполнить пропуски медианными значениями.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Заполнение пропущенных данных:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 12,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(5110, 12)\n",
"id False\n",
"gender False\n",
"age False\n",
"hypertension False\n",
"heart_disease False\n",
"ever_married False\n",
"work_type False\n",
"Residence_type False\n",
"avg_glucose_level False\n",
"bmi False\n",
"smoking_status False\n",
"stroke False\n",
"dtype: bool\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>gender</th>\n",
" <th>age</th>\n",
" <th>hypertension</th>\n",
" <th>heart_disease</th>\n",
" <th>ever_married</th>\n",
" <th>work_type</th>\n",
" <th>Residence_type</th>\n",
" <th>avg_glucose_level</th>\n",
" <th>bmi</th>\n",
" <th>smoking_status</th>\n",
" <th>stroke</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>5105</th>\n",
" <td>18234</td>\n",
" <td>Female</td>\n",
" <td>80.0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Urban</td>\n",
" <td>83.75</td>\n",
" <td>27.7</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5106</th>\n",
" <td>44873</td>\n",
" <td>Female</td>\n",
" <td>81.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Urban</td>\n",
" <td>125.20</td>\n",
" <td>40.0</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5107</th>\n",
" <td>19723</td>\n",
" <td>Female</td>\n",
" <td>35.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Rural</td>\n",
" <td>82.99</td>\n",
" <td>30.6</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5108</th>\n",
" <td>37544</td>\n",
" <td>Male</td>\n",
" <td>51.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Rural</td>\n",
" <td>166.29</td>\n",
" <td>25.6</td>\n",
" <td>formerly smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5109</th>\n",
" <td>44679</td>\n",
" <td>Female</td>\n",
" <td>44.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Govt_job</td>\n",
" <td>Urban</td>\n",
" <td>85.28</td>\n",
" <td>26.2</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id gender age hypertension heart_disease ever_married \\\n",
"5105 18234 Female 80.0 1 0 Yes \n",
"5106 44873 Female 81.0 0 0 Yes \n",
"5107 19723 Female 35.0 0 0 Yes \n",
"5108 37544 Male 51.0 0 0 Yes \n",
"5109 44679 Female 44.0 0 0 Yes \n",
"\n",
" work_type Residence_type avg_glucose_level bmi smoking_status \\\n",
"5105 Private Urban 83.75 27.7 never smoked \n",
"5106 Self-employed Urban 125.20 40.0 never smoked \n",
"5107 Self-employed Rural 82.99 30.6 never smoked \n",
"5108 Private Rural 166.29 25.6 formerly smoked \n",
"5109 Govt_job Urban 85.28 26.2 Unknown \n",
"\n",
" stroke \n",
"5105 0 \n",
"5106 0 \n",
"5107 0 \n",
"5108 0 \n",
"5109 0 "
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 12,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fillna_df = df.fillna(0)\n",
"\n",
"print(fillna_df.shape)\n",
"\n",
"print(fillna_df.isnull().any())\n",
"\n",
"# Замена пустых данных на 0\n",
"df[\"bmi\"] = df[\"bmi\"].fillna(0)\n",
"\n",
"# Вычисляем медиану для колонки \"bmi\"\n",
"median_bmi = df[\"bmi\"].median()\n",
"\n",
"# Заменяем значения 0 на медиану\n",
"df.loc[df[\"bmi\"] == 0, \"bmi\"] = median_bmi\n",
"\n",
"df.tail()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Удалим наблюдения с пропусками:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 13,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(5110, 12)\n",
"id False\n",
"gender False\n",
"age False\n",
"hypertension False\n",
"heart_disease False\n",
"ever_married False\n",
"work_type False\n",
"Residence_type False\n",
"avg_glucose_level False\n",
"bmi False\n",
"smoking_status False\n",
"stroke False\n",
"dtype: bool\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>gender</th>\n",
" <th>age</th>\n",
" <th>hypertension</th>\n",
" <th>heart_disease</th>\n",
" <th>ever_married</th>\n",
" <th>work_type</th>\n",
" <th>Residence_type</th>\n",
" <th>avg_glucose_level</th>\n",
" <th>bmi</th>\n",
" <th>smoking_status</th>\n",
" <th>stroke</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>5105</th>\n",
" <td>18234</td>\n",
" <td>Female</td>\n",
" <td>80.0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Urban</td>\n",
" <td>83.75</td>\n",
" <td>27.7</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5106</th>\n",
" <td>44873</td>\n",
" <td>Female</td>\n",
" <td>81.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Urban</td>\n",
" <td>125.20</td>\n",
" <td>40.0</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5107</th>\n",
" <td>19723</td>\n",
" <td>Female</td>\n",
" <td>35.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Self-employed</td>\n",
" <td>Rural</td>\n",
" <td>82.99</td>\n",
" <td>30.6</td>\n",
" <td>never smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5108</th>\n",
" <td>37544</td>\n",
" <td>Male</td>\n",
" <td>51.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Private</td>\n",
" <td>Rural</td>\n",
" <td>166.29</td>\n",
" <td>25.6</td>\n",
" <td>formerly smoked</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5109</th>\n",
" <td>44679</td>\n",
" <td>Female</td>\n",
" <td>44.0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Yes</td>\n",
" <td>Govt_job</td>\n",
" <td>Urban</td>\n",
" <td>85.28</td>\n",
" <td>26.2</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id gender age hypertension heart_disease ever_married \\\n",
"5105 18234 Female 80.0 1 0 Yes \n",
"5106 44873 Female 81.0 0 0 Yes \n",
"5107 19723 Female 35.0 0 0 Yes \n",
"5108 37544 Male 51.0 0 0 Yes \n",
"5109 44679 Female 44.0 0 0 Yes \n",
"\n",
" work_type Residence_type avg_glucose_level bmi smoking_status \\\n",
"5105 Private Urban 83.75 27.7 never smoked \n",
"5106 Self-employed Urban 125.20 40.0 never smoked \n",
"5107 Self-employed Rural 82.99 30.6 never smoked \n",
"5108 Private Rural 166.29 25.6 formerly smoked \n",
"5109 Govt_job Urban 85.28 26.2 Unknown \n",
"\n",
" stroke \n",
"5105 0 \n",
"5106 0 \n",
"5107 0 \n",
"5108 0 \n",
"5109 0 "
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 13,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dropna_df = df.dropna()\n",
"\n",
"print(dropna_df.shape)\n",
"\n",
"print(fillna_df.isnull().any())\n",
"df.tail()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Проверим выбросы и усредним их:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 15,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Колонка age:\n",
" Есть выбросы: Нет\n",
" Количество выбросов: 0\n",
" Минимальное значение: 0.08\n",
" Максимальное значение: 82.0\n",
" 1-й квартиль (Q1): 25.0\n",
" 3-й квартиль (Q3): 61.0\n",
"\n",
"Колонка avg_glucose_level:\n",
" Есть выбросы: Нет\n",
" Количество выбросов: 0\n",
" Минимальное значение: 55.12\n",
" Максимальное значение: 169.35750000000002\n",
" 1-й квартиль (Q1): 77.245\n",
" 3-й квартиль (Q3): 114.09\n",
"\n",
"Колонка bmi:\n",
" Есть выбросы: Нет\n",
" Количество выбросов: 0\n",
2024-10-11 18:29:39 +04:00
" Минимальное значение: 10.300000000000006\n",
" Максимальное значение: 46.29999999999999\n",
" 1-й квартиль (Q1): 23.8\n",
" 3-й квартиль (Q3): 32.8\n",
2024-10-10 22:31:48 +04:00
"\n"
]
}
],
"source": [
"numeric_columns = ['age', 'avg_glucose_level', 'bmi']\n",
"for column in numeric_columns:\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" q1 = df[column].quantile(0.25) # Находим 1-й квартиль (Q1)\n",
" q3 = df[column].quantile(0.75) # Находим 3-й квартиль (Q3)\n",
" iqr = q3 - q1 # Вычисляем межквартильный размах (IQR)\n",
"\n",
" # Определяем границы для выбросов\n",
" lower_bound = q1 - 1.5 * iqr # Нижняя граница\n",
" upper_bound = q3 + 1.5 * iqr # Верхняя граница\n",
"\n",
" # Подсчитываем количество выбросов\n",
" outliers = df[(df[column] < lower_bound) | (df[column] > upper_bound)]\n",
" outlier_count = outliers.shape[0]\n",
"\n",
" print(f\"Колонка {column}:\")\n",
" print(f\" Есть выбросы: {'Да' if outlier_count > 0 else 'Нет'}\")\n",
" print(f\" Количество выбросов: {outlier_count}\")\n",
" print(f\" Минимальное значение: {df[column].min()}\")\n",
" print(f\" Максимальное значение: {df[column].max()}\")\n",
" print(f\" 1-й квартиль (Q1): {q1}\")\n",
" print(f\" 3-й квартиль (Q3): {q3}\\n\")\n",
"\n",
" # Устраняем выбросы: заменяем значения ниже нижней границы на саму нижнюю границу, а выше верхней — на верхнюю\n",
" df[column] = df[column].apply(lambda x: lower_bound if x < lower_bound else upper_bound if x > upper_bound else x)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Постараемся выявить зависимости Stroke от остальных колонок:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Разобьем наш набор на выборки относительно параметра Stroke:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 19,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAJHCAYAAACemuCPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABTJUlEQVR4nO3deVhUdf//8deAgqIsoiK4IS6puOVSSqa5kKiYmda3RZPS8tZcUizNO3czzXLPslVbNNts09sVd0UrzX3JBcMNXAgQFxQ4vz+6mF8jaAzNOOB5Pq5rrps55z3nvM8Mc/vq8DmfYzEMwxAAAABgEm6ubgAAAAC4nQjAAAAAMBUCMAAAAEyFAAwAAABTIQADAADAVAjAAAAAMBUCMAAAAEyFAAwAAABTIQADAADAVAjAAIACIS0tTTNmzLA+T05O1pw5c1zX0B2qSpUqeuaZZ1zdBuBSBGCgEJs/f74sFot+/fXXHOs++OADWSwWdenSRZmZmS7oDrBP8eLFNXLkSC1YsEAnTpzQ2LFj9dNPP7m6LQB3oCKubgCA43333Xfq16+fWrRooUWLFsnd3d3VLQH/yN3dXePGjVPPnj2VlZUlHx8fLV261NVtAbgDEYCBO8y6dev05JNPKjQ0VD/99JOKFSvm6paAPBs6dKgef/xxnThxQrVr15afn5+rW8ItZGRkKCsrSx4eHq5uBbALQyCAO8jOnTv18MMPKygoSCtWrJCvr2+Omq+//lqNGzdW8eLFVaZMGfXo0UOnTp3KdXsWiyXXx/Hjx21qxo4da/O6N998UxaLRa1atbIuGzt2rCwWS4595DYeMTk5WYMHD1alSpXk6emp6tWr64033lBWVpZNXVZWlmbOnKl69eqpWLFiKlu2rNq3b28dEnKz/rMf2f2tW7fOZrmnp6fuuusuTZo0SYZh2Ozzt99+U4cOHeTj46OSJUuqbdu22rp1a67v398dOnRIbdq0UWBgoDw9PVWpUiX17dtXSUlJ1prsPr755pscry9ZsqTN+5SUlKSXXnp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kpK0aNEiPfLII9q/f79efPFFtWvXzmYMcPY/jDVr1szx+lq1amnTpk02y5KTkyUpR5C9lTFjxqh8+fL6z3/+k2Mca1hYmCwWi0aMGKHXXnvNut0bx/UePnxYu3fvvuk/sGfPnpX015CP8uXLO/TPr126dLH+7ObmppEjR6pbt26SpHPnzuny5cu5vn+1a9dWVlaWTpw4oTp16txyHxEREdq2bZskqX379jZ/ss7Wq1evf+w1e/zzO++8o7i4OJvw+few5uj3PduYMWNy/Y+PG4eVZMvMzNR///tfde/eXfXr17/lscXFxem9997Tu+++a/dFnOfPn1eNGjXyVJuX3/EmTZqoaNGiGjt2rMqUKWMdAnHj+5ebP/74Q0FBQfLy8rJZXr16dZvnR44ckWEYGjVqlEaNGpXrts6ePasKFSpYn1euXNlmfalSpSRJf/75p3XfknK8F2XLlrXWZrP3sw8JCcm1DihMCMDAHeDNN9/UY489Jkl6//331axZM40YMULvvPNOvreZkJAgSQoMDMxT/YEDBzR//nx9/vnnKlq0aI71DRo00JgxYzRu3DgtWLDgptvJysrSgw8+qGHDhuW6/q677spTP/nx1ltvqUGDBrp+/bp++eUXvfbaaypSpEiuQS+/Zs+erfPnz2v//v2aNGmS+vbtq88//9ymZvTo0WrRooXNsoceesjm+euvv65Ro0apV69emjBhgvz9/eXm5qbBgwfbhDNnve99+vSx/s5l+/uZzht99NFHOn78uFasWHHTmmyvvvqqatSooaioKG3cuPEf67Ndu3ZNZ86
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABXbUlEQVR4nO3deXwU9f3H8ffskd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587BzIsvvqi0tDRNmDBBaWlpeu+99zRx4kRVVFTo4YcfDtlfz549dfvtt8s0TW3cuFGPPvqoTjvtNG3ZsmWvM0yZMqXJdr/fr9NPP10LFy7URRddpBtuuEGVlZVasGCB1qxZo27duoXd34YNG/Tcc881ezy73a5XXnlFN910U3DbjBkz5Ha7VVdXF5J98cUXNXbsWB111FGaMmWKioqK9Pjjj2vJkiX64osvlJWVJUn68ssvNWTIEDmdTl111VUqLCzUxo0b9Z///Ef33XefzjnnHHXv3j2435tuukmHHnqorrrqquC2Qw89tNmZIzV79mzV1NTod7/7ndq0aaNPP/1UTz75pL7//nvNnj07mHvrrbd04YUXqnfv3poyZYp2796tcePGqUOHDk32efXVVwc/h+uvv16bNm3SU089pS+++EJLlixp9j+CJOndd9/VqaeeqoMOOkiTJk1SbW2tnnzySQ0ePFgrVqxQYWFh1J/Nb3/7W/3jH//Qtddeq8MOO0y7du3SRx99pG+++Ub9+vXT7bffrvLycn3//fd67LHHJKnJxVT33HOPkpKSdPPNN8vj8SgpKSnin/2ePvvsM40YMUIDBgzQG2+8oeTkZBUVFemYY46RYRi69tpr1a5dO82dO1fjxo1TRUUFSxiAn8sE0Cr16NHDlBT8M3r0aNPn84Vkampqmnzd1VdfbaakpJh1dXXBbUOHDjWHDh0akvvTn/5kSjKLi4uD2ySZd911V/D1LbfcYubm5pr9+/cP+foXXnjBlGQ++uijTY4fCARM0zTNTZs2mZLMGTNmBN+74IILzF69epmdOnUyx4wZE9w+Y8YMU5J58cUXm7179w5ur66uNjMyMsxLLrnElGR+9tlnpmmaptfrNXNzc81evXqZtbW1wfybb75pSjInTpwY3Hb88ceb6enp5rfffht2zj116dIlZLafGjp0qHn44YeHfW9fwv2spkyZYhqGETJb7969zY4dO5qVlZXBbYsXLzYlmV26dAlu+/DDD01J5syZM0P2OW/evLDb99S3b18zNzfX3LVrV3DbqlWrTJvNZo4ePTrs1+ztswknMzPTHD9+/F4zI0eODPm+Gi1atMiUZB500EEhn93P+dmPGTP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w94ogj9Mgjj0hq+Bf2E088oRNOOEErVqxQfn5+SPabb77Riy++qFdeeWWv6yQjNX/+fL377rtaunTpPrNXXHGFRo8ereuuu04ffPCBnn/+eX344YdRz2CVwsLC4DrdXbt26YknntBll12mgw46SMccc0zYr/H7/TrllFNUWlqqP/7xj+rZs6dSU1O1detWXX755ft1f95AIKDc3FzNnDkz7Pvt2rX72fu02gUXXKAhQ4Zozpw5mj9/vh5++GE9+OCD+uc//6lTTz01on389Gzr/nC5XDrttNP0xhtvaN68eSH/4dT4uV966aUaM2ZM2K8/4ogjojo+0NpQXAFIUvDqc7vdLqnhqutdu3bpn//8p44//vhgbtOmTWG/Pjs7W8OGDQu+PuGEE1RQUKAZM2botttuC8nedttt6tu3ry688MKw++rWrZuWLVsmn8+3z2JrmqZuvfVWnX322c0Wu5869dRT5Xa7ddFFF+m4445Tt27dmhTXLl26SJLWrVunk04
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAIeCAYAAAC1G7mwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABIsElEQVR4nO3deVxUZf//8fcIggsCoiDukiu4leidaOaGomFqapsWmpppmFtleude3i5lLqlZ1le8y3Ipcy2X3FPcc1+ywnAJ1BQRF1Tm/P7wx9yOoDI0A9Z5PR+PeTyc61xzzuecmYG3h+tcx2IYhiEAAADAJPLkdgEAAABATiIAAwAAwFQIwAAAADAVAjAAAABMhQAMAAAAUyEAAwAAwFQIwAAAADAVAjAAAABMhQAMAAAAUyEAAwDuKyUlRZMmTbI9T0pK0rRp03KvoL/o+PHjslgsev/993O7lH8Mi8WiESNG5HYZQJYQgAEXiYmJk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zySoZxrGFhYbJYLBo8eLDeffdd23rvHNd77Ngx7du3zzb+8E5nzpyRdGvIR4kSJeTn55fl+u6nbdu2tn/nyZNHQ4YMsYWPs2fP6sqVK5kev+DgYFmtVp04cUJVq1a95zYiIiK0bds2SVKLFi0y/dPrneMeM5M+/nn69OmKi4uzC5+3hzVnH/d0w4cPz/Q/H3cOK0mXlpamf//73+rUqZPtz+h3ExcXp48//lgfffSRwxc9nTt3ThU
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAIeCAYAAAC1G7mwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMg0lEQVR4nO3deVxUZf//8feIAioOiLK5o7jhlluKmiuKhrl3Z1maaaZpbplLuZthtpiWW5t0d+ttWZYl5ZKmlaK57/q1wnADNQPEFAXO749+zO0IKoMzYp7X8/GYR8x1rjnnc86M+u7iOtdYDMMwBAAAAJhEgfwuAAAAALiTCMAAAAAwFQIwAAAATIUADAAAAFMhAAMAAMBUCMAAAAAwFQIwAAAATIUADAAAAFMhAAMAAMBUCMAAgGxSU1P11ltv2Z4nJSVp7ty5+VfQbTp27JgsFotef/31/C7F5SZPniyLxWLXVqFCBT355JP5UxBwFyIAA04SHR0ti8Wi7du3Z9v23nvvyWKxqEuXLsrIyMiH6gDHFC5cWOPHj9fixYt1/PhxTZ48WV9//XV+l3XPOXjwoCZPnqxjx47ldymAqRTM7wKAe90XX3yhQYMG6YEHHtDSpUvl5uaW3yUBt+Tm5qYpU6aod+/eyszMlNVqVUxMTH6Xdc85ePCgpkyZopYtW6pChQouO86RI0dUoABjXkAWAjDgQhs2bNCjjz6q0NBQff311/L09MzvkoBce/755/XII4/o+PHjql69unx8fPK7pHvG5cuX5e7ufseO5+HhcceOBfwT8L+DgIvs3r1bnTt3VlBQkFavXi1vb+9sfZYtW6b69eurcOHCKlmypB5//HGdPHkyx/1ZLJYcH9f+6tRisWjy5Ml2r3vttddksVjUsmVLW1tOcwSlnOcJJiUlafjw4Spbtqw8PDwUEhKiV199VZmZmXb9MjMzNXv2bNWqVUuenp7y8/NT+/btbVNCblR/1iOrvg0bNti1e3h4qEqVKoqKipJhGHbH3LVrlzp06CCr1SovLy+1adNGW7ZsyfH6XevIkSNq3bq1AgMD5eHhobJly2rgwIE6f/68rU9WHZ999lm213t5edldp/Pnz2vUqFGqVauWvLy8ZLVa1aFDB+3Zs8fudc6+7jeb11qzZk279zzrfDZs2GDXLzIyMtvn5to6y5Qpo7CwMBUsWFCBgYE57uNGWrZsmeN7ff1nVPrfFKIbfS6y7Nq1S+3bt5efn59dv44dO+aqJkl69913ValSJXl4eKhhw4batm1btj6HDx9Wjx495OvrK09PTzVo0EBfffWVXZ/cvu9Z137p0qUaP368SpcurSJFimjOnDl6+OGHJUmtWrWynUtur68k/fTTT2rYsKE8PT1VqVIlLVy4MMd+13/Grl69qilTpqhy5cry9PRUiRIl1KxZM61du9Zl10GS3n77bdWoUUNFihRR8eLF1aBBAy1ZssSuz8mTJ/XUU08pICBAHh4eqlGjhj788MNcXxMgNxgBBlzg119/Vfv27eXh4aHVq1crKCgoW5/o6Gj17dtXDRs2VFRUlBITEzV79mxt2rRJu3btynG0rWvXrurWrZsk6ccff9S777570zqSkpIUFRWV5/P466+/1KJFC508eVLPPPOMypUrp82bN2vcuHE6ffq03U1S/fr1U3R0tDp06KD+/fsrPT1dP/74o7Zs2aIGDRro448/tvXNqn3WrFkqWbKkJCkgIMDu2C+++KKqV6+uS5cu6ZNPPtGLL74of39/9evXT5J04MABPfDAA7JarRo9erQKFSqkhQsXqmXLltq4caMaNWp0w/O6ePGiypQpo4ceekhWq1X79+/X3LlzdfLkyTzNc/3tt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:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAIrCAYAAADhrC+uAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABUpElEQVR4nO3deVxU9f7H8feAMqIC5sJiIpK4oai5XMV9IdE0Na3rVlhZLmmmtqhlrhmmWWqZtl1t0ZvLVSu5LqS5ZKjlvl8zFFMRywBxQYHz+6MH83MClbEZhzqv5+NxHg/mez5z5nOGEd8cvvMdi2EYhgAAAACT8HB3AwAAAMCdRAAGAACAqRCAAQAAYCoEYAAAAJgKARgAAACmQgAGAACAqRCAAQAAYCoEYAAAAJgKARgAAACmQgAGANxURkaGZsyYYbudmpqq2bNnu68hFErjx4+XxWJx6jFbtWqlVq1aOfWYgEQABlxi/vz5slgs+uGHH/Ls++CDD2SxWNS1a1dlZ2e7oTvAMd7e3hozZowWLFigkydPavz48frqq6/c3RYA3LYi7m4AMJPly5dr0KBBat68uT7//HN5enq6uyXgljw9PTVhwgTFxMQoJydHvr6+iouLc3dbKGTGjBmjUaNGubsNoEC4AgzcIRs2bFCvXr0UHh6ur776SsWKFXN3S0CBPffcczpx4oS+++47nThxQs2aNXN3S38bly5dcncLt5SVlaWrV6/mu+/ixYuSpCJFivBzDX8ZBGDgDti9e7e6dOmioKAgrVmzRn5+fnlqlixZovr168vb21tly5bVI488olOnTuV7PIvFku92/Phxu5rx48fb3W/atGmyWCx2c+puNG+vUqVKeuyxx+zGUlNTNWzYMAUHB8tqtSosLEyvv/66cnJy7OpycnI0c+ZMRUREqFixYipXrpzat29vmxJyo/5zt9z+NmzYYDdutVpVtWpVxcbGyjAMu8fctWuXOnToIF9fX5UsWVJt27bV1q1b833+rnfkyBG1adNGgYGBslqtCg4O1sCBA3X+/HlbTW4fS5cuzXP/kiVL2j1P58+f1/PPP6+IiAiVLFlSvr6+6tChg/bs2WN3P2c/78ePH5fFYtEbb7yR55i1atWy+57nns+GDRvs6jp27JjndXN9nxUqVFBkZKSKFCmiwMDAfI9xI61atcr3e/3H16j0/1OIbvS6yLVr1y61b99e5cqVs6vr1KnTLfvJycnRjBkzVLNmTRUrVkwBAQEaMGCAfvvtN1tNp06ddM899+R7/8jISDVo0MBu7LPPPrP9Gy5durR69uypkydP5nkeatWqpR07dqhFixYqXry4XnrppVv2K/3/9+J///ufHnnkEfn5+alcuXJ65ZVXZBiGTp48qS5dusjX11eBgYGaPn263f2vXr2qsWPHqn79+vLz81OJEiXUvHlzffPNN3Z117+WZsyYocqVK8tqtergwYO2Hg4ePKjevXvrrrvusv0ydKPXdEGeF0l6//33VblyZXl7e+sf//iHNm/eXKDnBbgdTIEAXOzYsWNq3769rFar1qxZo6CgoDw18+fP1+OPP66GDRsqNjZWZ8+e1cyZM7Vlyxbt2rVLpUqVynOfBx98UN26dZMkbd68We+///5N+0hNTVVsbOxtn8elS5fUsmVLnTp1SgMGDFDFihX13XffafTo0Tpz5ozdm6T69eun+fPnq0OHDnryySeVlZWlzZs3a+vWrWrQoIE+/fRTW21u72+99ZbKli0rSQoICLB77Jdeekk1atTQ5cuXtWjRIr300kvy9/dXv379JEkHDhxQ8+bN5evrqxdffFFFixbVe++9p1atWmnjxo1q1KjRDc/r4sWLqlChgh544AH5+vpq//79mj17tk6dOnVb81x/+uknrVixQg8//LBCQ0N19uxZvffee2rZsqUOHjyo8uXLO3Q8R573P2PTpk3673//W6Da6dOn6+zZsw4/RoUKFWyvwYyMDA0aNOim9de/JiZPnmy3Ly0tTR06dJBhGBoxYoSCg4MlScOHDy9QLwMGDLD9uxs6dKgSExP1zjvvaNeuXdqyZYuKFi2qHj16KCYmRt9//70aNmxou++JEye0detWTZs2zTY2efJkvfLKK/rnP/+pJ598UufOndPbb7+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VHKzs7Wpk2bJEn/+c9/ZLFYNG7cuDzHuN0lktLS0vTLL78oKSlJU6dOVU5Ojtq0aSNJys7O1tq1a9W1a1e7P1cHBQWpd+/e+vbbb5Wenl6gxzh79qzWrVunuLg421Wz6124cMHu3H/55Zc8NVarVR4eHrbefv31V5UsWVLVqlXTzp07bXXOft5zXbp0KU+Pt1ptZNmyZfr+++81ZcqUm9ZJ0qRJk+Tn56ehQ4fesvZ6V65cKfD80IK8xi9cuCBJKlOmjEN9SL8/p35+frrvvvvsnqf69eurZMmStikBudNXFi9ebHeVc9GiRWrcuLEqVqwo6ffnLycnR//85z/tjhcYGKgqVarkmWJgtVr1+OOPO9x3rieffNL2taenpxo0aCDDMGx/EZGkUqVKqVq1avrpp5/sar28vCT9PgXk/PnzysrKUoMGDexem7m6d++ucuXK5dvDwIEDb9lnQZ+X3J+BAwcOtPUn/f7zM7/pYoAzMAUCcKHz58/r888/14MPPqiDBw/q2WefVbt27ex+qJ84cUKSVK1atTz3r169ur799lu7sdTUVEnKE2RvZty4cSpfvrwGDBiQZx5rZGSkLBaLRo8erVdffdV23D/O6z169Kj27t17w/8QU1JSJP0+5aN8+fJ2fy79s7p27Wr72sPDQ2PGjFH37t0lSefOndOlS5fyff5q1KihnJwcnTx5UjVr1rzpY0RHR2vbtm2SpPbt22vRokV5ap544olb9po7//ndd99VYmKiXfi8Pqw5+3nPNW7cuHx/+bjRn9mzs7P10ksvqU+fPqpdu/ZNzy0
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAJ4CAYAAABrtlX3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABrpklEQVR4nO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eeuklBQYGqnjx4rfMc/LkSYWGhqpy5cpKSEi4bfabz//kk09Kkpo0aWJ932vXrlXXrl1VuHBh3bhxI9PjWrRoofLly1vvWywW9e3bV3PmzFH58uWVL18+1axZU+vXr8/02DNnzqh79+4qUqSIPD09ValSJX3++ef/mhXIKUyBAHKZ48ePq2XLlvL09NTKlStVtGjRTGNmzZql5557TrVr19bYsWOVkJCgKVOmaNOmTdq1a5f8/PwyPebxxx+3/iW+YcMGffzxx7fNkZiYqLFjx97x+7h69aoaNWqkM2fO6MUXX1TJkiW1efNmDR06VOfOnbM5SapHjx6aNWuWWrVqpeeff15paWnasGGDtmzZolq1aumrr76yjr2ZfdKkSSpcuLAkqUiRIjav/b///U8VK1bUtWvXtGDBAv3vf/9TYGCgevToIUnav3+/GjRoIB8fH7322mvKmzevPvroIzVu3Fjr1q3TQw89dMv3deXKFRUvXlyPPvqofHx8tG/fPk2fPl1nzpy5o3muv/32m7777js9+eSTCgkJUUJCgj766CM1atRIBw4cULFixex6Pns+9/9i/fr1+uGHH7I19t13381WUfun4sWLW7+DycnJ6t27923H//07MWbMGJt9ly5dUqtWrWQYhqKiolSiRAlJ0oABA/41R4MGDTRv3jzr/YsXL2r//v1yc3PThg0bVLVqVUl/fTcDAgJUsWJFSfZ/z1566SUFBARo2LBhtzwCfPz4cTVt2lT+/v5avXq19f3eTsOGDdWvXz9NnTrV+t+GJFWsWFHPPvusvvzyS61cudLmHwLx8fH66aefNHz4cJvnWrdunRYsWKB+/frJ09NTH3zwgVq2bKlffvlFlStXliQlJCSoTp061sIcEBCgH3/8UT169FBSUpL69+//r5kBpzMAuNzMmTMNScayZcuMMmXKGJKMFi1aZDk2NTXVCAwMNCpXrmxcu3bNun3ZsmWGJGPYsGE242/cuGFIMkaOHJnp9WJjY63bJBnDhw+33n/ttdeMwMBAo2bNmkajRo2s20eOHGlIMjIyMmxeJzg42Ojatav1/ujRo40CBQoYR44csRk3ZMgQw93d3YiLizMMwzB++uknQ5LRr1+/TO/1n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ILVatWTa+88oouXbpkM+bkyZOSZDM376YKFSpY99+UmJgoSZmK7O0MHz5cxYoV04svvphpX3h4uCwWi4YOHaoTJ05Y/3L757zeo0ePasWKFQoICLC5NW/eXJJ0/vx5SX/9SrdYsWLy9/fPdr5/07ZtWwUEBCg4OFgjRozQG2+8ofbt20uSLly4oKtXr2b5+VWsWFEZGRk6derUv75GRESEgoKC1Lx5c1WsWFELFizINKZ79+6Z3v8/f7WdkZGhSZMmqWzZsvL09FThwoUVEBCgvXv32vzsHf253zR8+PBMYw8dOnTL952enq7//e9/6ty5s/VX/7cSGxurjz76SCNHjrT7JM7ff/89y7nvWcnOd7xWrVrKmzevRowYoV27dt3y88tKkSJFVLZsWWvZ3bBhgxo0aKCGDRvq7Nmz+u2337Rp0yZlZGRYC/CdfM/+WTb/7tFHH1XBggW1cuVK+fj4/Gtme3Tp0kXXrl3T4sWLJf01z33Hjh169tlnM40tW7Zspm3lypXT1atXdeHCBV24cEGJiYn
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAI/CAYAAAB5628jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABUZ0lEQVR4nO3deVhUdf//8dcAgqgsoiKYiIgb7ommZO57LrnUfWuWuHSrJVlauZS7pWaZS5rWXbe2WJpmWlpuuOb2M9dcMjXMFTcExAUFzu+PLubbBCqDMw52no/rmutiPuc9Z95nHOHF4XM+YzEMwxAAAABgEm6ubgAAAAC4nwjAAAAAMBUCMAAAAEyFAAwAAABTIQADAADAVAjAAAAAMBUCMAAAAEyFAAwAAABTIQADAADAVAjAAGBSKSkpmjp1qvV+YmKiZs6c6bqGHlDHjx+XxWLR3Llz71rbo0cPlS5d2uk9AbgzAjBgh7lz58pisejnn3/Osu2///2vLBaLOnTooPT0dBd0B9jH29tbw4cP17x583Ty5EmNHj1a33//vavbuicWi8Xm5uvrq4YNG2r58uWubu0f64cfftDo0aNd3QZgFw9XNwD8E3z77bd6/vnnVb9+fc2fP1/u7u6ubgm4K3d3d40ZM0bdu3dXRkaGfH19/xFBsXnz5urevbsMw9Aff/yhWbNmqV27dvrxxx/VsmVLhz9faGiorl+/rnz58jl83w+CH374QTNnziQE44FCAAbu0fr169W1a1dVqlRJ33//vfLnz+/qloAce+WVV/Tvf/9bJ0+eVEREhPz9/V3d0j0rX768nnnmGev9zp07q1KlSpo2bZpTArDFYuH/PfCAYQoEcA/27NmjJ554QsHBwVq5cqX8/Pyy1CxcuFCRkZHy9vZW0aJF9cwzz+j06dPZ7u/vf77NvB0/ftym5u9nWt555x1ZLBY1atTIOjZ69GhZLJYsz1G6dGn16NHDZiwxMVEvv/yyQkJC5OXlpbJly+rtt99WRkaGTV1GRoamTZumqlWrKn/+/CpWrJhatWplnRJyu/4zb5n9rV+/3mbcy8tL5cuX14QJE2QYhs1z7t69W61bt5avr68KFSqkpk2batu2bdm+fn91+PBhNWnSREFBQfLy8lJISIj69eunhIQEa01mH4sWLcry+EKFCtm8TgkJCXr11VdVtWpVFSpUSL6+vmrdurX27t1r8zhHv+6Z80vffffdLPusUqWKzb955vGsX7/epq5NmzZZ3jd/7bNkyZKKioqSh4eHgoKCst3H7TRq1Cjbf+vszgZmTiG63fsi0+7du9WqVSsVK1bMpq5t27Y56unvIiIiVLRoUR07dsxmPDU1VaNGjVLZsmWt75HBgwcrNTXVpm716tV67LHH5O/vr0KFCqlChQp6/fXXrdtvNwd4yZIlqlKlivLnz68qVaro22+/zba/jIwMTZ06VZUrV1b+/PlVvHhx9e3bV5cvX7apK126tNq2bauffvpJjzzyiPLnz68yZcros88+y7LPxMREDRw4UKVLl5aXl5dKliyp7t276+LFi3Yf/5306NHDOm/8r/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mAIDA1WrVi3FxsZq8ODBGjRokLVm4cKFioiIUMWKFW1e08z337p16yTJ+leapUuXZpkSdDtnz57Vnj17FB0dbTMtqnnz5qpUqZJN7cKFC+Xn56fmzZvb9BEZGalChQpZ+8hUqVIl1a9f33q/WLFiqlChgn7//Xfr2DfffKPq1aurY8eOWXrL/L+a0+O/F+XLl1edOnU0b94861hCQoJ+/PFHdevWLcv3je7du8vHx8d6/8knn1RwcLD1Lxh79uzRkSNH9PTTT+vSpUvWnq9
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArcAAAIjCAYAAAAZajMiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB5kElEQVR4nO3dd3hUVf4G8Pfe6cmk94RAIKFJEQREBKVKKAoCiiBr/4m7drEsrIKCBcGGKMLqKupaFl1X3EWqCKKIKEiRIpAYiASSEELKJNPv+f0xZGRImSFM5sb4fp6HB+bOd+79zpDoy8m550hCCAEiIiIiohZAVrsBIiIiIqJgYbglIiIiohaD4ZaIiIiIWgyGWyIiIiJqMRhuiYiIiKjFYLglIiIiohaD4ZaIiIiIWgyGWyIiIiJqMRhuiYiIiKjFYLglIvod27hxIyRJwsaNG9VuJaSeeOIJSJKkdhsAmlcvahs0aBC6du2qdhv0B8dwSxSAJUuWIDs7G0lJSdDpdEhOTsbAgQPx7rvvQlEUtdsjIgrYa6+9hrffflvtNoiajFbtBoh+D9555x2kpKRg5syZiIyMRFlZGb777jvcfPPNWLVqFT788EO1WyQiCshrr72G+Ph43HzzzWq3QtQkGG6JArBp0ybodDqfY/feey/i4uLw6quvYu7cucjIyFCnOSKiJlJVVYXw8HC12yA6J5yWQB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/9NMaPH4+srCzveR944AF07twZU6dO9R7r3LlzvT0H6uOPP0Z1dTX+8pe/IC4uDt9//z1eeeUVHD16FB9//DEAYOLEiXjkkUfw0Ucf4eGHH/Z5/UcffYThw4cjJiYGALB48WLcfffduOyyy/DAAw/g8OHDuPrqqxETE+MTEgIxY8YMzJ8/H1dddRWys7Oxa9cuZGdn1/rMz0cgXzNCCIwZMwYbNmzAbbfdhh49emDNmjV4+OGHUVBQgJdeegkAsHfvXlx55ZXo3r075syZA4PBgJycHGzevNl7PUVRMGbMGHzzzTeYOnUqOnfujJ9++gkvvfQSDh48iOXLl5/X+3n66acxc+ZMTJw4Ef/3f/+HEydO4JVXXsHll1/u/fq77rrrsGjRInz++ee49tprva+trq7G//73P9x8883QaDQAgH/+85+46aabkJ2djXnz5qG6uhqLFy/GgAEDsGPHjnP+aU0g3x933HEHhg0b5n3NDTfcgHHjxmH8+PHeYwkJCfVeY8KECdi7dy/uueceZGRkoLi4GOvWrUN+fj4yMjKwYMEC3HPPPTCbzd5/TCYlJfmc484770RCQgJmzZqFqqoqAJ5/cM6ePRvDhg3DX/7yFxw4cACLFy/GDz/8gM2bN9c7ALBixQpcc801uO666/DWW29Bo9Fg79696N+/P9LS0jB9+nSEh4fjo48+wtVXX41PPvkE48aNO6fPlagWQUQB69ixowDg/XXjjTcKp9PpU1NdXV3rdXfccYcICwsTNpvNe2zgwIFi4MCBPnV/+9vfBABRXFzsPQZAPP74497HjzzyiEhMTBS9evXyef1bb70lAIgXX3yx1vUVRRFCCJGXlycAiKVLl3qfmzhxoujatatIT08XN910k/f40qVLBQAxefJk0a1bN+/xqqoqERkZKa6//noBQPzwww9CCCEcDodITEwUXbt2FVar1Vu/YsUKAUDMmjXLe+zyyy8XERER4siRI3X2ebY2bdr49HamgQMHii5dutT5nD91/V3NnTtXSJLk01u/fv1Er169fOq+//57AUC8++67Qggh7Ha7iIuLE3369PH5mnj77bcFgFp/1w0pLCwUWq1WXH311T7Hn3jiCQHA57PYsGGDACA2bNjgPVbf53X211wgXzPLly8XAMRTTz3l8/w111wjJEkSOTk5QgghXnrpJQFAnDhxot739c9//lPIsiy+/vprn+NLliwRAMTmzZvrfe3ZHn/8cXHm/8IOHz4sNBqNePrpp33qfvrpJ6HVar3HFUURaWlpYsKECT51H330kQAgNm3aJIQQorKyUkRHR4vbb7/dp66wsFBERUX5HD+7l7qcy/fHmc7+/m/IqVOnBADx3HPPNVjXpUuXOr8ea77nBwwYIFwul/d4cXGx0Ov1Yvjw4cLtdnuPv/rqqwKAeOutt7zHzvx+/OSTT4ROpxO33367z+uGDh0qunXr5vPfQ0VRxKWXXirat28f0HslaginJRCdg6VLl2LdunV4//33cdttt+H999/3GU0EAJPJ5P1zZWUlSkpKcNlll6G6uho///yzT63T6URJSQlOnDiBLVu24NNPP0X37t0RHx9f5/ULCgrwyiuvYObMmTCbzT7PffLJJ4iPj8c999xT63X1LVO0fft2fPzxx5g7d67P1Ioz3XDDDfj555+90w8++eQTREVFYejQoT5127ZtQ3FxMe68804YjUbv8dGjR6NTp074/PPPAQAnTpzApk2bcOutt/qMeDfUpz9utxslJSUoKSmBw+EI+HVn/l1VVVWhpKQEl156KYQQ2LFjh/e56667Dtu3b/f5Uf2yZctgMBgwduxYAJ73f/LkSdx+++3Qan/7odiUKVO8I7uBWr9+PVwuF+68806f43X93Z6PQL5mVq5cCY1Gg3vvvdfn+QcffBBCCKxatQoAvKPyn332Wb0riHz88cfo3LkzOnXq5P37KikpwZAhQwAAGzZsaPR7+c9//gNFUTBx4kSfcycnJ6N9+/bec0uShGuvvRYrV66ExWLxvn7ZsmVIS0vDgAEDAHimWJSVlWHy5Mk+59NoNOjbt+859xro98f5MJlM0Ov12Lhxo89UmXN1++23e0evAeCLL76Aw+HA/fff7/Pfidtvvx2RkZF19v7hhx/iuuuuwx133IG///3v3teVlpbiyy+/xMSJE73/fSwpKcHJkyeRnZ2NQ4cO1TmNiehcMNwSnYN+/fph2LBhuP766/GPf/wDc+bMwdKlS31+9Lp
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABmPUlEQVR4nO3deXhU9d3//9c5syeTPSQhEHYRFdGKiriiItStWmmtS6ui33q3N9oqd1u1VgWXG1vbauu+FXvfyq21LfprqywqS7VoFYuICxUEQQiEANkns53z+2OSkSEJjMwkh5Dn47pyhfmcd855Z/C6fPGZz/kcw7ZtWwAAAMB+znS6AQAAACAdBFcAAAD0CgRXAAAA9AoEVwAAAPQKBFcAAAD0CgRXAAAA9AoEVwAAAPQKBFcAAAD0CgRXAAAA9AoEVwA4AEyYMEGjR4/ukWsNGTJEV1xxRY9ca3+2fv16GYahX/7yl063AvQZBFegj3nkkUc0efJklZeXy+PxqKKiQqeccor+53/+R5ZlOd0ekFWbN2/WjBkztGLFCqdbAZAFbqcbANCzfv/736t///665ZZblJ+fr7q6Or355pu64oor9PLLL+v//u//nG4R+7nVq1fLNHvHvMfmzZs1c+ZMDRkyREceeaTT7QDIEMEV6GOWLl0qj8eTMvaDH/xAJSUleuCBBzRr1iwNGTLEmebQK/h8Pqdb6DYtLS3Kyclxug0AXegd/2QGkDW7h9Z27WF115m0F198UWeffbYqKyvl8/k0fPhw3XHHHYrH4yk/O2HCBBmGkfwqLS3V2WefrVWrVqXUGYahGTNmpIzdc889MgxDEyZMSBlvbW3VjBkzNHLkSPn9fvXv318XXHCB1q5dK+mL9YVPPfVUys9NmzZNhmGkrMF86qmnZBiGvF6vtm3bllK/bNmyZN/vvPNOyrHnn39eY8eOVSAQUGlpqb797W9r06ZNHd67jz/+WBdeeKH69eunQCCggw8+WDfffLMkacaMGSnvTWdfixcvTr6Pma5TXb58uY4//ngFAgENHTpUjzzySMrxxYsXyzAM/eEPf9DMmTM1YMAA5eXl6Rvf+Ibq6+sVDod13XXXqaysTMFgUFOnTlU4HE45R7prXJubm/Vf//Vfqqqqks/n08EHH6xf/vKXsm07WbO392b3/y52t3DhQp144okqLCxUMBjUwQcfrJ/+9KfJ3/WYY46RJE2dOjV5zvb/Ztrf7+XLl+vkk09WTk5O8mdramp01VVXqby8XH6/X0cccYR+//vf7/V3tm1bV199tbxer/785z8nx59++unkf0vFxcW66KKLtHHjxr2eD0AqZlyBPqqurk6xWEyNjY1avny5fvnLX+qiiy7SoEGDkjVPPfWUgsGgpk+frmAwqNdee0233nqrGhoadM8996Scb9SoUbr55ptl27bWrl2rX//61zrrrLO0YcOGPfYwa9asDuPxeFznnHOOXn31VV100UX64Q9/qMbGRi1cuFCrVq3S8OHDOz3fmjVr9Pjjj3d5PZfLpaefflrXX399cmz27Nny+/1qbW1NqX3qqac0depUHXPMMZo1a5a2bt2q3/zmN3rjjTf0r3/9S4WFhZKklStX6qSTTpLH49HVV1+tIUOGaO3atfrLX/6iu+66SxdccIFGjBiRPO/111+vQw45RFdffXVy7JBDDumy5y9j586dOuuss3ThhRfq4osv1h/+8Ad9//vfl9fr1ZVXXplSO2vWLAUCAd14441as2aN7r//fnk8HpmmqZ07d2rGjBl688039dRTT2no0KG69dZbv1Qvtm3ra1/7mhYtWqSrrrpKRx55pObPn68f//jH2rRpk+69915J0v/+7/8mf+bvf/+7HnvsMd17770qLS2VJJWXl3d5jQ8++EDnnHOOxowZo9tvv10+n09r1qzRG2+8ISnxvt5+++269dZbdfXVV+ukk06SJB1//PHJc2zfvl1nnnmmLrroIn37299WeXm5QqGQJkyYoDVr1uiaa67R0KFD9fzzz+uKK65QXV2dfvjDH3baTzwe15VXXqnnnntOc+fO1dlnny1Juuuuu3TLLbfowgsv1P/7f/9P27Zt0/3336+TTz455b8lAGmwAfRJBx98sC0p+XXZ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voqwiuQB81fvx4TZw4UZdccomeeOIJ3X777Zo9e3byY1Yp8VHs17/+dRUUFCg/P1/9+vXTt7/9bUlSfX19yvn+8Y9/qF+/fiorK9Pxxx+vWCym559/vssAd9ttt6mysjIlaLVbu3atDj74YLnd6a9muvHGG3XSSSfpnHPO6bKmX79+Ovvss/W73/1OkvS73/1Ol19+eYeg+9lnn0mSDj744A7nGDVqVPL4p59+KklZ3T/1448/Vr9+/VLWy86ZMyetn62srFRubm7K2MiRIyUl1gTvavegXVBQIEmqqqrqMG5ZVoe/77357LPPVFlZqby8vJTx9mUR7e9hJr71rW/phBNO0P/7f/9P5eXluuiii/SHP/zhS4XYAQMGyOv1duj9oIMO6vDfRVe9z5o1Sy+88IL++Mc/dliT+8knn8i2bR100EHJv9f2r48++kg1NTVf4jcGwBpXAJKkb3zjG7r55pv11ltv6YQTTlBdXZ1OOeUU5efn6/bbb9fw4cPl9/v17rvv6oYbbugQDsaMGaNf/epXkhIzkb/97W81YcIEvfvuu6qoqEip/eijj/TUU0/p6aef7vJmsS9jwYIFeuWVV7Rs2bK91l555ZW67LLLdO2112rp0qV64okn9Pe//z3jHrJlyJAhyXW627dv129/+1t95zvf0bBhw3Tcccdl7Toul+tLjdu73FC1vwgEAlq6dKkWLVqkv/3tb5o3b56ee+45nXbaaVqwYEGXv8vu58jU5MmTNW/ePP3iF7/QhAkTUmbpLcuSYRh6+eWXO+1n908bAOwZwRWAJCkUCkn6IrgsXrxY27d
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsAAAAKLCAYAAAD4sD5AAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABvjklEQVR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enoqJCREkydPTpXh999/V69evZQ/f355e3urS5cuun37tq5evar27dsrd+7cyp07t957771U78mEhAS988475p9byZIl9cknn6Sal5YRI0bIyclJU6ZMkZT2GuDXXntNOXPm1NmzZ9W0aVPlzJlT+fPn17vvvptqedXly5f16quvytPTU97e3urQoYN2796doXXFU6ZMUXBwsDw8PJQ7d25VrlxZ8+bNk/TP+6Vfv36SpCJFiqT63TRr1izVqVNHPj4+cnNzU5kyZTR16lSLxy9cuLD279+v9evXp/rZ3+vvzd2f179/B27fvl0RERHKly+fsmfPriJFiuiNN96w6rUC7AEGMuj48eOqX7++3NzctHLlSvn7+6eaM3v2bL3++uuqUqWKRo0apQsXLmjy5MnauHGjdu7cmebetmbNmql58+aSpN9++03Tpk27b46rV69q1KhRGX4dN27cUM2aNXX27Fl16dJFhQoV0qZNmzRgwACdP3/e4iCpjh07avbs2WrQoIE6deqkpKQk/fbbb9qyZYsqV66sb775xjz3bvaJEycqX758kiRfX1+L5/7ggw9UunRp3bx5UwsWLNAHH3wgHx8fdezYUZK0f/9+Va9eXZ6ennrvvffk4uKir776SrVq1dL69etVtWrVe76uhIQEFSxYUI0bN5anp6f27dunzz//XGfPns3QOtcTJ05oyZIlevnll1WkSBFduHBBX331lWrWrKkDBw6oQIECVj2eNd/3h7FhwwYtX748XXPHjx+vCxcuWP0cBQsWNL8H4+Pj1a1bt/vO//d74uOPP7bYdu3aNTVo0ECGYahv374KCAiQJPXp0+eBOVavXq3WrVurbt26GjNmjCTp4MGD2rhxo3r37m0xt2fPnvLz89PQoUO1ZcsWTZs2Td7e3tq0aZMKFSqkkSNHavny5Ro3bpzKli2r9u3bS5IMw1CTJk0UFRWljh07qkKFClq5cqX69euns2fPauLEiffMN3DgQI0cOVJfffWV3nzzzfu+luTkZEVERKhq1ar65JNPFBkZqfHjxysoKMj8/U1JSVHjxo31xx9/qFu3bipVqpSWLl2qDh06PPB79V/Tp09Xr1699NJLL6l37966deuW9uzZo61bt6pNmzZq3ry5jhw5ou+++87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xUtWtT8Nf7+/mrTpo1+//13xcXFpes5Lly4oDVr1mjZsmWqUaNGqjnXr1+3eO2XLl1KNcfNzU1OTk7mbJcvX1bOnDlVsmRJRUdHm+fZ+vt+140bN1JlfNDZRhYvXqxt27Zp9OjR950nScOHD5eXl5d69er1wLn/duvWrXSvYU3Pe/z69euSpLx581qVQ5K8vb2VkJCg1atXP3Bux44dLd63VatWlWEY5k8fpH8OEqxcubJOnDhhHlu+fLmcnZ1TfZ/eeecdGYahX3/91WLcMAz16NFDkydP1rfffmvV3tmuXbta3K9evbpFlhUrVsjFxcVib7KTk5N5j6s1vL299eeff2rbtm1Wf630zxlF7rr797pmzZo6ceKErl27lqHHTMvdT81++eUX3blzx2aPC8fDEgggA65cuaL58+erWbNmOnDggHr37q3w8HCLNcCnT5+WJJUsWTLV15cqVUq///67xdjdUwv9t8jez+DBg1WgQAF16dIl1TrWsLAwmUwmDRgwQCNGjDA
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"# Список колонок для построения графиков\n",
"columns = ['gender', 'age', 'hypertension', 'heart_disease', 'ever_married',\n",
" 'work_type', 'Residence_type', 'avg_glucose_level', 'bmi',\n",
" 'smoking_status']\n",
"\n",
"# Создание диаграмм зависимости\n",
"for column in columns:\n",
" plt.figure(figsize=(8, 6)) # Установка размера графика\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" # Проверяем, содержит ли колонка только два уникальных значения (0 и 1)\n",
" if df[column].nunique() == 2 and set(df[column].unique()).issubset({0, 1}):\n",
" # Если да, то строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
" else:\n",
" # Если колонка числовая, создаем диаграмму рассеяния\n",
" plt.scatter(df['stroke'], df[column], alpha=0.5) # Создаем диаграмму рассеяния\n",
" plt.title(f'Зависимость {column} от stroke')\n",
" plt.xlabel('stroke (0 = нет, 1 = да)')\n",
" plt.ylabel(column)\n",
" plt.xticks([0, 1]) # Установка меток по оси X\n",
" plt.grid() # Добавление сетки для удобства восприятия\n",
" else:\n",
" # Если колонка не числовая, строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
"\n",
" plt.show() # Отображение графика"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"# Функция для создания выборок\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"def split_stratified_into_train_val_test(\n",
" df_input,\n",
" stratify_colname=\"y\",\n",
" frac_train=0.6,\n",
" frac_val=0.15,\n",
" frac_test=0.25,\n",
" random_state=None,\n",
"):\n",
"\n",
" if frac_train + frac_val + frac_test != 1.0:\n",
" raise ValueError(\n",
" \"fractions %f, %f, %f do not add up to 1.0\"\n",
" % (frac_train, frac_val, frac_test)\n",
" )\n",
"\n",
" if stratify_colname not in df_input.columns:\n",
" raise ValueError(\"%s is not a column in the dataframe\" % (stratify_colname))\n",
"\n",
" X = df_input # Contains all columns.\n",
" y = df_input[\n",
" [stratify_colname]\n",
" ] # Dataframe of just the column on which to stratify.\n",
"\n",
" # Split original dataframe into train and temp dataframes.\n",
" df_train, df_temp, y_train, y_temp = train_test_split(\n",
" X, y, stratify=y, test_size=(1.0 - frac_train), random_state=random_state\n",
" )\n",
"\n",
" # Split the temp dataframe into val and test dataframes.\n",
" relative_frac_test = frac_test / (frac_val + frac_test)\n",
" df_val, df_test, y_val, y_test = train_test_split(\n",
" df_temp,\n",
" y_temp,\n",
" stratify=y_temp,\n",
" test_size=relative_frac_test,\n",
" random_state=random_state,\n",
" )\n",
"\n",
" assert len(df_input) == len(df_train) + len(df_val) + len(df_test)\n",
"\n",
" return df_train, df_val, df_test"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 16,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"stroke\n",
"0 4861\n",
"1 249\n",
"Name: count, dtype: int64\n",
"\n",
"Обучающая выборка: (3066, 12)\n",
"stroke\n",
"0 2917\n",
"1 149\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAeYAAADECAYAAABKgIJGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3W0lEQVR4nO3dd1gU1/oH8O/2Xar0LqCAKHYssWLBgjUxRo2JGhMVE2OuJfEX47XGXK+X2CL2RI3Rm1iIGo2xl6hRrNhFqgXpIB2W3T2/P7i7Yd2lCsy6+36eh0d39sw578zOzDvtzPAYYwyEEEIIMQh8rgMghBBCyN8oMRNCCCEGhBIzIYQQYkAoMRNCCCEGhBIzIYQQYkAoMRNCCCEGhBIzIYQQYkAoMRNCCCEGhBIzIcRoqVQqZGRkID4+nutQSB1TKBRIS0vDkydPuA6lzlFiJoSgV69eaNmyJddh1ImUlBTMmDEDnp6eEIvFcHBwQIsWLZCbm8t1aK+Fw4cPIyoqSvP5wIEDuHfvHncBlRMTE4PJkyfDxcUFYrEYTk5O6NKlC4ztAZbCmhTevn07Jk6cqPkskUjQuHFj9O/fH/Pnz4eTk1OdB0gIKbN+/XqYmZnhgw8+4DoUgxUbG4vevXujtLQUn332Gdq3bw+hUAiZTAZzc3Ouw3st3LlzB2FhYfj++++RmZmJqVOn4sCBA1yHhcuXLyMkJAS2trb48ssv0aJFC/B4PFhbW4PH43E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0SqzaNEiBoAdOnRIM0z
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Контрольная выборка: (1022, 12)\n",
"stroke\n",
"0 972\n",
"1 50\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfMAAADECAYAAACLB8jqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3FElEQVR4nO3dd1xTVxsH8F8SQhIIyJ4iIKAooiiideJeWGsdaNWqtI46X0e1Wl9nbX2tWrGuauuq0NZB1dZWxb33nogKDvbeEEjO+wdNakhYClxinu/nw0dzc+45z115cs8994bHGGMghBBCiM7icx0AIYQQQt4OJXNCCCFEx1EyJ4QQQnQcJXNCCCFEx1EyJ4QQQnQcJXNCCCFEx1EyJ4QQQnQcJXNCCCFEx1EyJ4QQohdycnLw8uVLpKWlcR1KlaNkTghBp06d0KRJE67DIDrqm2++gUKhAAAoFAosW7aM44j+tWfPHnTt2hUmJiaQSqWoV68evv32W67DqnKVSubbt28Hj8dT/YnFYjRo0ACTJ09GQkJCdcVICAGwYcMGbN++neswCNGwY8cOrFy5Eq9evcKqVauwY8cOrkMCAMyZMweBgYEwMTHBjz/+iKNHj+LYsWOYOHEi16FVOYM3mWnJkiVwdXVFfn4+zp07h40bN+Lvv//GvXv3YGRkVNUxEkJQnMytrKwwevRorkMhRM2SJUswcuRIfPHFFxCJRAgJCeE6JJw+fRrLly/HsmXLMGfOHK7DqXZvlMx79+6Nli1bAgDGjBkDS0tLfPfddzhw4AA++uijKg2QEFJ5OTk5MDY25joMoieGDBmCzp0748mTJ/Dw8IC1tTXXIWHlypVo27atXiRyoIqumXfp0gUAEBUVBQBITU3F559/Dm9vb0ilUpiamqJ37964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gsmTJ6v1FFTFMaXCKmHbtm0MADt27BhLSkpiL1++ZL/99huztLRkEomEvXr1ijHGWH5+PpPL5WrzRkVFMZFIxJYsWaKatnXrVgaAfffddxptKRQK1XwA2IoVKzTKeHl5MX9/f9XrkydPMgDM0dGRZWZmqqbv3r2bAWBr1qxR1e3h4cF69uypaocxxnJzc5mrqyvr3r27Rltt27ZlTZo0Ub1OSkpiANjChQtV06Kjo5lAIGBff/212rx3795lBgYGGtMjIyMZALZjxw7VtIULF7LXN8vZs2cZABYaGqo27+HDhzWmOzs7s4CAAI3YJ02axEpu6pKxz549m9nY2DBfX1+1dbpz507G5/PZ2bNn1eb/4YcfGAB2/vx5jfZe5+/vr6rvr7/+YgYGBmzmzJlay1ZkfTBWvJ1eJ5PJWJMmTViXLl3U6uLz+ezDDz/U2BeV2zw9PZ2ZmJiw1q1bs7y8PK1lZDIZs7GxYU2aNFErc/DgQQaALViwQDVt1KhRzNnZWa2ezZs3MwDsypUrWpeZMcbS0tJK3cdfV3J/V1Iel+3bt2dFRUWq6YmJiczQ0JD16NFDbR2sW7eOAWBbt25VTfP392deXl6MMcbCwsKYUChkY8eOVZuva9euzNvbm+Xn56umKRQK1rZtW+bh4VFm7MrjeNu2bWrTHRwcWJ8+fSo8r0KhYMOHD2dGRkbs8uXLauX279/PALClS5eqTR80aBDj8XjsyZMnqmkA2KRJkzTaCggI0NiGStr2RSXlNvD19WUymUw1/dtvv2UA2IEDBxhjldsmjFXsmCjrM1JbjFevXlWbru2zrH///szQ0JA9ffpUNS02NpaZmJiwjh07atQZFRXFGCv+7K9Xrx7r3bu31u1dWkzK+Rlj7PHjxwwA+/bbb1XTRo0axYyNjcusq+QyAGAA2KlTp1TTcnNzWaNGjZidnZ1qOwUHBzMALCQkRFVOJpOxNm3aMKlUqsolyvX
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Тестовая выборка: (1022, 12)\n",
"stroke\n",
"0 972\n",
"1 50\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAdEAAADECAYAAADArxsHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA200lEQVR4nO3dd1gU1/oH8O82dpfeqwgIIopYgqJiwa6gIUYNMWpi18R2jSa5amIs0WuMxhJbNLFF/RkLscQbG3YJscTeEBAsSG/CUpbdPb8/uLthWUBAlnHh/TwPj+7smXPemZ2dd+fMnBkeY4yBEEIIIdXG5zoAQgghxFBREiWEEEJqiJIoIYQQUkOURAkhhJAaoiRKCCGE1BAlUUIIIaSGKIkSQgghNURJlBBCCKkhIdcBEEIIqd8KCwuRmZkJoVAIe3t7rsOpVXQkSghB9+7d0bJlS67DINW0bt06ZGdna16vXr0aMpmMu4BKiYiIQGhoKCwtLSGVSuHi4oJ//etfXIdV66qVRLdv3w4ej6f5k0gk8Pb2xtSpU5GSkqKvGAkhADZs2IDt27dzHQZ5g/z+++9YsGABnj17ht27d2PevHmQSqVch4UNGzagX79+yMnJwZo1a3Dq1CmcOnUKixYt4jq0Wlej7txFixbBw8MDhYWFuHTpEjZu3Ig//vgDd+/ehbGxcW3HSAhByY7J1tYWo0eP5joU8oaYO3cuQkNDsWbNGvD5fHz//ffg87ntYIyJicHMmTMxceJEbNiwATwej9N49K1GSTQ4OBjt2rUDAIwfPx42NjZYuXIlDh8+jA8++KBWAySEVJ9MJoOJiQnXYRA9CwoKwpMnT/DgwQO4urqiUaNGXIeEH374AY6Ojvjhhx/qfQIFaumcaM+ePQEA8fHxAIDMzEx89tln8PPzg6mpKczNzREcHIxbt27pzFtYWIgFCxbA29sbEokETk5OGDx4MOLi4gAACQkJWl3IZf+6d++uqevcuXPg8XjYu3cv5s6dC0dHR5iYmCA0NBTPnj3Taf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JaWlsaePXvGfv31V2ZjY8OkUil7/vw5Y4yxwsJCplQqteaNj49nYrGYLVq0SDNt69atDABbuXKlTlsqlUozHwC2fPlynTK+vr4sKChI8/rs2bMMAHNxcWEvX77UTN+3bx8DwNasWaOpu2nTpqxfv36adhhjLD8/n3l4eLA+ffrotBUYGMhatmypeZ2WlsYAsPnz52umJSQkMIFAwJYsWaI17507d5hQKNSZHhMTwwCwHTt2aKbNnz+flf5YLl68yACw3bt3a817/Phxnelubm5swIABOrFPmTKFlf2oy8b+xRdfMHt7e+bv76+1Tnfu3Mn4fD67ePGi1vw//vgjA8AiIyN12istKChIU99///tfJhQK2axZs8otW5X1wVjJ51SaXC5nLVu2ZD179tSqi8/ns3fffVdnW1R/5tnZ2czMzIx16NCBFRQUlFtGLpcze3t71rJlS60yR48eZQDY119/rZk2atQo5ubmplXP5s2bGQB25cqVcpeZMcaysrIq3MZLK7u9q6m/l126dGEKhUIzPTU1lRkZGbG+fftqrYN169YxAGzr1q2aaUFBQczX15cxxlh4eDgTiURswoQJWvP16tWL+fn5scLCQs00lUrFAgMDWdOmTSuNXf093rZtm9Z0Z2dnFhISUum8pZW3Pah98803zMTEhD169Ehr+uzZs5lAIGBPnz5ljDF25swZBoBNnz5dp47S+wM19fqNj4/XeW/16tUMANu1a5dmmlwuZ506dWKmpqaa/VBVl3/GjBkMgNb3LTc3l3l4eDB3d3fN56He1509e1ZTrkOHDiw4OFjnu12e8uYvLCxkfD6fTZ48WTNNvb7
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Вывод распределения количества наблюдений по меткам (классам)\n",
"print(df.stroke.value_counts())\n",
"print()\n",
"\n",
"data = df.copy()\n",
"\n",
"df_train, df_val, df_test = split_stratified_into_train_val_test(\n",
" data, stratify_colname=\"stroke\", frac_train=0.60, frac_val=0.20, frac_test=0.20\n",
")\n",
"\n",
"print(\"Обучающая выборка: \", df_train.shape)\n",
"print(df_train.stroke.value_counts())\n",
"counts = df_train['stroke'].value_counts()\n",
"plt.figure(figsize=(2, 2))# Установка размера графика\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)# Построение круговой диаграммы\n",
"plt.title('Распределение классов stroke в обучающей выборке')# Добавление заголовка\n",
"plt.show()# Отображение графика\n",
"\n",
"print(\"Контрольная выборка: \", df_val.shape)\n",
"print(df_val.stroke.value_counts())\n",
"counts = df_val['stroke'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов stroke в контрольной выборке')\n",
"plt.show()\n",
"\n",
"print(\"Тестовая выборка: \", df_test.shape)\n",
"print(df_test.stroke.value_counts())\n",
"counts = df_test['stroke'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов stroke в тестовой выборке')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Сбалансируем распределение:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Балансировка данных оверсемплингом. Это метод, увеличивающий число наблюдений в меньшинственном классе для достижения более равномерного распределения классов."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 17,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-10-11 18:29:39 +04:00
"Обучающая выборка после oversampling: (5811, 18)\n",
2024-10-10 22:31:48 +04:00
"stroke\n",
"0 2917\n",
2024-10-11 18:29:39 +04:00
"1 2894\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n"
]
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAosAAAH4CAYAAAAitKflAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABanElEQVR4nO3dd3iT5eLG8TvppgNaRpkCMmULAsoG2ThQEcGFeAQceBQ9Q+QouI/iTwHBPVBERBzgAmSpgAiogICA7FFmy+oeyfv7o6expQ10pH2S9Pu5rl7QNH1zJ02e3n2e931jsyzLEgAAAFAAu+kAAAAA8F6URQAAALhFWQQAAIBblEUAAAC4RVkEAACAW5RFAAAAuEVZBAAAgFuURQAAALhFWQQAoAScTqfi4+O1Z88e01GAUkFZBOBis9k0duxY0zEASdKqVav0/fffuz7//vvvtXr1anOBcjl69KgefPBB1a1bV8HBwapataqaNWums2fPmo4GeFyRyuLMmTNls9lcH6GhoWrcuLHGjh2rY8eOlVZGoFxYtWqVBgwYoFq1aik0NFQXXXSRrr76an300Ueu66SkpGjSpEl5foEC/urgwYO69957tXnzZm3evFn33nuvDh48aDqWdu3apfbt2+vjjz/WmDFj9PXXX2vJkiVatmyZwsPDTcdDEXz77bey2WyqWbOmnE5ngdepV6+eq/fY7XZVqlRJLVu21OjRo7V27doSbz8jI0NTp07VpZdeqqioKFWqVEnNmzfX6NGjtX37dknSgAEDFB0dXWDXOnPmjGrUqKGOHTvK6XTq+++/d+X99ddf813/jjvuUERExIUemjwCi3Tt/3nyySdVv359paWladWqVXrttdf07bffasuWLapQoUJxNgmUa/PmzdNNN92kNm3a6IEHHlB0dLT27t2rH3/8UW+99ZZuvvlmSdll8YknnpAk9ejRw2BioPRdf/31mjJlilq1aiVJuuKKK3T99dcbTiWNGTNGwcHB+vnnn1WrVi3TcVACs2fPVr169bRv3z4tX75cvXv3LvB6bdq00cMPPyxJSkxM1LZt2zRv3jy99dZbGjdunF566aVib/+GG27QwoULNXz4cI0aNUqZmZnavn27vv76a3Xq1ElNmzbVq6++qhYtWmjcuHF5JhAk6dFHH1V8fLwWLVokuz3vHOCkSZP01VdfFeehycsqgvfee8+SZK1fvz7P5Q899JAlyfroo4+KsjkA/9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bnn38um82mevXq5butc527dFi9enXddNNNOnDggOs6OWPOiy++6HY7kyZNynMffv75Z4WGhmr37t2ux6969eoaM2aMTp48me/7C/tzK8xzNidvznNdyp7lateunerXr68jR464Li/sc7sg5z6Pzv04dzeYwtxHSdq+fbuGDh2qqlWrKiwsTE2aNNGECRPyXS/3z+58t1vccSjHF198odTUVN14440aNmyYPv/8c6WlpRX6+8PCwjRr1izFxMTomWeeyTe+FGb7OV2nc+fO+bYfEBCgypUruz5/6KGH1KpVK917771KS0uTw+HQ3Xffrbp162rixIn5vv/+++9XdHR0gT2lqIq1DH2unDubc6f27Nmj+fPn68Ybb1T9+vV17NgxvfHGG+revbv++OMP1axZU5LkcDh01VVXadmyZRo2bJgeeOABJSYmasmSJdqyZYsaNGjguo3hw4dr4MCBeW53/PjxBeZ55plnZLPZ9O9//1vHjx/XlClT1Lt3b23cuFFhYWGSpOXLl2vAgAFq166dJk6cKLvdrvfee0+9evXSypUr1aFDh3zbrV27tp577jlJUlJSku65554Cb/uxxx7T0KFDddddd+nEiRN65ZVX1K1bN23YsEGVKlXK9z2jR49W165dJUmff/65vvjiizxfHzNmjGbOnKmRI0fq73//u/bu3avp06drw4YNWr16tYKCggp8HIri9OnTrvuWm9Pp1DXXXKNVq1Zp9OjRuuSSS7R582a9/PLL+vPPPzV//vwi3c57772n//znP/q///s/19LquS70eEydOlXXXHONbrnlFmVkZOjjjz/WjTfeqK+//lqDBg1yXe+JJ57QpEmT1KlTJz355JMKDg7W2rVrtXz5cvXt21dS9i++O++8U82bN9f48eNVqVIlbdiwQYsWLXLly3ns27dvr+eee07Hjh3T1KlTtXr16nw/0ypVqujll1+WJB06dEhTp07VwIEDdfDgwQJ/9jnq1q2rZcuW6dChQ6pdu3aB16latapee+013XPPPbruuutcy3E5S3RS9i/ifv36qUuXLnrxxRdVoUIFWZala665RitWrNDf/vY3tWnTRosXL9Y///lPxcXFufIW5D//+Y+effZZvfHGGxo1apQkadasWRoxYoT69eun559/XikpKXrttdfUpUsXbdiwoVC/yF9++WVVqVJFZ8+e1bvvvqtRo0apXr16bpeAunXrplmzZrk+f+aZZyQpzy+aTp06uf7vcDjUv39/XX755XrhhRe0aNEiTZw4UVlZWXryySdd1zP52sp9Xy40Xnn6OThp0iQ98cQT6t27t+655x7t2LFDr732mtavX++x++3OXXfdpffff19DhgzRww8/rLVr1+q5557Ttm3b8r3Wc8vKyiqwWJxP165dNXr0aDmdTm3ZskVTpkzR4cOHC/UHnDsJCQlKS0vTPffco169eunuu+/W7t27NWPGDK1du1Zr165VSEiIpKL93Ar7nM0tMzNTN9xwgw4cOKDVq1erRo0arq+V9LkdEhKS74+49evXa9q0aXkuK+x9/P3339W1a1cFBQVp9OjRqlevnnbv3q2vvvrK9XrOLednJ0nbtm3Ts88+m+frnhiHZs+erZ49e6p69eoaNmyYHnnkEX311Ve68cYbL/i9OSIiInTdddfpnXfe0R9//KHmzZsXaft169Z1Xbdz584KDHRfywIDA/Xmm2+qU6dOeuqpp1StWjX99tt
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 600x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from imblearn.over_sampling import ADASYN\n",
"from sklearn.compose import ColumnTransformer\n",
"from sklearn.preprocessing import OneHotEncoder\n",
"\n",
"categorical_features = ['gender', 'ever_married', 'work_type', 'Residence_type'] # Ваши категориальные признаки\n",
"numeric_features = ['age', 'hypertension', 'heart_disease', 'avg_glucose_level', 'bmi'] # Ваши числовые признаки\n",
"\n",
"# Создание пайплайна для обработки категориальных данных\n",
"preprocessor = ColumnTransformer(\n",
" transformers=[\n",
" ('cat', OneHotEncoder(), categorical_features), # OneHotEncoder для категориальных данных\n",
" ('num', 'passthrough', numeric_features) # Оставляем числовые колонки без изменений\n",
" ]\n",
")\n",
"\n",
"# Создание экземпляра ADASYN\n",
"ada = ADASYN()\n",
"\n",
"# Преобразование данных с помощью пайплайна\n",
"X = preprocessor.fit_transform(df_train.drop(columns=['stroke']))\n",
"y = df_train['stroke']\n",
"\n",
"# Применение ADASYN\n",
"X_resampled, y_resampled = ada.fit_resample(X, y)\n",
"\n",
"# Создание нового DataFrame\n",
"df_train_adasyn = pd.DataFrame(X_resampled)\n",
"# Восстанавливаем названия столбцов для DataFrame\n",
"ohe_columns = preprocessor.named_transformers_['cat'].get_feature_names_out(categorical_features)\n",
"new_column_names = list(ohe_columns) + numeric_features\n",
"df_train_adasyn.columns = new_column_names\n",
"\n",
"# Добавление целевой переменной\n",
"df_train_adasyn['stroke'] = y_resampled\n",
"\n",
"# Вывод информации о новой выборке\n",
"print(\"Обучающая выборка после oversampling: \", df_train_adasyn.shape)\n",
"print(df_train_adasyn['stroke'].value_counts())\n",
"\n",
"# Визуализация\n",
"counts = df_train_adasyn['stroke'].value_counts()\n",
"plt.figure(figsize=(6, 6))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов Stroke в тренировочной выборке после ADASYN')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Балансировка данных андерсемплингом. Этот метод помогает сбалансировать выборку, уменьшая количество экземпляров класса большинства, чтобы привести е г о в соответствие с классом меньшинства."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 18,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка после undersampling: (298, 12)\n",
"stroke\n",
"0 149\n",
"1 149\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAADECAYAAAB6FizTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+cUlEQVR4nO3dd3hT1f8H8HeStkk3lNJBGQXKpqwyhAJllwICimxkyfjJUBRF0S9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V1HZOSktCqVStcuXIFw4cPR6NGjRATE4MdO3bg/v37cHd3N5pv1m0HZD5Gz77c5z0PWermzZt47bXX8MYbb2DIkCFYs2YNhg4dioCAANSpUwdAZoVG27ZtkZGRIcW1atUqKefIypJtlJGRgeDgYLRs2RLz58+Hg4MD0tLSEBwcjNTUVIwfPx5eXl6IiIjAr7/+iri4OLi6ugIAli9fjjp16qB79+6wsbHBzp07MWbMGOj1eowdO9ZkHQcMGIDRo0dj0KBBmD9/Pl5++WWsWLECH330EcaMGQMAmD17Nvr06YNr165BqfyvPlWn06Fz58546aWXMHfuXOzatQvTpk1DRkYGZs6cWShlHhERgbZt20KhUGDy5MlwdHTEN998k78mF8ICa9euFQDE3r17xaNHj8S9e/fETz/9JMqUKSPs7e3F/fv3hRBCaLVaodPpjKYNCwsTarVazJw5Uxq2Zs0aAUAsWLDAZFl6vV6aDoCYN2+eyTh16tQRQUFB0ucDBw4IAMLHx0ckJCRIwzdt2iQAiC+//FK
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from imblearn.under_sampling import RandomUnderSampler\n",
"\n",
"rus = RandomUnderSampler()# Создание экземпляра RandomUnderSampler\n",
"\n",
"# Применение RandomUnderSampler\n",
"X_resampled, y_resampled = rus.fit_resample(df_train.drop(columns=['stroke']), df_train['stroke'])\n",
"\n",
"# Создание нового DataFrame\n",
"df_train_undersampled = pd.DataFrame(X_resampled)\n",
"df_train_undersampled['stroke'] = y_resampled # Добавление целевой переменной\n",
"\n",
"# Вывод информации о новой выборке\n",
"print(\"Обучающая выборка после undersampling: \", df_train_undersampled.shape)\n",
"print(df_train_undersampled['stroke'].value_counts())\n",
"\n",
"# Визуализация распределения классов\n",
"counts = df_train_undersampled['stroke'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов stroke в тренировочной выборке после Undersampling')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3. Датасет: Н а б о р данных для анализа и прогнозирования сердечного приступа\n",
"https://www.kaggle.com/datasets/kamilpytlak/personal-key-indicators-of-heart-disease\n",
"##### О наборе данных: \n",
"По данным CDC, болезни сердца являются основной причиной смерти представителей большинства р а с в США (афроамериканцев, американских индейцев и коренных жителей Аляски, а также белых). Около половины всех американцев (47%) имеют по крайней мере 1 из 3 основных факторов риска сердечно-сосудистых заболеваний: высокое кровяное давление, высокий уровень холестерина и курение. Другие ключевые показатели включают сахарный диабет, ожирение (высокий ИМТ), недостаточную физическую активность или чрезмерное употребление алкоголя. Выявление и профилактика факторов, оказывающих наибольшее влияние на сердечно-сосудистые заболевания, очень важны в здравоохранении. В свою очередь, достижения в области вычислительной техники позволяют применять методы машинного обучения для выявления \"закономерностей\" в данных, которые позволяют предсказать состояние пациента.\n",
"\n",
"##### Таким образом:\n",
"* Объект наблюдения - представители большинства р а с в США\n",
"* Атрибуты: HeartDisease, BMI, Smoking, AlcoholDrinking, Stroke, PhysicalHealth(как много дней за месяц вы чувствовали себя плохо), MentalHealth(как много дней за месяц вы чувствовали себя ментально плохо), DiffWalking, Sex, AgeCategory, Race, Diabetic, PhysicalActivity, GenHealth, SleepTime, Asthma, KidneyDisease, SkinCancer.\n",
"* Проблемная область: прогнозирование сердечного приступа у человека."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 20,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество колонок: 18\n",
"Колонки: HeartDisease, BMI, Smoking, AlcoholDrinking, Stroke, PhysicalHealth, MentalHealth, DiffWalking, Sex, AgeCategory, Race, Diabetic, PhysicalActivity, GenHealth, SleepTime, Asthma, KidneyDisease, SkinCancer\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 319795 entries, 0 to 319794\n",
"Data columns (total 18 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 HeartDisease 319795 non-null object \n",
" 1 BMI 319795 non-null float64\n",
" 2 Smoking 319795 non-null object \n",
" 3 AlcoholDrinking 319795 non-null object \n",
" 4 Stroke 319795 non-null object \n",
" 5 PhysicalHealth 319795 non-null float64\n",
" 6 MentalHealth 319795 non-null float64\n",
" 7 DiffWalking 319795 non-null object \n",
" 8 Sex 319795 non-null object \n",
" 9 AgeCategory 319795 non-null object \n",
" 10 Race 319795 non-null object \n",
" 11 Diabetic 319795 non-null object \n",
" 12 PhysicalActivity 319795 non-null object \n",
" 13 GenHealth 319795 non-null object \n",
" 14 SleepTime 319795 non-null float64\n",
" 15 Asthma 319795 non-null object \n",
" 16 KidneyDisease 319795 non-null object \n",
" 17 SkinCancer 319795 non-null object \n",
"dtypes: float64(4), object(14)\n",
"memory usage: 43.9+ MB\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>HeartDisease</th>\n",
" <th>BMI</th>\n",
" <th>Smoking</th>\n",
" <th>AlcoholDrinking</th>\n",
" <th>Stroke</th>\n",
" <th>PhysicalHealth</th>\n",
" <th>MentalHealth</th>\n",
" <th>DiffWalking</th>\n",
" <th>Sex</th>\n",
" <th>AgeCategory</th>\n",
" <th>Race</th>\n",
" <th>Diabetic</th>\n",
" <th>PhysicalActivity</th>\n",
" <th>GenHealth</th>\n",
" <th>SleepTime</th>\n",
" <th>Asthma</th>\n",
" <th>KidneyDisease</th>\n",
" <th>SkinCancer</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>No</td>\n",
" <td>16.60</td>\n",
" <td>Yes</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>3.0</td>\n",
" <td>30.0</td>\n",
" <td>No</td>\n",
" <td>Female</td>\n",
" <td>55-59</td>\n",
" <td>White</td>\n",
" <td>Yes</td>\n",
" <td>Yes</td>\n",
" <td>Very good</td>\n",
" <td>5.0</td>\n",
" <td>Yes</td>\n",
" <td>No</td>\n",
" <td>Yes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>No</td>\n",
" <td>20.34</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>Yes</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>No</td>\n",
" <td>Female</td>\n",
" <td>80 or older</td>\n",
" <td>White</td>\n",
" <td>No</td>\n",
" <td>Yes</td>\n",
" <td>Very good</td>\n",
" <td>7.0</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>No</td>\n",
" <td>26.58</td>\n",
" <td>Yes</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>20.0</td>\n",
" <td>30.0</td>\n",
" <td>No</td>\n",
" <td>Male</td>\n",
" <td>65-69</td>\n",
" <td>White</td>\n",
" <td>Yes</td>\n",
" <td>Yes</td>\n",
" <td>Fair</td>\n",
" <td>8.0</td>\n",
" <td>Yes</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>No</td>\n",
" <td>24.21</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>No</td>\n",
" <td>Female</td>\n",
" <td>75-79</td>\n",
" <td>White</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>Good</td>\n",
" <td>6.0</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>Yes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>No</td>\n",
" <td>23.71</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>28.0</td>\n",
" <td>0.0</td>\n",
" <td>Yes</td>\n",
" <td>Female</td>\n",
" <td>40-44</td>\n",
" <td>White</td>\n",
" <td>No</td>\n",
" <td>Yes</td>\n",
" <td>Very good</td>\n",
" <td>8.0</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" <td>No</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" HeartDisease BMI Smoking AlcoholDrinking Stroke PhysicalHealth \\\n",
"0 No 16.60 Yes No No 3.0 \n",
"1 No 20.34 No No Yes 0.0 \n",
"2 No 26.58 Yes No No 20.0 \n",
"3 No 24.21 No No No 0.0 \n",
"4 No 23.71 No No No 28.0 \n",
"\n",
" MentalHealth DiffWalking Sex AgeCategory Race Diabetic \\\n",
"0 30.0 No Female 55-59 White Yes \n",
"1 0.0 No Female 80 or older White No \n",
"2 30.0 No Male 65-69 White Yes \n",
"3 0.0 No Female 75-79 White No \n",
"4 0.0 Yes Female 40-44 White No \n",
"\n",
" PhysicalActivity GenHealth SleepTime Asthma KidneyDisease SkinCancer \n",
"0 Yes Very good 5.0 Yes No Yes \n",
"1 Yes Very good 7.0 No No No \n",
"2 Yes Fair 8.0 Yes No No \n",
"3 No Good 6.0 No No Yes \n",
"4 Yes Very good 8.0 No No No "
]
},
2024-10-11 18:29:39 +04:00
"execution_count": 20,
2024-10-10 22:31:48 +04:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\".//static//csv//heart.csv\", sep=\",\")\n",
"print('Количество колонок: ' + str(df.columns.size)) \n",
"print('Колонки: ' + ', '.join(df.columns)+'\\n')\n",
"\n",
"df.info()\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Получение сведений о пропущенных данных\n",
"Типы пропущенных данных:\n",
"\n",
"- None - представление пустых данных в Python\n",
"- NaN - представление пустых данных в Pandas\n",
"- '' - пустая строка"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 3,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HeartDisease 0\n",
"BMI 0\n",
"Smoking 0\n",
"AlcoholDrinking 0\n",
"Stroke 0\n",
"PhysicalHealth 0\n",
"MentalHealth 0\n",
"DiffWalking 0\n",
"Sex 0\n",
"AgeCategory 0\n",
"Race 0\n",
"Diabetic 0\n",
"PhysicalActivity 0\n",
"GenHealth 0\n",
"SleepTime 0\n",
"Asthma 0\n",
"KidneyDisease 0\n",
"SkinCancer 0\n",
"dtype: int64\n",
"\n",
"HeartDisease False\n",
"BMI False\n",
"Smoking False\n",
"AlcoholDrinking False\n",
"Stroke False\n",
"PhysicalHealth False\n",
"MentalHealth False\n",
"DiffWalking False\n",
"Sex False\n",
"AgeCategory False\n",
"Race False\n",
"Diabetic False\n",
"PhysicalActivity False\n",
"GenHealth False\n",
"SleepTime False\n",
"Asthma False\n",
"KidneyDisease False\n",
"SkinCancer False\n",
"dtype: bool\n",
"\n",
"HeartDisease процент пустых значений: %0.00\n",
"BMI процент пустых значений: %0.00\n",
"Smoking процент пустых значений: %0.00\n",
"AlcoholDrinking процент пустых значений: %0.00\n",
"Stroke процент пустых значений: %0.00\n",
"PhysicalHealth процент пустых значений: %0.00\n",
"MentalHealth процент пустых значений: %0.00\n",
"DiffWalking процент пустых значений: %0.00\n",
"Sex процент пустых значений: %0.00\n",
"AgeCategory процент пустых значений: %0.00\n",
"Race процент пустых значений: %0.00\n",
"Diabetic процент пустых значений: %0.00\n",
"PhysicalActivity процент пустых значений: %0.00\n",
"GenHealth процент пустых значений: %0.00\n",
"SleepTime процент пустых значений: %0.00\n",
"Asthma процент пустых значений: %0.00\n",
"KidneyDisease процент пустых значений: %0.00\n",
"SkinCancer процент пустых значений: %0.00\n"
]
}
],
"source": [
"# Количество пустых значений признаков\n",
"print(df.isnull().sum())\n",
"print()\n",
"\n",
"# Есть ли пустые значения признаков\n",
"print(df.isnull().any())\n",
"print()\n",
"\n",
"# Процент пустых значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" print(f\"{i} процент пустых значений: %{null_rate:.2f}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Пропущенные данные отсутствуют.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Проверим выбросы и усредним их:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 22,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Колонка BMI:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 10396\n",
" Минимальное значение: 12.02\n",
" Максимальное значение: 94.85\n",
" 1-й квартиль (Q1): 24.03\n",
" 3-й квартиль (Q3): 31.42\n",
"\n",
"Колонка PhysicalHealth:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 47146\n",
" Минимальное значение: 0.0\n",
" Максимальное значение: 30.0\n",
" 1-й квартиль (Q1): 0.0\n",
" 3-й квартиль (Q3): 2.0\n",
"\n",
"Колонка MentalHealth:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 51576\n",
" Минимальное значение: 0.0\n",
" Максимальное значение: 30.0\n",
" 1-й квартиль (Q1): 0.0\n",
" 3-й квартиль (Q3): 3.0\n",
"\n",
"Колонка SleepTime:\n",
" Есть выбросы: Да\n",
" Количество выбросов: 4543\n",
" Минимальное значение: 1.0\n",
" Максимальное значение: 24.0\n",
" 1-й квартиль (Q1): 6.0\n",
" 3-й квартиль (Q3): 8.0\n",
"\n"
]
}
],
"source": [
"numeric_columns = ['BMI', 'PhysicalHealth', 'MentalHealth', 'AgeCategory', 'SleepTime']\n",
"for column in numeric_columns:\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" q1 = df[column].quantile(0.25) # Находим 1-й квартиль (Q1)\n",
" q3 = df[column].quantile(0.75) # Находим 3-й квартиль (Q3)\n",
" iqr = q3 - q1 # Вычисляем межквартильный размах (IQR)\n",
"\n",
" # Определяем границы для выбросов\n",
" lower_bound = q1 - 1.5 * iqr # Нижняя граница\n",
" upper_bound = q3 + 1.5 * iqr # Верхняя граница\n",
"\n",
" # Подсчитываем количество выбросов\n",
" outliers = df[(df[column] < lower_bound) | (df[column] > upper_bound)]\n",
" outlier_count = outliers.shape[0]\n",
"\n",
" print(f\"Колонка {column}:\")\n",
" print(f\" Есть выбросы: {'Да' if outlier_count > 0 else 'Нет'}\")\n",
" print(f\" Количество выбросов: {outlier_count}\")\n",
" print(f\" Минимальное значение: {df[column].min()}\")\n",
" print(f\" Максимальное значение: {df[column].max()}\")\n",
" print(f\" 1-й квартиль (Q1): {q1}\")\n",
" print(f\" 3-й квартиль (Q3): {q3}\\n\")\n",
"\n",
" # Устраняем выбросы: заменяем значения ниже нижней границы на саму нижнюю границу, а выше верхней — на верхнюю\n",
" df[column] = df[column].apply(lambda x: lower_bound if x < lower_bound else upper_bound if x > upper_bound else x)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Постараемся выявить зависимости HeartDisease от остальных колонок:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Разобьем наш набор на выборки относительно параметра HeartDisease:"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 23,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAIjCAYAAADC0ZkAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAA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jRkv5vPmZxt9WrVzufx0aNGrkdv7Tk5eVp7NixqlOnjmw2m6KjozVixAjl5eW51CUnJ6tdu3aKiIiQzWbTDTfcoBkzZrgdLyYmRl27dlVqaqqaN2+uoKAgvfHGG7JYLMrJydHs2bOdj/n816co7dq105gxY/Trr79qzpw5zvHC5rguW7ZMt912m8LDwxUSEqJ69erp2WefLdXHu2nTJiUkJKhy5coKCgpSrVq19PDDD7vUOBwO/ec//1HDhg0VGBioqlWrasCAATp27NhFH78krVy5Uq1atVJwcLDCw8N11113aefOnW7PhSfvr0sRHh6uoKCgQv9A+Mtf/qLWrVsrJSXFZXzu3Llq3Lhxmb6HgbLCn8qAjx0/flxnzpzRiRMntHnzZv373//W/fffrxo1ajhrZs2apZCQEA0fPlwhISFauXKlnn/+eWVlZenll192OV79+vU1evRoGYahtLQ0vfrqq+rcubPS09OL7WHixIlu4wUFBeratatWrFih+++/X08++aROnDihZcuWaceOHapdu3ahx/v55581c+bMIs9Xrlw5zZkzR8OGDXOOJScnKzAwULm5uS61s2bN0kMPPaSbb75ZEydO1MGDBzVlyhStX79e33//vcLDwyVJ27ZtU6tWrWS1WvXYY48pJiZGaWlp+uyzz/TCCy/onnvuUZ06dZzHHTZsmBo0aKDHHnvMOdagQYMie75U588rLI7D4dCdd96pdevW6bHHHlODBg20fft2TZ48WT/99JPLx/ozZsxQw4YNdeedd8rf31+fffaZHn/8cTkcDg0aNMjluLt371bPnj01YMAAPfroo6pXr57ee+89PfLII7rlllucj7uo1/BCffr00bPPPqulS5fq0UcfLbTmhx9+UNeuXRUbG6vx48fLZrPp559/1vr160vt8R46dEgdO3ZUlSpVNHLkSIWHh2vfvn36+OOPXXobMGCA8730xBNPaO/evZo2bZq+//57rV+/vsg/JCVp+fLl6tSpk6677jolJSXp1KlTeu2119SyZUt99913iomJ8dr7KzMzUxkZGTIMQ4cOHdJrr72m7OxsPfDAA4XW9+rVS08++aSys7MVEhKiM2fOaP78+Ro+fLjbv0vAVcEA4FP16tUzJDl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nRrbfeqpo1a3q1L+BKwVQBwMfi4uKc/7tXr1667rrrNHr0aPXv318tW7aUdPYj2Oeee04rV65UVlaWy/0vDCxfffWVqlSp4ty+/vrrtWDBgiID3NixYxUVFaUBAwboww8/dNmXlpamevXqXdIXcEaOHKlWrVqpa9euRS77VKVKFXXp0kXvvPOOmjdvrnfeeUd9+/Z1C7q//vqrJKlevXpux6hfv77WrVsnSfrll18kyatz+nbt2uV8Hv38/FSnTh2NHTtWvXr1uuh9y5Urp/bt23t0nj179mjnzp0ur9n5Dh065Pzf69ev19ixY7VhwwadPHnSpS4zM1NhYWHO7Vq1anl0/kuRnZ2tiIiIIvffd999euutt/TII49o5MiRio+P1z333KN7773X+dp6+/G2adNGiYmJGjdunCZPnqy2bduqe/fu6tWrl2w2m/OcmZmZRfZ+/jkvVNx7sEGDBkpNTVVOTo6Cg4OLPMaluOWWW1y+nNWzZ081adJEgwcPVteuXRUQEOB2n169eqlPnz5KT0/XggUL9K9
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABYkklEQVR4nO3deVhUZf/H8c+AAYqCKwJJiEsqueUSoWlqJJqmqC0u5ZLlkjs95ZprpdmjqWnaYi5lj2ZPkWmhhJqlSLmgaerPBXdBU3EEFRXm94cX53EClUMgg7xf1zVXzH2+c853TjR9PN7nHovNZrMJAAAAQLY55XcDAAAAQEFDiAYAAABMIkQDAAAAJhGiAQAAAJMI0QAAAIBJhGgAAADAJEI0AAAAYBIhGgAAADCJEA0AAACYRIgGABQ4ycnJmjFjhvE8KSlJc+bMyb+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YwDxrODyuRAOF0MGDB9WqVSu5urpq9erV8vHxyVSzcOFC9erVSw0bNtTkyZOVmJiomTNnauPGjdq+fXuWV/06dOigjh07SpJ++eUXffzxx7ftIykpSZMnT87x+7h06ZIef/xxnThxQn379tUDDzygTZs2aeTIkTp16pTdjWe9e/fWwoUL1bp1a7388su6fv26fvnlF23evFkNGjTQ559/btRm9P7++++rbNmykqTy5cvbHXvUqFGqUaOGLl++rGXLlmnUqFHy8vJS7969JUm7d+9WkyZN5OHhoTfeeEP33XefPvroIzVr1kw///yzgoKCbvm+UlJSVKFCBT399NPy8PDQrl27NGfOHJ04cSJH834PHTqkiIgIPfvsswoICFBiYqI++ugjPf744/rzzz9NTxMwc97/iQ0bNuiHH37IVu20adOUmJho+hgVKlQwfgeTk5PVv3//29bf/Dvx9ttv2227cOGCWrduLZvNpvDwcPn5+UmShg0bdsc+/P39JUmLFy/WmDFjsvzDzM3S0tLUunVrNW3aVFOnTtWSJUs0cOBAubu7a/To0erWrZs6duyoefPmqXv37goODlZAQIAkKTExUY0aNdKlS5c0ePBglSlTRosWLVK7du309ddfq0OHDlke8/Lly2rfvr22bNmin376SQ0bNrxtjwcOHNAzzzyj3r17q0ePHvrss8/Us2dP1a9fXw899JAk6cSJE2revLksFotGjhwpd3d3ffrpp0wNQcFgA1AoLFiwwCbJtnLlSlvlypVtkmwtW7bMsvbq1as2Ly8vW82aNW2XL182xleuXGmTZBs7dqxd/bVr12ySbBMmTMh0vPj4eGNMkm3cuHHG8zfeeMPm5eVlq1+/vu3xxx83xidMmGCTZEtPT7c7jr+/v61Hjx7G80mTJtnc3d1t//d//2dXN2LECJuzs7Pt6NGjNpvNZlu7dq1Nkm3w4MGZ3uvfj3Gr3jOsW7fOJsm2bt06Y+zKlSs2Jycn26uvvmqMhYWF2VxcXGwHDx40xk6ePGkrUaKErWnTppn2eyevvvqqrXjx4pn6WL58eaZad3d3u/N05coVW1paml1NfHy8zdXV1TZx4kRjLLfPe3x8vE2S7b333svU40MPPW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zsJCwszfnZyctKYMWPUqVMnSdKZM2d06dKlLM9fjRo1lJ6ermPHjhl/pX0roaGhio2NlSS1atVKy5Yty1Tz0ksv3bHXjPngH374oeLj4+0C7M2BL7fPe4Zx48Zl+QeYv0+RyZCWlqZRo0apW7duql279m3fW3x8vD766CPNnTvX9I2xf/31l6pWrZqt2uz8jjdo0ED33Xefxo8fr7JlyxrTOf5+/m7F09NTU6dO1dSpU3XkyBFFR0fr3//+t2bPni1
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZtUlEQVR4nO3deVhV5f7+8XuDAqICTogoAqmpOOaMQ6aSqJTh0HEqhyzTHFIshwanNJWOpaVpZYmWlmlppeYQTmU4Z+Z4zDCnwBEQVFRYvz/6sb7uQGURCOj7dV37Ouy1PuvZn73ceu4Wz3q2zTAMQwAAAAAyzSG3GwAAAADyG0I0AAAAYBEhGgAAALCIEA0AAABYRIgGAAAALCJEAwAAABYRogEAAACLCNEAAACARYRoAAAAwCJCNAAgyxITEzV9+nTzeVxcnGbNmpV7Dd1lvXv3lp+fX46N7+fnp8ceeyzbxjt27JhsNpsiIiKybcx/euSRR/TII49k+djq1avfsc7Pz0+9e/fO0msA2YUQDdxlERERstls2rlzZ7p9H330kWw2m0JDQ5WSkpIL3QHWFCpUSK+99poWLlyoEydOaNy4cfruu+9yu61sERcXJxcXF9lsNh08eDC328kx48aNk81mMx+urq4qX768Hn/8cc2bN0/Jycm53SKQJxXI7QYA/G3ZsmUaMGCAmjVrpi+++EKOjo653RJwR46Ojho/frx69uyp1NRUub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10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABS3UlEQVR4nO3de3zP9f//8ft7YwfmvTlsZpkZKyynjGYJ0RhNjvWhlENK5BBToWTooJRCxKfD11R8Ep+oKKwJxRxyyNlXmua0IW2zYWN7/f7ot/fXuw17rc3es9v1cnldLr2fr8f79X68X0N3L8/X82UxDMMQAAAAgAJzKukGAAAAgNKGEA0AAACYRIgGAAAATCJEAwAAACYRogEAAACTCNEAAACASYRoAAAAwCRCNAAAAGASIRoAAAAwiRANAAAAmESIBgDcktLT0zVjxgzb65SUFM2ZM6fkGrpFTJo0SRaLRWfPni3pVoASRYgGYBMTEyOLxaKff/45z74PP/xQFotF3bt3V3Z2dgl0B5jj7u6uCRMmaOHChTp27JgmTZqkb775pqTb+kfS09MVHR2thg0bqmLFiqpataqaNm2qZ599VidPnrTVffvtt5o0aVLJNQqUAeVKugEAjm/ZsmUaOnSoWrdurc8//1zOzs4l3RJwQ87Ozpo8ebL69eunnJwcWa1WrVy5sqTbKrTLly+rTZs2OnjwoPr3768RI0YoPT1d+/bt06JFi9SjRw/5+flJ+itEz5kzhyANFCNCNIDrWrdunR555BEFBwfrm2++kZubW0m3BBTYmDFj1Lt3bx07dkwNGjSQl5dXSbdUaMuXL9fOnTu1cOFCPfroo3b7Ll26pKysrEId98qVK8rJyZGLi0tRtAmUGUznAHBNu3btUrdu3VSjRg2tXr1anp6eeWqWLFmikJAQubu7q1q1anrsscd04sSJfI9nsVjy3Y4ePWpX8/erZ2+99ZYsFovuu+8+21juvMy/q127tgYMGGA3lpKS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mi2NhYVatW7ab9/IESZQDA/zd//nxDkrFixQqjbt26hiSjY8eO+dZmZWUZPj4+RsOGDY2LFy/axlesWGFIMiZOnGhXf/nyZUOSMXny5Dyfl5CQYBuTZERHR9tev/DCC4aPj48REhJitG3b1jY+efJkQ5KRk5Nj9zkBAQFG//79ba9feeUVo2LFisb//u//2tWNGzfOcHZ2NhITEw3DMIy1a9cakoyRI0fm+a5//4xr9Z7rhx9+MCQZP/zwg23s0qVLhpOTk/HMM8/Yxrp37264uLgYR44csY2dPHnSqFSpktGmTZs8x72RZ555xvDw8MjTx5IlS/LUVqxY0e48Xbp0ycjOzrarSUhIMFxdXY0pU6bYxor6vCckJBiSjLfeeitPj3feeafdzzy/8xoaGmp07tw5z6+b6Oho4+r/xZ0+fdqoVKmSrfbqY1zPPffcYzRs2ND2+syZM3k+K9eHH35oSDJ+//1321jbtm3tvsPq1asNScZ//vMfu/cGBAQYkZGR1+3lwoULRr169QxJRkBAgDFgwADj448/NpKTk/PUDhs2zMjvf/G559tqtRqnT5+229e0aVPDx8fH+OOPP2xjv/zyi+Hk5GT069fPNpZ7bs+cOWMcOHDA8PPzM1q0aGGcO3fOVlPQnz9QmjGdA0AeAwYM0LFjx/Too49qzZo1WrJkSZ6an3/+WadPn9YzzzxjN086MjJS9evXz3MDV+58TVdX1wL3ceLECb333nt6+eWX5eHhYbfPx8dHknT8+PHrHmPJkiVq3bq1KleurLNnz9q28PBwZWdna8OGDZKk//73v7JYLIqOjs5zjGtd8buR1NRUnT17VomJiZo2bZpycnLUvn17SVJ2drbWrFmj7t27q06dOrb31KhRQ48++qh++uknpaWlFegzkpOTFRcXp5UrV6pNmzZ5as6fP2/33fNbmszV1VVOTk623v744w95eHioXr162rFjh62uqM97rgsXLuTp8UarwHz55Zfatm2b3njjjevWSdIrr7wiT09PjRw58oa1V7t06VKB7wMoyK/x8+fPS5KqVq1qqg/pr9VGtmzZoueff17SX/8SNGjQINWoUUMjRoxQZmZmgY/Vq1cveXt7216fOnVKu3bt0oABA1SlShXbeOPGjdWhQ4d8r/bv3btXbdu2Ve3atfX999+rcuXKtn1mf/5AacR0DgB5nDt3Tp9//rl69Oih/fv369lnn1XHjh3t5kT//vvvkqR69erleX/9+vX1008/2Y2lpKRIUp4wfD3R0dHy8/PT008/nWdeb1hYmCwWi8aPH69XX33Vdty/z7c8fPiwdu/ebRcYrnb69GlJf/2TtJ+fn12A+Ke6d+9u+28nJydNmDBBvXr1kiSdOXNGFy5cyPf8NWjQQDk5OTp27JjuvPPO635GRESEtmzZIknq1KmTFi9enKfmiSeeuGGvufPB33//fSUkJNgF2KsDX1Gf91zR0dH5/gXm71NkcmVnZ+vFF19U37591bhx4+t+t4SEBP373//W3LlzTd8Ye/bsWd1+++0Fqi3Ir/HmzZurfPnymjRpkqpVq2abzlHQecKenp6aNm2apk2bpt9//11xcXF6++23NXv2bHl6eurVV18t0HECAwPtXl/v93ODBg20evVqZWRkqGLFirbxBx98UNWrV9fq1avzfGezP3+gNCJEA8jjrbfe0sMPPyxJ+uCDD9SyZUuNHz9e77//fqGPmZSUJEny9fUtUP2BAwcUExOjzz77TOXLl8+zv0mTJoqOjtbkyZO1cOHCax4nJydHHTp00AsvvJDv/jvuuKNA/RTG22+/rSZNmujy5cvatm2bXn31VZUrVy7fsFhY7733ns6ePav9+/dr6tSpGjJkiD777DO7mokTJ6p169Z2Yw8++KDd69dff10vv/yynnjiCb3yyiuqUqWKnJycNGrUKLuAV1znffDgwbZfc7meeuqpax7/448
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqYAAAIjCAYAAADRBtn0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB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OMPl9du//796ty5s0qUKKGQkBBVqVJFr776qqT/zYfM6pY+x+1mzxdLTk7W0KFDValSJdntdsXExOjll19WcnKyU78pU6bonnvuUVRUlOx2u6pXr66JEye67C82Nlbt2rXT0qVL1aBBA4WEhGjSpEmy2Wy6ePGipk2b5njO15+fzNxzzz0aPHiwfvvtN02fPt3RntEc0+XLl+vuu+9WRESEQkNDVaVKFb3yyit5+ny3bNmiuLg4RUZGKiQkROXLl9djjz3m1CctLU3vvvuuatSooeDgYJUsWVJ9+vTR2bNns33+krRq1So1btxYhQsXVkREhO6//37t27fP5bVw5/2VE/fcc48k6dChQ07tycnJ6t+/v0qUKKHChQurY8eOTp+pXr16KTIyUikpKS77bNWqlapUqeK4n905y+wzntXnTZJ+++03PfPMM6pSpYpCQkJUvHhxPfTQQzp8+HCOXwd3ePt9db01a9botttukyQ9+uijjnN642uyd+9e/f3vf1ehQoV0yy236M033/Tqc0T+xq/xyBfOnTuna9eu6cKFC9q6davefvttdenSRWXLlnX0mTp1qkJDQ9W/f3+FhoZq1apVGjJkiBITE/XWW2857a9q1ap69dVXZVmWDh48qLFjx6pNmzY6cuRIljWMGjXKpT01NVXt2rXTypUr1aVLFz3//PO6cOGCli9frj179qhixYoZ7u+XX37R5MmTMz2ev7+/pk+frhdffNHRNmXKFAUHB+vKlStOfadOnapHH31Ut912m0aNGqUTJ05o3Lhx2rBhg7Zv366IiAhJ0q5du9S4cWMFBgbqySefVGxsrA4ePKivv/5ar7/+uh544AFVqlTJsd8XX3xR1apV05NPPuloq1atWqY151RCQoJb/dLS0nTfffdp/fr1evLJJ1WtWjXt3r1b77zzjn766Sen+aATJ05UjRo1dN999ykgIEBff/21nnnmGaWlpalv375O+z1w4IC6du2qPn366B//+IeqVKmizz77TE888YRuv/12x/PO7BzeqEePHnrllVe0bNky/eMf/8iwz48//qh27dqpdu3aGj58uOx2u3755Rdt2LAhz57vyZMn1apVK5UoUUIDBw5URESEDh8+rC+//NKptj59+jjeS88995wOHTqkCRMma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3/8offee0+DBw92uQr2iy++UGRkpPr16+fyuMyWCdq6davmzJmjUaNGOU1HuF6PHj20f/9+x1f2X3zxhcLDw9W8eXOnflu2bNHJkyf1zDPPOM1xa9u2rapWraqFCxdKkk6dOqW1a9fqsccecxppzqrO7KSmpiohIUEJCQm6evVqjh4bHBys5cuXZ3i70Zw5c1StWjVVrVrVcbyEhATHV7irV6929L3+fXD+/HklJCSoadOm+vXXX3X+/Hmn/ZYvX15xcXE5qjs7oaGhWV6dnz56/dVXX2W6soS3n2/6Mb/55psMv7ZOP2Z4eLhatmzpdMz69esrNDTU6Zg3OnbsmHbs2KHevXurWLFijvbatWurZcuWWrRoUaaP9USLFi1UokQJxcTEqEuXLgoNDdW8efN0yy23OPV78sknnd7bjRs3Vmpqqn777TdJf04F6t69uxYsWOB0zmbMmKG77rpL5cuXl+TeObuRu5+3689fSkqKTp8+rUqVKikiIkLbtm3L9jgmfI5yIjQ
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqYAAAIjCAYAAADRBtn0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMg0lEQVR4nO3deVxU9f7H8feAMKAIrqgkikvumlvdzBSvG4laWmmpFS6VlWWlXn9YV0W9uVR6r2aZ2VXTNHMps9zN3axc0jKX1FCyTMUFxGUk5vz+6MFch2EZYHAO8Xo+HvOw8z3fOedz5jvSm3O+52gxDMMQAAAA4GU+3i4AAAAAkAimAAAAMAmCKQAAAEyBYAoAAABTIJgCAADAFAimAAAAMAWCKQAAAEyBYAoAAABTIJgCAADAFAimAOAFcXFxslgs3i4DJtS3b19FRER4uwwnJ06ckMVi0dy5c93u++abbxZ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z8Kd71d2evXqpfPnz2v9+vWOths3bmjp0qXq3bt3pu9x99jSvxfbt2/XXXfdpYCAAFWvXl3z5s1z9Jk7d6569OghSfr73//uUru7P4s85fDhw3r44YdVpkwZBQQEqHnz5lqxYoVTnwsXLmjYsGFq2LChgoKCFBwcrE6dOmn//v3Zbrtv3756++23JclpnDJ67733VKNGDVmtVt15553atWuX5w4Qf0n8uo5C7dKlS/rjjz90+fJl7dmzR2+++aYeffRRValSxdFn7ty5CgoK0pAhQxQUFKSNGzdq1KhRSk5O1htvvOG0vTp16ujVV1+VYRg6fvy4pkyZoujoaCUkJGRbw4QJE1za09LS1KVLF3355Zd69NFH9eKLL+ry5ctav369Dhw4oBo1amS6vWPHjmnWrFlZ7s/X11cffvihXn75ZUfbnDlzFBAQoOvXrzv1nTt3rvr166c777xTEyZM0JkzZzR16lTt2LFD3333nUqVKiVJ+v7779WqVSv5+fnp6aefVkREhI4fP67PP/9cr732mh588EHVrFnTsd2XX35ZdevW1dNPP+1oq1u3bpY155a7Z7bsdrvuv/9+bd++XU8//bTq1q2rH374Qf/+97/1008/OV12nzFjhurXr6/7779fxYoV0+eff67nnntOdrtdgwYNctrukSNH1KtXLw0cOFBPPfWUateurfnz5+vJJ5/UXXfd5TjurMYwo8cff1yvvPKK1q1bp6eeeirTPj/++KO6dOmiRo0aaezYsbJarTp27Jh27NhRYMd79uxZdezYUeXLl1dsbKxKlSqlEydO6JNPPnGqbeDAgY7v0uDBgxUfH6/p06fru+++044dO7L8RVGSNmzYoE6dOql69eqKi4vTtWvX9NZbb6lly5bau3evIiIiPPb9ioiIUIsWLfTRRx+pU6dOkqTVq1crKSlJjz76qKZNm+byntwc27Fjx/Twww9rwIABiomJ0ezZs9W3b181a9ZM9evXV+vWrTV48GBNmzZNr7zyiqPm9D9z87MoM9evX8/070ZKSopL248//qiWLVvqtttuU2xsrEqUKKHFixerW7duWrZsmbp37y5J+vnnn7V8+XL16NFD1apV05kzZzRz5kxFRkbq4MGDCgsLy7SWg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3rurUqePYX2Jiotq2bStJ2rRpk6Pvzd+DpKQkJSYmKjIyUj///LOSkpKctlutWjVFRUXlqu6cBAUFZXt3fvrZ688++yzLJ0t4+njT9/nFF18oNTU1y32GhISoQ4cOTvts1qyZgoKCnPaZ0enTp7Vv3z717dtXZcqUcbQ3atRIHTp00KpVq7J8b1717NlT165d0xdffKHLly/riy++yPIyfm6PrV69emrVqpVjuXz58qpdu7Z+/vlnt2rLzc+izDzwwAO
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABS6UlEQVR4nO3deXhMZ//H8c8kZLEk1ohUGrFTW4VG7EuIrShPa2st1Sq1qxal1irVR4vaSluhpbX8LC0V0hBaYqmlxPbgCbEltsaIEiTz+8OVeUwT5EQiE96v65rrMvf5zjnfOabpx8l97jFZLBaLAAAAAKSZQ1Y3AAAAAGQ3hGgAAADAIEI0AAAAYBAhGgAAADCIEA0AAAAYRIgGAAAADCJEAwAAAAYRogEAAACDCNEAAACAQYRoAECWi4+P17Rp06zP4+LiNGvWrKxrKAucOnVKJpNJwcHBNuMhISGqWrWqXFxcZDKZFBcXJ0n67rvvVK5cOeXMmVP58uXL0j67d++uPHnyPPK1DRo0UIMGDTKvOeAJIkQD2VRwcLBMJpP++OOPFNvmz58vk8mktm3bKjExMQu6A4xxdXXVqFGjtHjxYp05c0Zjx47Vzz//nNVtPRaTyWR95MiRQwUKFJCfn58GDhyow4cPp2kfV65c0WuvvSZXV1fNmjVL3333nXLnzq2jR4+qe/fuKlmypObPn6958+apRYsWyp8/vywWi80+9u3bJ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o/ly5enqM2dO7fNebp165YlMTHRpiYqKsri7OxsGT9+vHUso897VFSURZLls88+S9HjCy+8YPN3ntp59ff3tzRv3jzF52bMmDGW+/93dPHiRUvevHmttffv42Fq1aplqVixovX5pUuXUhwr2fz58y2SLKdPn7aO1a9f3+Y9bNiwwSLJ8sMPP9i81sfHx9KyZctH9iPJ0rdv3wduHzhwoEWS5c8//7RYLP87vwsWLLDWJH92d+/ebfPa5HN26dIlm/H333/fIsly9uxZi8Visfzwww8WFxcXS0JCguWXX36xODo6Wsxms8VisVhmzpxpkWTZtm2bxWJJ++cqtT67detmyZ07t8VisVh+//13i5ubm6Vly5aWW7du2ezvn+c4+XNSvnx5S0JCgnV8+vTpFkmWgwcPWiwWiyUhIcFSsGBBS40aNSx37tyx1gUHB1sk2ewTeFKYzgFkc927d9eZM2fUuXNnbdy4UcuXL09R88cff+jixYt69913beZJt2zZUuXKlUtxA9ft27clSc7Ozmnu49y5c/ryyy/10UcfpVjqysPDQ5J09uzZh+5j+fLlqlu3rvLnz6/Lly9bH4GBgUpMTNTWrVslSf/3f/8nk8lk/ZX2/VKbvpAW165d0+XLlxUdHa0pU6YoKSlJjRo1kiQlJiZq48aNatu2rUqUKGF9TdGiRdW5c2f9/vvvMpvNaTpGbGyswsLCtG7dOtWrVy9FzfXr123e++XLl1PUODs7y8HBwdrblStXlCdPHpUtW1Z79+611mX0eU/2999/p+jxUavArFy5Urt379bkyZMfWidJEyZMkLu7uwYMGPDI2vvdunUrzfcBpOUzfv36dUn3pl9khuT/TpKPkxGSryr/9ttvku5N5fDz85OTk5MCAgKsUziSt7m4uKh69eqS0v65epjNmzcrKChIjRs31sqVK9P8M6RHjx42c6Xr1q0r6d7Vcenez7ArV67o7bffVo4c//slepcuXZQ/f/40HQPIaEznALK5q1ev6scff9Qrr7yiw4cPa+DAgWratKnNnOjTp09LksqWLZvi9eXKlUtxs1HyOrRpWfc12ZgxY+Tl5aV33nknxbzegIAAmUwmjRgxQh9//LF1v/+
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtIAAAJHCAYAAAC9wbFaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABdc0lEQVR4nO3deVRV5f7H8c9BBJwAUQFJRFJTySnFFMdUEgszzLpqlpaWN9McyyFns1S6lppeyayse/VmVlppqYSZlkjOs2aFOQVoCAgpouzfHy32zxOknB3I4Pu11lnL8+zv2ft7tnT6sH32c2yGYRgCAAAA4BCnom4AAAAAKIkI0gAAAIAFBGkAAADAAoI0AAAAYAFBGgAAALCAIA0AAABYQJAGAAAALCBIAwAAABYQpAEAAAALCNIAAEhKT0/X3LlzzecpKSlauHBh0TUEoNgjSAOwbOnSpbLZbNqxY0eubW+99ZZsNpsiIiJ09erVIugOcEy5cuU0ceJELVu2TCdPntTUqVP1+eefF3Vbf0t6erqmTJmihg0bqkKFCqpSpYqaNm2q4cOH68yZM0XdHlDiORd1AwBKn1WrVmnw4MFq166dPvjgA5UpU6aoWwJuqEyZMpo2bZr69eun7Oxsubu7a+3atUXdlmVZWVlq3769jhw5ov79++u5555Tenq6Dh48qOXLl6tHjx7y8/Mr6jaBEo0gDaBAbdq0SX369FFQUJA+//xzubm5FXVLQL6NHj1avXr10smTJ9WgQQN5enoWdUuWrV69Wrt379ayZcv06KOP2m27dOmSLl++XESdAaUHUzsAFJg9e/bowQcfVPXq1bV+/Xp5eHjkqlm5cqWaN2+ucuXKqWrVqnrsscd0+vTpPPdns9nyfBw/ftyuZurUqXave/XVV2Wz2XTPPfeYY1OnTpXNZst1jFq1aumJJ56wG0tJSdGIESPk7+8vV1dX1alTR7Nnz1Z2drZdXXZ2tubNm6dGjRrJzc1N1apVU9euXc2pLn/Vf84jp79NmzbZjbu6uuqOO+7QzJkzZRiG3TF3796t++67T+7u7qpYsaI6d+6sbdu25Xn+rnX06FF16tRJvr6+cnV1lb+/v5555hklJyebNTl9fPTRR7leX7FiRbvzlJycrOeff16NGjVSxYoV5e7urvvuu0979+61e11Bn/fjx4/LZrPpX//6V659NmzY0O7vPOf9bNq0ya4uPDw818/NtX3WqFFDISEhcnZ2lq+vb577+Cv33HNPnn/Xf/4Zlf5/atRf/Vzk2L17t7p27apq1arZ1XXr1u26vfz000+SpDZt2uTa5ubmJnd3d7uxI0eO6OGHH5aXl5fc3NwUHByszz77zNyelJSkatWq6Z577rH7ufzxxx9VoUIF9erV60anByh1uCINoED89NNP6tq1q1xdXbV+/XpVr149V83SpUv15JNPqkWLFpo5c6YSExM1b948fffdd9q9e3eeV/969Oihhx56SJK0ZcsWLV68+Lp9pKSkaObMmZbfx++//64OHTro9OnT+uc//6maNWtq69atGj9+vH799Ve7m9EGDhyopUuX6r777tNTTz2lK1euaMuWLdq2bZuCg4P1n//8x6zN6f31119X1apVJUk+Pj52x37xxRfVoEEDXbx4UStWrNCLL74ob29vDRw4UJJ08OBBtWvXTu7u7hozZozKli2rN998U/fcc4+++eYbtWzZ8i/fV0ZGhmrUqKEHHnhA7u7uOnDggBYuXKjTp09bmgf8888/a/Xq1XrkkUcUGBioxMREvfnmm+rQoYMOHTrk8JQBR87737F582Z98cUX+aqdM2eOEhMTHT5GjRo1zJ/B9PR0DR48+Lr11/5MvPzyy3bbUlNTdd9998kwDI0aNUr+/v6SpJEjR96wj4CAAEnS+++/r4kTJ+b5C02OgwcPqk2bNrrttts0btw4VahQQR9++KEiIiL08ccfq0ePHvL29taiRYv0yCOP6I033tCwYcOUnZ2tJ554QpUqVdK///3vG/YElDoGAFj07rvvGpKMNWvWGLVr1zYkGV26dMmz9vLly4a3t7fRsGFD4+LFi+b4mjVrDEnG5MmT7eqzsrIMSca0adNyHS8+Pt4ck2RMmTLFfD5mzBjD29vbaN68udGhQwdzfNq0aYYkIzs72+44AQEBRv/+/c3nL730klGhQgXjhx9+sKsbN26cUaZMGePEiROGYRjGxo0bDUnGsGHDcr3XPx/jr3rP8fXXXxuSjK+//tocu3TpkuHk5GQ8++yz5lhERITh4uJi/PTTT+bYmTNnjEqVKhnt27fPtd8befbZZ42KFSvm6mPlypW5aitUqGB3ni5dumRcvXrVriY+Pt5wdXU1pk+fbo4V9HmPj483JBmvvvpqrh7vvPNOu7/zvM5ry5Ytjfvuuy/Xz82UKVOMa/+XmJSUZFSqVMmsvXYf19O6dWujYcOG5vOzZ8/mOlaOt956y5Bk/PLLL+ZYhw4d7N7D+vXrDUnG//73P7vXBgQEGOHh4dft5ffffzfq1atnSDICAgKMJ554wnj77beNxMTEXLWdO3c2GjVqZFy6dMkcy87ONlq3bm3UrVvXrrZPnz5G+fLljR9++MF49dVXDUnG6tWrr9sLUFoxtQPA3/bEE0/o5MmTevTRR7VhwwatXLkyV82OHTuUlJSkZ5991m7edHh4uOrXr5/rpq6c+Zuurq757uP06dN64403NGnSJFWsWNFum7e3tyTp1KlT193HypUr1a5dO1WuXFnnzp0zH6Ghobp69ao2b94sSfr4449ls9k0ZcqUXPu43pW/60lNTdW5c+d04sQJRUZGKjs7W506dZIkXb16VRs2bFBERIRuv/128zXVq1fXo48+qm+//VZpaWn5OkZiYqJiYmK0du1atW/fPlfNhQsX7N77uXPnctW4urrKycnJ7O23335TxYoVVa9ePe3atcusK+jznuP333/P1eONVof55JNPtH37ds2aNeu6dZL00ksvycPDQ8OGDbth7bUuXbqU7/sC8vMzfuHCBUlSlSpVHOpD+mMVkri4OL3wwguS/vgXoYEDB6p69ep67rnnlJmZKemPaTobN27UP/7xD7u/+99++01hYWE6duyY3fSrBQsWyMPDQw8//LAmTZqkxx9/XA8++KDD/QGlAVM7APxtycnJ+uCDD9SjRw8dOnRIw4cPV5cuXezmSP/yyy+SpHr16uV6ff369fXtt9/ajaWkpEhSrkB8PVOmTJGfn5/++c9/5prnGxISIpvNpvHjx2vGjBnmfv887/nYsWPat2+fqlWrlucxkpKSJP0xlcXPz09eXl757u9GIiIizD87OTlp4sSJ6tmzpyTp7Nmz+v333/M8fw0aNFB2drZOnjypO++887rHCAsLU1xcnCSpa9euWrFiRa6aAQMG3LDXnPnh//73vxUfH28XYq8NfQV93nNMmTIlz19i/jxdJsfVq1f14osvqm/fvmrcuPF131t8fLzefPNNLVq0yOGbZc+dO6e6devmqzY/P+PBwcEqW7aspk6dqqpVq5pTO/58/v6Kh4eHIiMjFRkZqV9++UUxMTH617/+ZYbhGTNm6Mcff5RhGJo0aZImTZqU536SkpJ02223SZK8vLw0f/58PfLII/Lx8dH8+fPz1QtQGhGkAfxtr776qh555BFJ0uLFi9WqVSuNHz/+b82ZTEhIkCT5+vrmq/7w4cNaunSp/vvf/6ps2bK5tjdp0kRTpkzRtGnTtGzZsr/cT3Z2tu69916NGTMmz+133HFHvvqx4l//+peaNGmirKwsbd++XTNmzJCzs3OegdGqN954Q+fOndOhQ4c0c+ZMPfPMM/rvf/9rVzN58mS1a9fObuyBBx6we/7KK69o0qRJGjBggF566SV5eXnJyclJI0aMsAt5hXXeBw0aZP7M5Xj66af/cv9vv/22jh8/rvXr1/9lTY4JEyaobt266t+/v7Zs2XLD+hyXL1/Wr7/+qnvvvTdf9QkJCapYsaIqVKjwlzUBAQF69913NXz4cDVr1sxu241+IchrXwMGDFCPHj10++23a9myZZoxY4b59/X8888
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAskAAAJhCAYAAACzei1uAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB69UlEQVR4nO3deZyN9eP+8evM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PHixWrWrJkeffRR62sKFCig1q1b65dfflFSUlKm3uPEiRNatmyZ5s2bp5o1a6Ybc+HCBZvP/tdff6Ub4+3tLQ8PD2u206dPy9/fX8WLF9fWrVut47L6e09z+fLldBnvdBWVWbNmadOmTRo2bNhtx0nSu+++q8DAQHXv3v2OY2929erVTB+Dmpl1/MKFC5KkPHnyOJQjzc6dO7Vr1y61atXKOq1Vq1b666+/tGjRIuu0zZs36/Tp0+rYsaOyZfu/X9K2adNGDz30kM0yZ86cqZIlS6pEiRI233/aurpixQpJsq6POXPmzFRWX19f659v3Lih06dPKzw8XLly5bJZp25lyZIlOnfunPXzpT08PT1VtWpVa67jx49r165datu2rc12olatWipTpozNMufPny9PT89060GvXr1kjNGCBQtspteqVUsRERE204oVK6aqVavanDB55swZLViwQG3atLnr7QVwJxxuAbiAM2fOaNq0aXrmmWe0d+9evf7662rYsKECAwOtY37//XdJUvHixdO9vkSJEvrll19spp0
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAALzCAYAAADXrVs6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABxbklEQVR4nO3deVhUdeP+8XtQAVFACREwRBQ3cst9SU1Fccu1xaVcskxzDcul3Msse8olTVssykdTK7PSJ5dwy31fcMsFc8WNAEEFhfn90Y/5OuHCMeCM8n5d11wXc85nZu6Zsee5OXzO51isVqtVAAAAADLNyewAAAAAwIOGEg0AAAAYRIkGAAAADKJEAwAAAAZRogEAAACDKNEAAACAQZRoAAAAwCBKNAAAAGAQJRoAAAAwiBINAMhVEhMTNWXKFNv9uLg4zZgxw7xAAB5IlGgA9xQRESGLxaLt27dn2Pf555/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bMsY1Nzz558mR5e3tLkooWLWr32m+++abKly+va9euacGCBXrzzTfl4+OjXr16SZL279+v+vXry8PDQ0OHDlW+fPn06aef6sknn9TatWtVq1atO76vpKQkPfroo3rqqafk4eGhqKgozZgxQ2fOnLmveb/Hjx/X4sWL9cwzzygoKEjnz5/Xp59+qoYNG+rAgQPy9/c39HxGPvd/Y926dfrf//6XqbEffvihzp8/b/g1Hn30Udu/wcTERPXt2/eu42/9NzFhwgS7ffHx8WrRooWsVqvCw8MVEBAgSXrttdcM57r1Of/66y+VKlXKbntERIQKFiyo8PBwFSxYUKtWrdLo0aOVkJCgDz74wDZu5cqVat26tfz8/DRo0CD5+vrq4MGDWrJkiQYNGiTp73+r9erVU7FixTR8+HAVKFBACxcuVLt27fTDDz+offv2950fcHhWALiHr776yirJumTJEmupUqWskqzNmjW77diUlBSrj4+PtUKFCtZr167Zti9ZssQqyTp69Gi78Tdu3LBKso4bNy7D60VHR9u2SbKOGTPGdn/o0KFWHx8fa7Vq1awNGza0bR83bpxVkjUtLc3udQIDA63du3e33X/77betBQoUsP7xxx9244YPH27NkyeP9eTJk1ar1WpdtWqVVZJ14MCBGd7rP1/jTtnTrV692irJunr1atu269evW52cnKyvvvqqbVu7du2szs7O1mPHjtm2nT171uru7m5t0KBBhue9l1dffdVasGDBDDm+++67DGMLFChg9zldv37dmpqaajcmOjra6uLiYh0/frxtW1Z/7tHR0VZJ1g8++CBDxscee8zuO7/d51qrVi1rixYtMvy7GTNmjPXW/+u7cOGC1d3d3Tb21ue4m7p161orVKhgu3/x4sUMr5Xu888/t0qy/vnnn7ZtDRs2tHsPy5cvt0qyfvvtt3aPDQwMtLZq1eqeeSRZe/XqZb148aL1woUL1u3bt1ubN29+28/w6tWrGR7/yiuvWN3c3KzXr1+3Wq1W682bN61BQUHWwMBA619//WU39tbvuEmTJtaKFSvaHpe+v27dutbSpUvfMzfwIGM6B4BM69Gjh06dOqUuXbpoxYoV+u677zKM2b59uy5cuKBXX33Vbp50q1atVK5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j//85z+qXLmybty4oW3btumdd95R3rx5b1sW79fHH3+sS5cu6cCBA5o4caL69Omj//73v3ZjRo8erfr169tte+qpp+zuv/vuuxo1apRefPFFvf322/Ly8pKTk5MGDx5sV/Cy63Pv3bu37d9cupdffvmOzz979mydOHFCy5cvv+OYdG+99ZZKly6t7t276/fff7/n+HQpKSk6d+6cmjZtmqnxMTExKliwoAoUKHD
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAK4CAYAAACyMqGVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABtl0lEQVR4nO3deVhUZePG8XtAWVQWdyQRUdzXXDJySyOlLNe3LH0TDfO13LFcyt1Ms9dyTSt7Xdq0zCy1XMKtEvd9TQ3FDZcQEVQEZn5/eDE/JzA5xjgwfD/XNdfFnPPMzD3jlDfH5zzHZLFYLAIAAACQbS6ODgAAAADkNZRoAAAAwCBKNAAAAGAQJRoAAAAwiBINAAAAGESJBgAAAAyiRAMAAAAGUaIBAAAAgyjRAAAAgEGUaAAAAMAgSjQAIE9KSkrS1KlTrfcTEhI0a9YsxwVygJMnT8pkMmn+/PmGHztmzBiZTCZdvnw554P9xT/JCeRWlGggH5k/f75MJpN27NiRad8nn3wik8mk9u3bKz093QHpAGM8PT01YsQIffHFFzp9+rTGjBmj5cuXOzrWP2Iymay3AgUKqFixYqpfv74GDBigQ4cOOTrePX355Zc2v9gAzqyAowMAcLzvvvtOr776qpo2bapFixbJ1dXV0ZGAe3J1ddXYsWPVrVs3mc1meXt7a+XKlY6O9Y89+eST6tatmywWi65evaq9e/dqwYIF+vDDD/Xuu+8qMjLSOjYwMFA3btxQwYIFHZ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7ddfr0aXXp0kVr1qzRN998k2nMjh07dPHiRb322ms2cxnbtGmjqlWrZjqB69atW5Ikd3f3bOc4e/asZsyYoZEjR2Y6YlWqVClJ0pkzZ/72Ob755hs1bdpURYsW1eXLl6230NBQpaena9OmTZKkb7/9ViaTSaNHj870HFlNX8iOq1ev6vLly4qNjdXkyZNlNpvVsmVLSVJ6errWrFmj9u3bq0KFCtbHlClTRl26dNGvv/6qxMTEbL3GhQsXFBUVpZUrV6pZs2aZxly7ds3mvWe1ZJm7u7tcXFys2f78808VKVJEVapU0a5du6zjcvpzz3D9+vVMGe+1CszSpUu1fft2TZo06W/HSdL48ePl4+Oj/v3733PsnW7evJntubrZ+Y5fu3ZN0u3pF/aQ8d9JxutkxdPT0/rzzZs3dfnyZT366KOSZPNnnaFPnz429/v16ydJ1n8BWLp0qcxms55//nmbPz8/Pz9VqlRJ69evN/w+Ll26pE2bNunll19WuXLlbPbd73+PwIPGdA4gH4qPj9eiRYvUoUMHHTp0SAMGDFCrVq1s5kSfOnVKklSlSpVMj69atap+/fVXm20JCQmS/v6fb/9q9OjR8vf313/+859M83pDQkJkMpk0fPhwvf3229bn/es852PHjmnfvn0qWbJklq9x8eJFSbenr/j7+6tYsWLZzncv7du3t/7s4uKiESNGqFOnTpJul4Tr169n+flVq1ZNZrNZp0+fVo0aNf72NVq3bq2tW7dKksLCwrR48eJMY15++eV7Zs2YD/7hhx8qJibGpsDeWfhy+nPPMHr06Cx/gfnrFJkM6enpevPNN9W1a1fVrl37b99bTEyMPvroI82ePdvwyWuXL19WpUqVsjU2O9/xBg0aqGDBghozZoxKlChhnc7x18/vfiUlJUmSvLy87jomPj5eY8eO1aJFizL9OVy9ejXT+L++/4oVK8rFxcV6LsOxY8dksVju+jndz4obf/zxh6Tb8+KBvIoSDeRD7733np577jlJ0scff6xHH31Uw4cP14cffnjfzxkXFydJ8vPzy9b4w4cPa/78+fr888+z/Eu4Tp06Gj16tMaOHasvvvjirs9
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABYZUlEQVR4nO3deVhUZf/H8c8AsriACyKQqCia4p6aormTYK5p5ZZblmkuKVbqk7lWpmWpZfpUJpWYpo9LabmEW7mnuS+pobiBmgKCCgrn94cX83MElUMgoO/Xdc11Mff5zjnfOYz44XDPPRbDMAwBAAAAyDC7nG4AAAAAyGsI0QAAAIBJhGgAAADAJEI0AAAAYBIhGgAAADCJEA0AAACYRIgGAAAATCJEAwAAACYRogEAAACTCNEAgH8lPj5eU6dOtd6PiYnRjBkzcq6hB8hisWjgwIEP9JhNmjRRkyZNsm3/ZcqUUa9evbJt//cyduxYWSyWTD3WYrFo7NixWdsQcA+EaCAHhIaGymKx6I8//kiz7csvv5TFYlH79u2VnJycA90B5ri4uGjUqFEKCwvTqVOnNHbsWP3000853da/YrFYrDc7Ozt5e3urRYsWWr9+fU63lqN+/vlnWSwWeXt7KyUlJVP7uHr1qsaOHZvt53Lz5s0aO3asYmJisvU4eHQ55HQDAP7fkiVL1L9/fzVs2FDz58+Xvb19TrcE3Je9vb3GjRunHj16KCUlRa6urlqxYkVOt/WvPf300+rRo4cMw1BERIQ+//xzNWvWTCtWrFDLli1zrK/Vq1fn2LHDwsJUpkwZnThxQmvXrlVgYKDpfVy9elXjxo2TpDRX1EeNGqURI0Zkqrdr167JweH/Y83mzZs1btw49erVS4ULF87UPoF74Uo0kEusX79eXbp0kb+/v3766Sc5OzvndEtAhg0bNkwnT57U5s2bdfLkST311FM53dK/VqFCBb344ovq3r27Ro8erTVr1sgwDJupKznB0dFRjo6OD/y4CQk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oEDB9SwYUO5urrqrbfeUr58+fTf//5XTZo00YYNG1S3bt27Pq+EhASVLFlSbdq0kaurq/bv368ZM2bozJkzmZr3+/fff2vp0qV6/vnn5evrq+joaP33v/9V48aNdfDgQXl7e5van5nz/m9s3LhRP//8c4Zqp0yZoujoaNPHKFmypPU1GB8fr/79+9+z/vbXxHvvvWezLTY2Vi1btpRhGAoJCZGPj48kaejQoab7SnX58mVdvnxZfn5+NuO///67Fi9erNdee02FChXS9OnT1bFjR0VGRqpYsWJq0qSJfHx8FBYWpmeffdbmsWFhYSpXrpwCAgIkSR07dtSBAwc0aNAglSlTRufPn9eaNWsUGRmpMmXKpNtXcnKyWrdurfDwcHXu3Fmvv/66rly5ojVr1mj//v0qV66cJGnatGlq27atunXrpqSkJM2fP1/PP/+8li9frlatWt33+YeFhalp06by9PRU586dNWLECP300096/vnnM9xLYGCgZs6cqf79+9v8jKpWrVq6x+zUqZPGjh2rqKgoeXp62pzzs2fPqnPnzuk+rkOHDvrrr7/0/fff27xOihcvru7du+uVV17R/v37VaVKFetjduzYob/++kujRo2677kAJEkGgAduzpw5hiRj+fLlRrly5QxJRosWLdKtTUpKMjw8PIwqVaoY165ds44vX77ckGSMHj3apv7GjRuGJGPcuHFpjhcREWEdk2SMGTPGev+tt94yPDw8jFq1ahmNGze2jo8bN86QZKSkpNgcp3Tp0kbPnj2t9ydMmGAUKFDA+Ouvv2zqRowYYdjb2xuRkZGGYRjG2rVrDUnG4MGD0zzXO49xt95TrVu3zpBkrFu3zjp2/fp1w87OznjttdesY+3btzccHR2N48ePW8fOnj1rFCpUyGjUqFGa/d7Pa6+9ZhQsWDBNHwsXLkxTW6BAAZvzdP36dSM5OdmmJiIiwnBycjLGjx9vHcvq8x4REWFIMj788MM0PVauXNnme57eea1bt67RsmXLNK+bMWPGGLf/V3L+/HmjUKFC1trb93Ev9evXN6pUqWK9f+HChTTHSvXll18akoyTJ09axxo3bmzzHFatWmVIMr7//nubx5YuXdpo1arVffuRZPTp08e4cOGCcf78eWPbtm1G8+bNDUnGlClTbOocHR2NY8eOWcf27NljSDI+/fRT69jIkSMNJycnIyYmxjp2/vx5w8HBwfocL1++fNfv0e3ufK5ff/21Icn4+OOP09Te/vq5evWqzbakpCSjSpUqRrNmzWzG73yNGYZhREdHGw4ODsaXX35pHatfv77Rrl07m7qM9HKv7+2dr6cjR46kOZeG8f//Bm9/Tnfu88MPP0z3Z0dMTIzh7OxsDB8+3GZ88ODBRoECBYz4+Pg0fQHpYToHkIN69eqlU6dOqWvXrlq9erUWLlyYpuaPP/7Q+fPn9dprr9nMFWzVqpUqVqyY5g1cSUlJkiQnJ6cM93HmzBl9+umneuedd1SwYEGbbR4eHpKk06dP33MfCxcuVMOGDVWkSBFdvHjRegsMDFRycrI2btwoSfrf//4ni8WiMWPGpNlHZpe2io2N1cWLFxUZGanJkycrJSVFzZo1k3Trytjq1avVvn17lS1b1voYLy8vde3aVb///rvi4uIydIzo6GiFh4drxYoVatSoUZqaK1eu2Dz3ixcvpqlxcnKSnZ2dtbd//vlHBQsW1OOPP65du3ZZ67L6vKe6evVqmh7vtwrM4sWLtWPHDn3wwQf3rJOkCRMmyM3NTYMHD75v7e2uX7+e4bmwGXmNX7lyRZJUrFgxU33cbvbs2SpevLg8PDxUt25dbdq0SSEhIRoyZIhNXWBgoPVqr3Trqqqrq6v+/vtv61iPHj2UmJhoM31iwYIFunnzpl588UVJt1Y5cXR01Pr163X58uUM9/m///1P7u7uGjRoUJptt/+bcnFxsX59+fJlxcbGqmH
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAJbCAYAAAAi4si5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hA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QoODlb58uVt3tv0n8O1a9faHCs0NNTmDG6VKlXk5eWlEydOZMgzbdo0rV69OsNXlSpVbMYtWrRIaWlpev75520y+Pn5qWzZsjYZ8uTJY/3vpKQkXbx4UXXr1pVhGNq1a5fZt8xG9+7dbR43aNBAf//9d5b+nAHZhekcwH0mNjZW33//vVq3bq2DBw+qb9++atq0qc2c6D///FOSVK5cuQzfX758eW3atMlmW1xcnKSMBeBOhg4dKn9/f7322msZ5vWGhITIYrFo8ODB+uCDD6zHvXWe89GjR7V3714VKVIk0+c4f/68pH+mr/j7+6tgwYJZzvdvbl4lwMXFRe+9957atGkj6Z9VFq5cuZLp+xccHKy0tDSdPn1aFStWvONzhIWFadu2bZKkZs2aad68eRnGvPLKK/+aNX0++KeffqqoqCibAntz4bP3+55u6NChmf4D5tYpMulSU1P1zjvvqEOHDhlK262ioqL02Wefafr06aYvjL148aLKli2bpbFZ+RmvWbOmcufOrWHDhqlw4cLW6Ry3vn+Z8fT0lPTPlJKb/yy2adPGuqTcgAEDbD67o0eP6tC
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq8AAAIjCAYAAAAtE/I+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABOOUlEQVR4nO3deXxTVf7/8Xda2rRQWpRSoFpaFlkLsulYEerIUtkUFFFABcERR0QZRKbIAIWOFnBABVxxAEURWRRRCgUEZBVBLYsiAhZQVqvQUAqhtvf3h9N8CUn3QHL5vZ6PRx54zz333k9yIrx7e3JiMQzDEAAAAGACft4uAAAAACgpwisAAABMg/AKAAAA0yC8AgAAwDQIrwAAADANwisAAABMg/AKAAAA0yC8AgAAwDQIrwAAADANwisAXCWSkpJksVi8Xcb/d2JiYjRgwABvl1EqvFdgZoRX4H/eeOMNJSQkqHr16goICFCNGjUUHx+vd999V/n5+d4uD2U0YMAAhYSEFLrfYrHoySefvIIVOXvhhRe0ZMkSl/Y5c+bIYrE4HkFBQYqMjFRCQoKmTZumM2fOXPli/z+za9cu9erVS9HR0QoKCtJ1112njh07avr06d4uza2YmBin90xhjzlz5ni7VKBcLIZhGN4uAvAFcXFxqlmzpu644w6Fhobq9OnT+vLLLzV//nzdf//9+uCDD7xdIspgwIABWrRokbKzs93ut1gsGjJkiGbMmHGFK/tTSEiIevXq5RIo5syZo0ceeUQTJkxQ7dq1lZubq+PHj2vdunVatWqVatWqpaVLl6pZs2aOY/744w/98ccfCgoKusLP4uqzefNm/fWvf1WtWrXUv39/1ahRQz///LO+/PJLHThwQPv373f0jYmJ0e233+71ULhkyRKn93lqaqo++OADvfTSSwoPD3e033rrrapVqxbvFZhWBW8XAPiK9evXKyAgwKntqaeeUtWqVTVjxgylpKQoJibGO8XhqmIYhs6fP6/g4OBi+3bu3FmtW7d2bI8aNUpr1qxRt27ddNddd2nPnj2O81SoUEEVKvDXuic8//zzCgsL07Zt21SlShWnfSdPnvROUcXo0aOH0/bx48f1wQcfqEePHm7/7uK9ArNi2gDwP5cG1wIFf+n7+f3f/y6ffPKJunbtqsjISFmtVtWtW1fJycnKy8tzOvb22293+nVdeHi4unbtqt27dzv1s1gsSkpKcmp78cUXZbFYdPvttzu1nz9/XklJSapfv76CgoJUs2ZN3XPPPTpw4IAk6eDBg25/NThkyBBZLBanuXkFv5oODAzUr7/+6tR/y5Ytjrq3b9/utG/hwoVq1aqVgoODFR4ergcffFBHjhxxee1++OEH9e7dW9WqVVNwcLAaNGig0aNHS/q/OXdFPdatW+d4HWNjY13Of7nY7XaNGzdO9erVk9VqVVRUlEaOHCm73e7Ub/bs2brjjjsUEREhq9Wqxo0b6/XXX3c5X0xMjLp166a0tDS1bt1awcHBevPNN2WxWHT27Fm98847judckrmTd9xxh8aMGaNDhw7pvffec7S7m8e4atUq3XbbbapSpYpCQkLUoEEDPffcc5f1+W7fvl0JCQkKDw9XcHCwateurYEDBzr1yc/P18svv6wmTZooKChI1atX1+DBg3Xq1Klin78krVmzRm3btlWlSpVUpUoV3X333dqzZ4/La1GS95c7Bw4cUJMmTVyCqyRFREQUW9/p06c1bNgwRUVFyWq1ql69epo0aZLLFKSSvg4F76GVK1eqefPmCgoKUuPGjfXRRx8VW4s77t4rBVNoFi5cqMaNGys4OFhxcXHatWuXJOnNN99UvXr1FBQUpNtvv10HDx50Oe/WrVt15513KiwsTBUrVlR8fLw2bdpUphqBwvBjF3CJ06dP648//tCZM2f09ddf6z//+Y8eeOAB1apVy9Fnzpw5CgkJ0fDhwxUSEqI1a9Zo7NixstlsevHFF53O17BhQ40ePVqGYejAgQOaOnWqunTposOHDxdZQ0pKikt7Xl6eunXrps8//1wPPPCAnn76aZ05c0arVq3S7t27VbduXbfn279/v2bOnFno9fz9/fXee+/pH//4h6Nt9uzZCgoK0vnz5536Fvw6+6abblJKSopOnDihV155RZs2bdK3337r+Md+586datu2rQICAvTYY48pJiZGBw4c0Keffqrnn39e99xzj+rVq+c47z/+8Q81atRIjz32mKOtUaNGhdZcWpmZmSXql5+fr7vuuksbN27UY489pkaNGmnXrl166aWX9OOPPzrNT3399dfVpEkT3XXXXapQoYI+/fRTPfHEE8rPz9eQIUOczrt371716dNHgwcP1t/+9jc1aNBAc+fO1aOPPqqbb77Z8bwLG8NLPfTQQ3ruuee0cuVK/e1vf3Pb57vvvlO3bt3UrFkzTZgwQVarVfv373cKE55+vidPnlSnTp1UrVo1JSYmqkqVKjp48KBLyBo8eLDjvfTUU08pIyNDM2bM0LfffqtNmzYV+sOkJK1evVqdO3dWnTp1lJSUpHPnzmn69Olq06aNvvnmG8XExJT7/RUdHa0tW7Zo9+7dpf7BKScnR/Hx8Tpy5IgGDx6sWrVqafPmzRo1apSOHTuml19+uUyvw759+3T//ffr8ccfV//+/TV79mzd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l6fMzExlZmbqwoULpTo2KChIq1atcvu41MKFC9WoUSM1bNjQcb3MzEzdcccdkqS1a9c6+l78PsjKylJmZqbi4+P1008/KSsry+m8tWvXVkJCQqnqLk5ISEiRqw4U3AX/5JNPCl0xw9PPt+Can332mXJzcwu9ZlhYmDp27Oh0zVatWikkJMTpmpc6duyY0tPTNWDAAF177bWO9mbNmqljx45KTU0t9NjS6Nixo7Zs2aK77rpLO3bs0OTJk5WQkKDrrrtOS5cuLfLYhQsXqm3btrrmmmucnl+HDh2Ul5en9evXl+l
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABO60lEQVR4nO3deVhUdf//8deAAm7gikCi4pIr6u1yK5nmQqJhrpVbuWSZ5pJSuZS5VpRlqWXa4h1WWma3mWmi5lqKmlvu3mYoLuEOCCoqzO8Pf5yvE6h8CGTQ5+O65rqYz3nPOe85Tvby8DmfsdntdrsAAAAAZJpLbjcAAAAA5DWEaAAAAMAQIRoAAAAwRIgGAAAADBGiAQAAAEOEaAAAAMAQIRoAAAAwRIgGAAAADBGiAQAAAEOEaAAAAMAQIRoAkOclJiZqypQp1vO4uDhNnz499xrKQ8aNGyebzaYzZ87kditAnkKIBu5RERERstls2rJlS7ptn376qWw2mzp06KCUlJRc6A4wU6BAAY0ePVpz5szR0aNHNW7cOP3444+53Va2iIuLk4eHh2w2m/bt25fl/bz55ptauHBh9jUG3OMI0QAcfP/99xowYICaNGmib775Rq6urrndEnBbrq6uGj9+vHr27KmyZcvq888/1+jRo3O7rWwxf/582Ww2+fj4aM6cOVne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sbKwkycfHJ1P1+/btU0REhL766ivlz58/3fbatWtr7Ni
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABdYUlEQVR4nO3deVhUdf//8deAsqgsuSCghLjkvmtKZqaiaLjgUmaWZpZLLimVS5nrXajd5pJby32LduudS2UuiRpupbhr7t5mmCuoGSAuKMz5/eGP+TqCyiGMUZ+P65rrcj7nPee85wj64vA5n7EYhmEIAAAAQLY55XUDAAAAwIOGEA0AAACYRIgGAAAATCJEAwAAACYRogEAAACTCNEAAACASYRoAAAAwCRCNAAAAGASIRoAAAAwiRANAMhVKSkpmjx5su15YmKipk+fnncN/Y2OHz8ui8WiqKioe9a++uqrKlWq1H3v6X4ZNWqULBZLXrcB5BlCNOAAoqKiZLFYtGPHjkzbvvjiC1ksFoWHhys9PT0PugPMcXd31/DhwzVv3jydPHlSo0aN0rJly/K6rb/EYrGoX79+mcY/+ugjWSwWvfbaa7JarXnQWe7I+Dco4+Hm5iZ/f3+FhoZq6tSpunTpUl63CDicfHndAIA7++6779SnTx81bNhQX3/9tZydnfO6JeCenJ2dNXr0aHXt2lVWq1Wenp5asWJFXreV68aNG6f3339f3bp105dffiknJycFBgbq6tWryp8/f163lyNjxoxRUFCQbty4ofj4eK1fv14DBw7UJ598oqVLl6patWq22uHDh2vo0KF52C2QtwjRgINav369OnfurEqVKmnZsmVyc3PL65aAbHv77bfVqVMnnTx5UhUrVpS3t3det5SrPv74Yw0bNkxdu3bVv//9bzk53fzFbsZV3AdVy5YtVadOHdvzYcOGae3atWrVqpXatGmjQ4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gYaISFhd2zH0lGYGCgIcno3LmzkZaWlmVdxnmdPXu2baxGjRqGn5+fkZiYaBtbvXq1bZ+3v7ZIkSLGxYsXbePff/+9IclYtmyZbaxp06ZG1apVjWvXrtnGrFar8dRTTxnlypWzjX322WeGJOPQoUO2sevXrxtFixa1+7rJ+L7avn37Hc+Bl5eXUbNmTdvz2/+uJ02aZEgyzp8/f8d9fPXVV4aTk5Px008/2Y3PmjXLkGRs2rTJNnblypVMrw8NDTVKly5te/7dd9/ds++ffvrJkGTMmzfPbjw6OjrLcSC7mM4BOJBXX31VJ0+e1EsvvaTVq1dr0aJFmWp27Nihc+fO6c0337SbexkWFqYKFSpkuoHr+vXrkiRXV9ds93H69Gl9+umn+uCDD1SoUCG7bT4+PpKkU6dO3XUfixYtUsOGDfXYY4/pwoULtkdISIjS09O1ceNGSdI333wji8WikSNHZtpHTpfPSkpK0oULF3TixAlNmDBBVqtVTZo0kSSlp6dr9erVCg8PV+nSpW2v8fPz00svvaSff/5ZycnJ2TpGQkKCYmJitGLFCj3zzDOZai5dumT33i9cuJCpxtXV1XY1Mz09XX/88Yft1+C7du2y1eX2ec9w5cqVTD3eaxWYb7/9Vtu3b9e4cePuWidJY8eOlZeXlwYMGHDP2ltdu3Yt23OLs/M1nrG6RJEiRUz1cauMq+lBQUHZvsn37Nmz2rNnj7p162Y3LatZs2aqVKlSlq/p1KmTHnvsMdvzhg0bSrr5Wwvp5hSgtWvX6oUXXrD7Gvvjjz8UGhqqo0eP2qZ2vfDCC3Jzc9O8efNs+1u1apUuXLigl19+2cS7vzkV6W6rdGT8Buz777+/40o
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAIrCAYAAAApwMV4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0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ysgIECpqanavn27JOm7776TxWJRaGhohn2YueJ3p4SEBF26dEnR0dEKCwtTWlqamjdvLklKTU3Vxo0b1aFDB1WqVMm6TdmyZdW9e3f9+OOPWfpRckJCgmJjYxUeHq61a9eqadOmGWquXLli89kvXbqUocbR0dE69jM1NVWXL1+Ws7OzqlWrpv3791vrcvq8p7t69WqGHu83C8zy5cu1d+9eTZo06Z510u0rjK6urnrjjTfuW3un69evZ/k+gKx8x69cuSJJKlmypKk+pNuzjezevVvDhg2TdPsnQX379lXZsmU1ePBgpaSkZNhmy5YtCgwM1HPPPafly5dn+c9f7969ba7CNmnSRNLtn1hIsn43s3IVWrp9k2f6/tLS0hQXF6dbt26pQYMGNt+vdF26dFHx4sXvevyLFy9q+/bt6tOnjypUqGCzbfqfV8Mw9N1336lt27YyDMPmuxUYGKiEhIQMxw4ODr7vVXrgQWE4B/AIiIuL06JFi9SxY0cdO3ZMb775plq2bGkzJvq3336TJFWrVi3D9tWrV9ePP/5osyw+Pl6SsjR3bbrQ0FCVK1dOr732WoZxvf7+/rJYLBo1apQ++OAD637/Os751KlTOnT
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"# Список колонок для построения графиков\n",
"columns = ['BMI', 'Smoking', 'AlcoholDrinking', 'Stroke',\n",
" 'PhysicalHealth', 'MentalHealth', 'DiffWalking', 'Sex',\n",
" 'AgeCategory', 'Race', 'Diabetic', 'PhysicalActivity', 'GenHealth', 'SleepTime', 'Asthma', 'KidneyDisease', 'SkinCancer']\n",
"\n",
"# Создание диаграмм зависимости\n",
"for column in columns:\n",
" plt.figure(figsize=(8, 6)) # Установка размера графика\n",
" if pd.api.types.is_numeric_dtype(df[column]): # Проверяем, является ли колонка числовой\n",
" # Проверяем, содержит ли колонка только два уникальных значения (0 и 1)\n",
" if df[column].nunique() == 2 and set(df[column].unique()).issubset({0, 1}):\n",
" # Если да, то строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
" else:\n",
" # Если колонка числовая, создаем диаграмму рассеяния\n",
" plt.scatter(df['HeartDisease'], df[column], alpha=0.5) # Создаем диаграмму рассеяния\n",
" plt.title(f'Зависимость HeartDisease от {column}')\n",
" plt.xlabel('HeartDisease (0 = нет, 1 = да)')\n",
" plt.ylabel(column)\n",
" plt.xticks([0, 1]) # Установка меток по оси X\n",
" plt.grid() # Добавление сетки для удобства восприятия\n",
" else:\n",
" # Если колонка не числовая, строим столбчатую диаграмму\n",
" counts = df[column].value_counts() # Считаем количество повторений каждого значения\n",
" counts.plot(kind='bar') # Создаем столбчатую диаграмму\n",
" plt.title(f'Количество значений для {column}')\n",
" plt.xlabel(column)\n",
" plt.ylabel('Количество повторений')\n",
"\n",
" plt.show() # Отображение графика"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 23,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [],
"source": [
"# Функция для создания выборок\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"def split_stratified_into_train_val_test(\n",
" df_input,\n",
" stratify_colname=\"y\",\n",
" frac_train=0.6,\n",
" frac_val=0.15,\n",
" frac_test=0.25,\n",
" random_state=None,\n",
"):\n",
"\n",
" if frac_train + frac_val + frac_test != 1.0:\n",
" raise ValueError(\n",
" \"fractions %f, %f, %f do not add up to 1.0\"\n",
" % (frac_train, frac_val, frac_test)\n",
" )\n",
"\n",
" if stratify_colname not in df_input.columns:\n",
" raise ValueError(\"%s is not a column in the dataframe\" % (stratify_colname))\n",
"\n",
" X = df_input # Contains all columns.\n",
" y = df_input[\n",
" [stratify_colname]\n",
" ] # Dataframe of just the column on which to stratify.\n",
"\n",
" # Split original dataframe into train and temp dataframes.\n",
" df_train, df_temp, y_train, y_temp = train_test_split(\n",
" X, y, stratify=y, test_size=(1.0 - frac_train), random_state=random_state\n",
" )\n",
"\n",
" # Split the temp dataframe into val and test dataframes.\n",
" relative_frac_test = frac_test / (frac_val + frac_test)\n",
" df_val, df_test, y_val, y_test = train_test_split(\n",
" df_temp,\n",
" y_temp,\n",
" stratify=y_temp,\n",
" test_size=relative_frac_test,\n",
" random_state=random_state,\n",
" )\n",
"\n",
" assert len(df_input) == len(df_train) + len(df_val) + len(df_test)\n",
"\n",
" return df_train, df_val, df_test"
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 24,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HeartDisease\n",
2024-10-11 18:29:39 +04:00
"0 53\n",
"1 47\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n",
"\n",
2024-10-11 18:29:39 +04:00
"Обучающая выборка: (60, 2)\n",
2024-10-10 22:31:48 +04:00
"HeartDisease\n",
2024-10-11 18:29:39 +04:00
"0 32\n",
"1 28\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n"
]
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAADECAYAAABN9CGiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA6NklEQVR4nO3dd3hTZfsH8G+StulIW7pbymhtmQVBy1BWi8xSXmRIRTYooICoqAivyhJEBRkiS2QJ5VUKCoKyh7IR2btAQVY33aQjeX5/9JfYNElpIe3p+H6uKxf05DnPuc/JycmdZ5zIhBACRERERBKRSx0AERERVW1MRoiIiEhSTEaIiIhIUkxGiIiISFJMRoiIiEhSTEaIiIhIUkxGiIiISFJMRoiIiEhSVlIHQERElqNWq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OSEgQAMSUKVP0y27duiUUCoWYOXOmwbrnz58XVlZWRsujo6MFALFmzRr9silTpoiCL8vBgwcFABEZGWmw7o4dO4yW165dW4SHhxvFPmbMGFH4pS4c+4QJE4Snp6cIDg42OKZr164VcrlcHDx40GD9pUuXCgDi8OHDRtsrKCQkRF/fb7/9JqysrMT7779vsmxxjocQ+a9TQTk5OaJRo0bipZdeMqhLLpeLXr16GZ2Lutc8JSVFODo6ipYtW4pHjx6ZLJOTkyM8PT1Fo0aNDMps27ZNABCTJ0/WLxsyZIioXbu2QT3fffedACBOnDhhcp8L72dRj4KvbUnOi8LHSwghRo0aJez
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-10-11 18:29:39 +04:00
"Контрольная выборка: (20, 2)\n",
2024-10-10 22:31:48 +04:00
"HeartDisease\n",
2024-10-11 18:29:39 +04:00
"0 11\n",
"1 9\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n"
]
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi8AAADECAYAAABXyMEsAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA58ElEQVR4nO3dd3QUZdsG8GtLsimbQAppgBACoTdDh5CotAACUiJNKVKkCIqKL4pSBHkV6RBBXwUELBQpIl1A6RggoSNgQk+F9Gw2yT7fH/l2zWY3pJBkssn1OyfnZGdnnrlndmb2nqfMyoQQAkREREQWQi51AERERERFweSFiIiILAqTFyIiIrIoTF6IiIjIojB5ISIiIovC5IWIiIgsCpMXIiIisihMXoiIiMiiMHkhIiKqgIQQePz4MW7evCl1KCWOyQsRlal169ZBJpMhMjJS6lCIiuXy5cvYsWOH4X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J9u2LBByOVycezYMaPlV69eLQCIEydOmKwvt4CAAEN5v/32m1AqleLdd981O29h9ocQOZ9TblqtVjRp0kS8+OKLRmXJ5XLxyiuvmByL+s88ISFBODg4iLZt24r09HSz82i1WuHm5iaaNGliNM/u3bsFAPHJJ58Ypo0YMULUqlXLqJyvv/5aABBnz541u815t/Npf7k/26IcF3n3lxBCjB8/XtjZ2QmNRmOYFhAQIACI1atXm8yf91zT059zW7ZsyXfbmjdvLpycnAyv9deRiIgIIYQQ27dvFwDEX3/9lW8ZJb29Fy5
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-10-11 18:29:39 +04:00
"Тестовая выборка: (20, 2)\n",
2024-10-10 22:31:48 +04:00
"HeartDisease\n",
2024-10-11 18:29:39 +04:00
"1 10\n",
"0 10\n",
2024-10-10 22:31:48 +04:00
"Name: count, dtype: int64\n"
]
},
{
"data": {
2024-10-11 18:29:39 +04:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAg0AAADECAYAAAAcYBLBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA0OklEQVR4nO3dd1wT9/8H8FcSRoAAgky1KuLeFTcibkSss1pXVdTqr44O29qvbZ3VWmvr+FpH22+r1tohWrV2KM66rXvvigOVpWxCIPn8/qBJCQlwKHiAr+fjwYNHLjfed7m7vO4+dxeFEEKAiIiIqBBKuQsgIiKisoGhgYiIiCRhaCAiIiJJGBqIiIhIEoYGIiIikoShgYiIiCRhaCAiIiJJGBqIiIhIEoYGIiKiYpaYmIjr168jOztb7lKKFUMDET1Vq1evhkKhQFRUlNylUBlz9+5drF692vQ6KioK69atk6+gXLKysvDJJ5+gSZMmsLe3h5ubG2rVqoVdu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v6zOc975LOgv92dblPUi7/ISQohx48YJR0dHodVqTd2Cg4MFALFy5UqL/vNua0bGbS4iIiLfeWvSpIlwc3MzvTbuR27evCmEEGLTpk0CgDh27Fi+4yju+T116lShdRd1e87L2robGRkpAIj169cXOGxu1apVEyNGjLDoXpT92PDhw4VSqbS6jHMPa5R7u82radOmwsvLSyQkJJi6nTlzRiiVSjF8+HBTNynz/yTb1/nz54VSqRShoaFm61N+pG6f+e1HjYzr/J49e8xee3h4iPj4eFN/V69eFba2tqJ///6mbn369BF
2024-10-10 22:31:48 +04:00
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Вывод распределения количества наблюдений по меткам (классам)\n",
"print(df.HeartDisease.value_counts())\n",
"print()\n",
"\n",
"data = df.copy()\n",
"\n",
"df_train, df_val, df_test = split_stratified_into_train_val_test(\n",
" data, stratify_colname=\"HeartDisease\", frac_train=0.60, frac_val=0.20, frac_test=0.20\n",
")\n",
"\n",
"print(\"Обучающая выборка: \", df_train.shape)\n",
"print(df_train.HeartDisease.value_counts())\n",
"counts = df_train['HeartDisease'].value_counts()\n",
"plt.figure(figsize=(2, 2))# Установка размера графика\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)# Построение круговой диаграммы\n",
"plt.title('Распределение классов HeartDisease в обучающей выборке')# Добавление заголовка\n",
"plt.show()# Отображение графика\n",
"\n",
"print(\"Контрольная выборка: \", df_val.shape)\n",
"print(df_val.HeartDisease.value_counts())\n",
"counts = df_val['HeartDisease'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов HeartDisease в контрольной выборке')\n",
"plt.show()\n",
"\n",
"print(\"Тестовая выборка: \", df_test.shape)\n",
"print(df_test.HeartDisease.value_counts())\n",
"counts = df_test['HeartDisease'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов HeartDisease в тестовой выборке')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Сбалансируем распределение:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Балансировка данных оверсемплингом. Это метод, увеличивающий число наблюдений в меньшинственном классе для достижения более равномерного распределения классов."
]
},
{
"cell_type": "code",
2024-10-11 18:29:39 +04:00
"execution_count": 25,
2024-10-10 22:31:48 +04:00
"metadata": {},
"outputs": [
{
2024-10-11 18:29:39 +04:00
"ename": "ValueError",
"evalue": "A given column is not a column of the dataframe",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\pandas\\core\\indexes\\base.py:3805\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m 3804\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m-> 3805\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_engine\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcasted_key\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 3806\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n",
"File \u001b[1;32mindex.pyx:167\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
"File \u001b[1;32mindex.pyx:196\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
"File \u001b[1;32mpandas\\\\_libs\\\\hashtable_class_helper.pxi:7081\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n",
"File \u001b[1;32mpandas\\\\_libs\\\\hashtable_class_helper.pxi:7089\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n",
"\u001b[1;31mKeyError\u001b[0m: 'Smoking'",
"\nThe above exception was the direct cause of the following exception:\n",
"\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\utils\\_indexing.py:361\u001b[0m, in \u001b[0;36m_get_column_indices\u001b[1;34m(X, key)\u001b[0m\n\u001b[0;32m 360\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m col \u001b[38;5;129;01min\u001b[39;00m columns:\n\u001b[1;32m--> 361\u001b[0m col_idx \u001b[38;5;241m=\u001b[39m \u001b[43mall_columns\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcol\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 362\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(col_idx, numbers\u001b[38;5;241m.\u001b[39mIntegral):\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\pandas\\core\\indexes\\base.py:3812\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m 3811\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m InvalidIndexError(key)\n\u001b[1;32m-> 3812\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(key) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01merr\u001b[39;00m\n\u001b[0;32m 3813\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m:\n\u001b[0;32m 3814\u001b[0m \u001b[38;5;66;03m# If we have a listlike key, _check_indexing_error will raise\u001b[39;00m\n\u001b[0;32m 3815\u001b[0m \u001b[38;5;66;03m# InvalidIndexError. Otherwise we fall through and re-raise\u001b[39;00m\n\u001b[0;32m 3816\u001b[0m \u001b[38;5;66;03m# the TypeError.\u001b[39;00m\n",
"\u001b[1;31mKeyError\u001b[0m: 'Smoking'",
"\nThe above exception was the direct cause of the following exception:\n",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[25], line 20\u001b[0m\n\u001b[0;32m 17\u001b[0m ada \u001b[38;5;241m=\u001b[39m ADASYN()\n\u001b[0;32m 19\u001b[0m \u001b[38;5;66;03m# Преобразование данных с помощью пайплайна\u001b[39;00m\n\u001b[1;32m---> 20\u001b[0m X \u001b[38;5;241m=\u001b[39m \u001b[43mpreprocessor\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfit_transform\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdf_train\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdrop\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcolumns\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mHeartDisease\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 21\u001b[0m y \u001b[38;5;241m=\u001b[39m df_train[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mHeartDisease\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[0;32m 23\u001b[0m \u001b[38;5;66;03m# Применение ADASYN\u001b[39;00m\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\utils\\_set_output.py:316\u001b[0m, in \u001b[0;36m_wrap_method_output.<locals>.wrapped\u001b[1;34m(self, X, *args, **kwargs)\u001b[0m\n\u001b[0;32m 314\u001b[0m \u001b[38;5;129m@wraps\u001b[39m(f)\n\u001b[0;32m 315\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mwrapped\u001b[39m(\u001b[38;5;28mself\u001b[39m, X, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m--> 316\u001b[0m data_to_wrap \u001b[38;5;241m=\u001b[39m \u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mX\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 317\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(data_to_wrap, \u001b[38;5;28mtuple\u001b[39m):\n\u001b[0;32m 318\u001b[0m \u001b[38;5;66;03m# only wrap the first output for cross decomposition\u001b[39;00m\n\u001b[0;32m 319\u001b[0m return_tuple \u001b[38;5;241m=\u001b[39m (\n\u001b[0;32m 320\u001b[0m _wrap_data_with_container(method, data_to_wrap[\u001b[38;5;241m0\u001b[39m], X, \u001b[38;5;28mself\u001b[39m),\n\u001b[0;32m 321\u001b[0m \u001b[38;5;241m*\u001b[39mdata_to_wrap[\u001b[38;5;241m1\u001b[39m:],\n\u001b[0;32m 322\u001b[0m )\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\base.py:1473\u001b[0m, in \u001b[0;36m_fit_context.<locals>.decorator.<locals>.wrapper\u001b[1;34m(estimator, *args, **kwargs)\u001b[0m\n\u001b[0;32m 1466\u001b[0m estimator\u001b[38;5;241m.\u001b[39m_validate_params()\n\u001b[0;32m 1468\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m config_context(\n\u001b[0;32m 1469\u001b[0m skip_parameter_validation\u001b[38;5;241m=\u001b[39m(\n\u001b[0;32m 1470\u001b[0m prefer_skip_nested_validation \u001b[38;5;129;01mor\u001b[39;00m global_skip_validation\n\u001b[0;32m 1471\u001b[0m )\n\u001b[0;32m 1472\u001b[0m ):\n\u001b[1;32m-> 1473\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfit_method\u001b[49m\u001b[43m(\u001b[49m\u001b[43mestimator\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\compose\\_column_transformer.py:968\u001b[0m, in \u001b[0;36mColumnTransformer.fit_transform\u001b[1;34m(self, X, y, **params)\u001b[0m\n\u001b[0;32m 965\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_validate_transformers()\n\u001b[0;32m 966\u001b[0m n_samples \u001b[38;5;241m=\u001b[39m _num_samples(X)\n\u001b[1;32m--> 968\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate_column_callables\u001b[49m\u001b[43m(\u001b[49m\u001b[43mX\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 969\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_validate_remainder(X)\n\u001b[0;32m 971\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m _routing_enabled():\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\compose\\_column_transformer.py:536\u001b[0m, in \u001b[0;36mColumnTransformer._validate_column_callables\u001b[1;34m(self, X)\u001b[0m\n\u001b[0;32m 534\u001b[0m columns \u001b[38;5;241m=\u001b[39m columns(X)\n\u001b[0;32m 535\u001b[0m all_columns\u001b[38;5;241m.\u001b[39mappend(columns)\n\u001b[1;32m--> 536\u001b[0m transformer_to_input_indices[name] \u001b[38;5;241m=\u001b[39m \u001b[43m_get_column_indices\u001b[49m\u001b[43m(\u001b[49m\u001b[43mX\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcolumns\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 538\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_columns \u001b[38;5;241m=\u001b[39m all_columns\n\u001b[0;32m 539\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_transformer_to_input_indices \u001b[38;5;241m=\u001b[39m transformer_to_input_indices\n",
"File \u001b[1;32mc:\\Users\\K\\source\\repos\\AIM-PIbd-31-Ievlewa-M-D\\aimenv\\Lib\\site-packages\\sklearn\\utils\\_indexing.py:369\u001b[0m, in \u001b[0;36m_get_column_indices\u001b[1;34m(X, key)\u001b[0m\n\u001b[0;32m 366\u001b[0m column_indices\u001b[38;5;241m.\u001b[39mappend(col_idx)\n\u001b[0;32m 368\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m--> 369\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mA given column is not a column of the dataframe\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[0;32m 371\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m column_indices\n",
"\u001b[1;31mValueError\u001b[0m: A given column is not a column of the dataframe"
2024-10-10 22:31:48 +04:00
]
}
],
"source": [
"from imblearn.over_sampling import ADASYN\n",
"from sklearn.compose import ColumnTransformer\n",
"from sklearn.preprocessing import OneHotEncoder\n",
"\n",
"categorical_features = ['Smoking', 'AlcoholDrinking', 'Stroke', 'DiffWalking', 'Sex', 'AgeCategory', 'Race', 'Diabetic', 'PhysicalActivity', 'GenHealth', 'Asthma', 'KidneyDisease', 'SkinCancer'] # Ваши категориальные признаки\n",
"numeric_features = ['BMI', 'PhysicalHealth', 'MentalHealth', 'SleepTime'] # Ваши числовые признаки\n",
"\n",
"# Создание пайплайна для обработки категориальных данных\n",
"preprocessor = ColumnTransformer(\n",
" transformers=[\n",
" ('cat', OneHotEncoder(), categorical_features), # OneHotEncoder для категориальных данных\n",
" ('num', 'passthrough', numeric_features) # Оставляем числовые колонки без изменений\n",
" ]\n",
")\n",
"\n",
"# Создание экземпляра ADASYN\n",
"ada = ADASYN()\n",
"\n",
"# Преобразование данных с помощью пайплайна\n",
"X = preprocessor.fit_transform(df_train.drop(columns=['HeartDisease']))\n",
"y = df_train['HeartDisease']\n",
"\n",
"# Применение ADASYN\n",
"X_resampled, y_resampled = ada.fit_resample(X, y)\n",
"\n",
"# Создание нового DataFrame\n",
"df_train_adasyn = pd.DataFrame(X_resampled)\n",
"# Восстанавливаем названия столбцов для DataFrame\n",
"ohe_columns = preprocessor.named_transformers_['cat'].get_feature_names_out(categorical_features)\n",
"new_column_names = list(ohe_columns) + numeric_features\n",
"df_train_adasyn.columns = new_column_names\n",
"\n",
"# Добавление целевой переменной\n",
"df_train_adasyn['HeartDisease'] = y_resampled\n",
"\n",
"# Вывод информации о новой выборке\n",
"print(\"Обучающая выборка после oversampling: \", df_train_adasyn.shape)\n",
"print(df_train_adasyn['HeartDisease'].value_counts())\n",
"\n",
"# Визуализация\n",
"counts = df_train_adasyn['HeartDisease'].value_counts()\n",
"plt.figure(figsize=(6, 6))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов HeartDisease в тренировочной выборке после ADASYN')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Балансировка данных андерсемплингом. Этот метод помогает сбалансировать выборку, уменьшая количество экземпляров класса большинства, чтобы привести е г о в соответствие с классом меньшинства."
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка после undersampling: (32848, 18)\n",
"HeartDisease\n",
"No 16424\n",
"Yes 16424\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqwAAADCCAYAAACMo5AzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABG8ElEQVR4nO3deXwM9/8H8NfskTsSSYSIOxJXJIJEaBxRilJ+pVpXSqtFVdXV4kvV3ZYoIaSOOuJWtNqi6iiKEtRdxFVHIpH7PnZ35vdHutOs3CXZxev5eOyDzOzMvGd25jPv+czn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z1119YunQprl69ilWrVsllVZUqVRAaGgpRFBETE4OlS5di1KhROHjwIBQKRYnzeVqys7MxYMAAJCQkYPTo0XB1dcWBAwcwZcoUxMfHY8SIEYVOV1h5V5T27dtj5MiR0Gg0uHXrFubNm4c5c+YgODi4zPFGRUVBrVZj8ODBaN68ORYuXIjExEQsXLgQly9fxnfffQcLCwucPHkS7733Hlq1aoW5c+ciJycHy5cvR79+/bBt2zaDsr6k/Sy/TZs2IT4+HuvWrYOZmdkTn1O2bt0q///xMrw0ZWtpynA9/TGq99Zbb8n/z8nJweDBgxEfH4+xY8fC2dkZO3bswHvvvYdVq1ahdevWZfiViieKIsaMGYMhQ4ZgzJgx2L59O+bNmwcPDw+0bdsWoijivffeQ1RUFCZOnAh7e3usWrUKly5dgrOzszyf0uYF0dHROHLkCBYuXIjk5GQ
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from imblearn.under_sampling import RandomUnderSampler\n",
"\n",
"rus = RandomUnderSampler()# Создание экземпляра RandomUnderSampler\n",
"\n",
"# Применение RandomUnderSampler\n",
"X_resampled, y_resampled = rus.fit_resample(df_train.drop(columns=['HeartDisease']), df_train['HeartDisease'])\n",
"\n",
"# Создание нового DataFrame\n",
"df_train_undersampled = pd.DataFrame(X_resampled)\n",
"df_train_undersampled['HeartDisease'] = y_resampled # Добавление целевой переменной\n",
"\n",
"# Вывод информации о новой выборке\n",
"print(\"Обучающая выборка после undersampling: \", df_train_undersampled.shape)\n",
"print(df_train_undersampled['HeartDisease'].value_counts())\n",
"\n",
"# Визуализация распределения классов\n",
"counts = df_train_undersampled['HeartDisease'].value_counts()\n",
"plt.figure(figsize=(2, 2))\n",
"plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=90)\n",
"plt.title('Распределение классов HeartDisease в тренировочной выборке после Undersampling')\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "aimenv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}