AIM-PIbd-31-Ievlewa-M-D/lab2/lab2.ipynb

3185 lines
1.6 MiB
Plaintext
Raw Normal View History

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",
"execution_count": 43,
"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 "
]
},
"execution_count": 43,
"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",
"execution_count": 44,
"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",
"execution_count": 45,
"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",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABVF0lEQVR4nO3de5zMdf//8efM7qxlneWQc1SItbbWKeRY+ZIkuepSOZQc115Kl7YroaSIDVnkGKEUivwoRU7JuYisDkjL5dhirT3N7szvj712LmMPxprZz3y6Hvfbzc01n89rP5/XzE6X57zn/Xl/LE6n0ykAAADAZKxGNwAAAAAUBEEWAAAApkSQBQAAgCkRZAEAAGBKBFkAAACYEkEWAAAApkSQBQAAgCkRZAEAAGBKBFkAAHyEew4BvhVodAMA/mvr1q1677339Ouvv8piseiuu+7SsGHDFBYWZnRrkNSuXTudPHnSbVtQUJAqVaqkjh07KjIyUkWKFDGoO2M9/fTTkqRFixYZ3EnB7d27VwsWLND333+vxMREVahQQc2bN1ffvn1Vu3btAh3vvffe05w5c3zQLQCJIAv4jU2bNmngwIFq06aN3n77bUlZoeDJJ5/UggULFBERYXCHkKTWrVtr8ODBrsdpaWnauXOnZsyYoZMnT+qdd94xsDvjjB492ugWbsrs2bP1zjvvqGXLlvrXv/6l8uXL6/jx4/roo4/UrVs3vfXWW+rcufMNHXPZsmU6cuSIjzoGIBFkAb8RExOjsLAwzZw5UxaLRZJ07733qn379lq8eDFB1k+ULVtWjRo1ctvWtGlTnT59Wp9++qmio6NVoUIFY5oz0O233250CwW2ceNGxcTEaOjQoYqMjHRtb9KkiR555BENHz5c0dHRuvPOO3XHHXcY2CmAazFHFvADqampqlKlinr06OEKsVLW19YlSpSQ3W53q42JidEDDzygBg0a6O6771bfvn0VFxfnqomOjladOnVcfxo1aqQnnnhCP/30k6vm6aefdn0dnC0mJkZ16tTRp59+6tp29OhRRUZGqkmTJmrcuLEGDBjgGmU6ceJEjvq0tDS1b99ederUcTtXnTp11LdvX7fzZWZmqkWLFjmO8fvvvysqKkotWrRQo0aN9PTTT2vv3r1uP5uUlKSxY8eqVatWatSokbp3765Nmza5nS+3Pzt37tSnn36qOnXq6MSJE9f/5XioQYMGcjqdOnXqlKSsaQhvvvmmevfurYYNG+qVV16RJF28eFGjRo3Svffeq9DQUP3tb3/T9u3bczy3UaNGqXnz5goPD9fzzz+vBQsW5HhNX3nlFc2ePVtt2rRRaGionnjiCf34449ux1q/fr169uyp8PBwNWjQQB07dtSSJUtc+3fu3Kk6depo+/bteuaZZxQWFqYWLVpo4sSJyszMdNWlp6drypQpat++vRo2bKiHHnpIn332mVs/V7+fHA6HZs+erfvvv18NGjTQgw8+mGPawR9//KGBAweqadOmCgsL0+OPP67Nmzfn+zpnZmZqyZIl6tKlixo2bKg2bdpo0qRJSktLc73uef3u8/p9x8bGqlatWhoyZEiOfTabTa+//roCAgJcUwRye99LWf/dtWvXzvW/P/vsM508edKtNr/3rSfPL/vYzz77rD7++GN16NBBDRs21BNPPKFjx45p48aN6tKli8LCwtSjRw+3/1+QpD179uipp55SWFiYmjRpopdeekkJCQn5vuaAP2NEFvADwcHBeu+991yP09PTdenSJS1evFhHjx7ViBEjXPtGjBihPXv26IUXXlD16tV1/PhxTZ06VcOHD9eaNWtcQbh8+fKKjY2Vw+HQ6dOnNX36dEVGRmrDhg2yWnN+hv3jjz+0YMECt21nzpzR448/rooVK2rMmDEqVqyYpk2bpt69e+v//b//l+tzmTt3bq6BISQkRLt379bly5dVokQJSdKuXbty/CP622+/6W9/+5tq1qypkSNHymaz6YMPPlDv3r01f/58NWnSRJmZmXrmmWdcgbdWrVr67LPPNGTIEC1cuFCjR49WUlKSJOnxxx/XY489ph49ekjKGjm8dp6rNxw7dkySVK1aNde2JUuWqG/fvnruuecUEhKitLQ09e7dW+fPn9fzzz+vChUqaMWKFerXr5/mzp2r5s2bS5IGDx6suLg4Pf/886pcubI+/PBDxcTE5DjnunXrVLt2bY0cOVJOp1MTJkzQ0KFD9c033yggIECbNm3SkCFD1KtXLw0dOlSpqan68MMP9frrr6tBgwZuc69ffPFF9ezZU88995w2bdqkuXPnqlq1anriiSdc+zdv3qxBgwYpLCxMmzdvVnR0tGw2mx566KEcvY0ZM0affvqpBgwYoPDwcO3evVtvvvmmEhMTNWTIEDkcDg0YMEAVKlTQ22+/rcDAQH3wwQcaNGiQvvjiC9WoUSPX13nUqFFatWqVnnvuOUVEROjQoUOaPn264uLiNHfuXMXGxio9PV3nzp1TZGSkBg0apDZt2khSriPlCQkJOnjwoJ599lm3D5FXK126tO69915t2LAh1/25GTx4sBISEnTo0CHFxsaqevXq133fRkREXPf5Zff4ww8/6OzZs4qOjlZaWprGjBmj/v37y2KxKCoqSkWLFtXo0aP14osvas2aNZKk3bt3q2/fvmrWrJmmTJmiS5cuaerUqerVq5eWL1+u4OBgj58f4C8IsoAf6ty5s/744w9J0oMPPqgWLVpIygq4V65c0ciRI9WpUydJWV9/JiUlafz48Tp//rzKly8vKWs09+qvwBMSEjR27FglJCTolltuyXHON998U3fccYfbqO2CBQuUnp6u999/33XcunXr6u9//7v279+f4wKYU6dOac6cOapfv77bcSTprrvu0u+//64tW7a45hquXbtWjRs31s6dO111sbGxCgoK0gcffKDixYtLktq0aaOHHnpIb7/9tpYvX64tW7Zo//79mj59ujp06CBJatasmeLj47Vjxw63r4clqVKlSjmmAxSU0+lURkaG6/Gff/6pLVu2aOnSperUqZPKli3r2le5cmW9+OKLrseffPKJDh8+rE8++cQVIu+77z49/fTTmjRpklasWKHt27dr586dmjZtmh544AFXzUMPPZRjvmVGRobmzZvnep2uXLmil156SXFxcWrQoIF+++03devWzTUaLEnh4eFq2rSpdu7c6RZke/To4RqRbN68udavX69NmzbpiSee0C+//KJ169bpX//6l3r37u2qOXnypHbu3JkjyB47dkyffPKJXnjhBfXv31+S1LJlS1ksFs2aNUs9e/ZURkaGjh49qsGDB6t169aSpIYNG7qCaG5+++03LV++XMOHD3cdt0WLFqpQoYJGjBihLVu2uI6V/WGqevXq+f7usz/UVKlSJc8aSapRo4Y2bNigS5cu5VuXrXr16ipbtqzbf4cbN27M931bunRpj5/flStXNGXKFNd/g7t27dLSpUu1YMEC1wei48ePa8KECUpMTFTJkiUVExOj2267TbNmzVJAQIAkKSwsTJ07d9aKFSv05JNPevTcAH/C1ALAD02fPl2zZ8/WU089pa+//lrDhg2TlBVO582bp06dOunMmTPasWOHli5dqo0bN0pSjgCQkZEhu92uU6dOae3atapSpYpb0Mq2ZcsWfffdd3rppZfctu/du1eNGjVyhVgpKxRu3LjR9Q/q1SZMmKCIiAi1bds2xz6LxaK2bdu6RrUyMjL01Vdf5biAZteuXWrbtq0rnElSYGCgOnfurIMHD+rKlSvau3evbDab62tcSbJarVq6dGmOEJsfh8Ph9vW5J1auXKn69eu7/tx3330aM2aM2rdvn+OCp3r16rk93r59u8qXL6/69esrIyNDGRkZyszMVNu2bXXw4EFdunRJO3bskM1mcwWd7OeW/cHlarfffrvb61SxYkVJUkpKiiSpX79+Gj9+vK5cuaKDBw9q7dq1mjVrlqSc75Xw8HC3x5UqVVJycrIkuaZ1ZAfrbNOmTdPYsWNz9LVjxw45nU61a9fO9TwzMjLUrl07paWlae/evbrlllt0++2369V
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAImCAYAAABTm0IfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24z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QL/+c9/wn5eTX82btyIDz74AJ07d8bhw4fr/8c5wZIlS5CZmYmHH364xvujR4/GsGHD4Ha7a7w/depUDB06NOxaTa9hYWEhHnnkEQwcOBC9e/fGyJEj8fPPP4fue71eLFmyBJdffjmys7Nx2WWX4aWXXoIsy6GaQ4cOYcKECejfvz969uyJG2+8sdoo5++//47x48fj3HPPxbnnnot7770Xubm59b4O//3vf3HLLbfgvPPOQ//+/TF58mTk5eWFnmNtr/2Jz/FEq1evRmVlJf75z3+GBd0qY8aMQa9evbB06dLQ/NuhQ4di6tSpYXUn/rt+8MEHmDZtGgBg2LBhoVpFUbB69Wr89a9/RY8ePXDppZdi5cqVYfN663p+VT8nOzsbW7ZswYgRI5CdnY2//OUv+Pbbb7Fv3z7cdttt6NmzJy699FJ8+umnYT0ePXoUDz74IPr164eePXvitttuQ05OTr2vOVFTxrBLdBYwm8148cUXcf311wMAfD4fioqK8Nxzz2Hfvn1ho1lTpkzB+++/j7vuugurVq3CtGnT8Mcff2Dy5Mlh/w87NTUVb7/9Nt566y3Mnj0bFRUVmDhxYlggOtGhQ4ewevXqsGsFBQW48cYbceDAATz++ON45plncOzYMdx2221wOBw1Ps6KFStqDJFWqxWbN29GRUVF6NqmTZtQUlISVrdnzx5cd911OHz4MKZPn4558+ZBEATcdttt2LRpE4BgSB47diw++eQTjB8/Hi+88ALatWuHe++9F1u2bMGMGTPw9ttv4+233wYAXH/99aGvu3XrVsu/Qt3KysqwefNmDBs2rMZABgB6vR4vvPACBg4c2KCfAQAulws333wzNm7ciIcffhiLFy+GyWTC2LFjceDAASiKggkTJmDFihW44YYb8OKLL+Lyyy/HggULMGPGDACALMsYP3483G435s6dixdeeAGJiYm4++67cfDgQQDA/v37cdNNN6G4uBhPP/00Zs2ahdzcXNx8880oLi6utb+1a9di7NixyMzMxLPPPotp06bh559/xo033oji4mLcc889odc6NTUVF110UejrIUOG1PiYP/74I8455xxkZGTU+nP/+te/4siRI2Fv6uoyZMgQ3H333QCAxYsX45577gE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D2JQAURSxZs2aakG3LrIsVwuqddXWZP369ejWrVvYnzFjxqju4WRbt25Fy5YtQ0EXACwWC7744gvccMMN2LRpE/R6PS6//PKw77vmmmsABF+/Zs2aoUOHDnjsscfwyCOP4JNPPoEsy5g2bRo6duwIANiwYQP69esHs9kMSZIgSRJsNhv69OmDn376qcbe9u/fj6KiIlx11VVh17OystC7d+/QyPupUhQFen3dYztVbx5OZxuxX375BZIk4bLLLgu7Pn36dKxYseKUn1/v3r1D/52SkgIA6NmzZ+haYmIigGAQBoK/K+eccw7S09NDr7koirjwwgtrfc2JzgYc2SU6C3Xq1AmdOnXCRRddBLPZjBUrVmDbtm3o2bMn1q1bh9mzZ2Pfvn2wWq3o0qUL4uLiAIQHgSNHjlT7yH7OnDkQxfD30H6/H7Nnz8a4ceNCo01VHA4HWrZsqarnTZs24euvv8bHH39cbZ5ilUsuuQSTJ0+G3+/H+vXrIYpitY/8y8rKahx5btasGRRFgdPphMPhQGJiYrXncqouvfRSAMEw2apVK4wYMaLWoNq8eXMAqDZFo0ePHnjvvfdCX1dNJWgoh8MRCk41KSsrQ1J
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAImCAYAAABTm0IfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACBIUlEQVR4nO3deXhT1do28Ds7c5NOdGQqUBAQKYMWKEIVCkc9TIrghwMgKKKHSY94AAVFRFAUBGSSmQMOqIAgwqu+OIEKZXgF0YLKXIbOY9LMO98ftZHQgbSme6fl/l0XF2bvJ8mTtFzeWVl7LYXb7XaDiIiIiKgeEuRugIiIiIiotjDsEhEREVG9xbBLRERERPUWwy4RERER1VsMu0RERERUbzHsEhEREVG9xbBLRERERPUWwy4RERER1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MzEgQMHsHnzZnzzzTcASsPw1ZxOJxwOB65cuYLdu3ejcePGFQayvXv34scff8TUqVO9jh85cgSdOnXy/E8VKA2O33zzTYXzPefNm4fExET07t273DmFQoHevXt7vrp3Op348ssvPcGuzMGDB9G7d29P0AUAlUqF/v3745dffoHZbMaRI0egVqu9vlYWBAGbN28uF3SrIopitb9+7d27N7Zs2YItW7bg448/xsqVK3Hvvffiueeew0cffVThfQ4ePIjOnTuXC0ODBg1CdnY2zpw5g4MHD0KlUnkFzrKassc4c+YMcnNzy72/lY0
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABypElEQVR4nO3dd3xT9d4H8M/JTncpHYxWpAiItAzZWkDEcQVUBBUUEAQBQauilyGoCIKgTJmyRFQEGYKK96o40Yd9BYEypIyyOuhOmn3O80dpJHSlJc1J4PN+vXgw53x78k3T+/DpyW8IkiRJICIiIiLyMwq5GyAiIiIiqg4GWSIiIiLySwyyREREROSXGGSJiIiIyC8xyBIRERGRX2KQJSIiIiK/xCBLRERERH6JQZaIiIiI/BKDLBERkQy4HxHR9WOQJfKiHTt24Omnn0a7du3Qvn17DBkyBAcPHpS7LbrK/v37MXLkSLRv3x7NmzdH165d8frrr+PcuXMudd26dcP48ePLvc6CBQvQpEkTt5939+7daNKkSaV/zp8/j82bNzv/uzznz59HkyZNsHnzZreev6r1NxNRFLFlyxYMHDgQbdq0QcuWLdGzZ08sWLAAubm51brmhg0bMHPmTA93SnTzUcndANHN4pdffsHIkSPRtWtXvPfeewCATz75BE8//TRWr16NNm3ayNwh7dy5E8OGDcN9992HadOmITg4GGlpaVi1ahX69u2LDRs2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tWvXxq233uoMsQA
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAImCAYAAABTm0IfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACIfUlEQVR4nOzdeZicZZn+/e+z1NrV+56kk5CEJAYCYUlMnAkCIqICM4jLKIsysqgoP3FBHRlUUFwI6igiIiDIMuDCICqv6+gIGsKmGAxhSUL23tJrVdf2LO8fla6kk+6kE5J6Kp3zcxw9oarurr4q6Tk8667ruW7D930fEREREZEJyAy6ABERERGRg0VhV0REREQmLIVdEREREZmwFHZFREREZMJS2BURERGRCUthV0REREQmLIVdEREREZmwFHZFREREZMJS2BUREdkLnb8kcuhS2BURHn30Uc477zwWLVrEa1/7Wi666CKeffbZoMuS7T796U9z6qmnBvKzTz31VD796U8DsGnTJubMmcODDz4YSC3j0dPTw9e+9jXOOOMMjjnmGJYsWcJ73/teHnnkkf16voGBAa666iqeeuqpA1ypiJSKwq7IYe6Pf/wjl1xyCZWVlXzta1/jq1/9KqZpct555+l/4GWEpqYmHnjgAU4++eSgSxnV6tWrOfvss3nkkUd45zvfyfe//32uu+46Jk2axMc//nH+3//7f+Tz+X16zueff56f/exneJ53kKoWkYPNDroAEQnWjTfeyLHHHst3v/tdDMMA4HWvex1veMMbuOeeezjxxBMDrlDKRTgcZsGCBUGXMap0Os2HPvQhGhsbueuuu6iqqio+dtppp3HKKafwkY98hCOOOIKPfvSjwRUqIiWnnV2Rw1gmk2Hy5Mm84x3vKAZdKISaysrKEbtgmUyGG2+8kdNPP52jjz6a448/nosuuojnn3++uObTn/40c+bMKX4tWLCAf/u3f+Mf//hHcc0FF1zABRdcMKKOG2+8cbePx9euXcuHP/xhFi1axMKFC7nssstYs2YNMPrH6dlslje84Q3MmTNnxM+aM2cOF1100Yif57ou//RP/7Tbc7zyyitcccUV/NM//RMLFizgggsu4Omnnx7xvclkkuuuu46lS5eyYMECzj33XP74xz+O+Hmjfa1YsYIHH3yQOXPmsGnTpr3/4+zBt7/9bd74xjfyxz/+kbPOOoujjz6aN73pTTz00EMj1t11112cccYZzJ8/n6VLl/L5z3+eZDI55t8h7LllYtfvefDBB5k3bx7PPvss73rXu5g/fz6nnHIKt99++15fw8qVK3n/+9/Pa1/7Wo4//ng+8IEP8NJLLxVf31h/j9/+9rdHfb4HH3yQzZs387nPfW5E0B12+umn85a3vIU777yTVCoFjP67uGLFiuK/14oVK7jwwgsBuPDCC0esfeihhzjnnHM49thjOfnkk7nxxhvJ5XLjen07/5zly5dzwQUXcMwxx3DyySfz4x//mM7OTj784Q9z3HHH8frXv54777xzRI19fX1cc801vO51r2P+/Pm8853vZPny5Xv9Oxc5XCnsihzGotEot9xyC29/+9sByOVydHV18Y1vfIO1a9fyjne8o7j2qquu4qc//SmXXnopd9xxB5/5zGd46aWX+PjHPz7i4p3GxkYeeOAB/vu//5vrr7+ewcFBPvzhD4/5MfCGDRt2+x/zjo4O3vWud/HKK6/w+c9/nhtuuIHu7m7e+9730tfXN+rz3HbbbaOGyIqKCp588kkGBweL9z3xxBP09PSMWPfyyy/ztre9jU2bNnH11VezbNkyDMPgve99L0888QRQCMn//u//zs9//nMuu+wybr75ZmbMmMHll1/OU089xec+9zkeeOABHnjgAQDe/va3F28fddRRY/wr7J+uri6uvfZaLrzwQm699VamTJnCpz71qeIbgl/84hfccMMNnHfeedx+++1cfvnl/OxnP+O66647oHV4nsdHP/pR3vKWt3Drrbdy/PHH87WvfY1HH310zO95/PHHefe73w3A9ddfzxe/+EW2bt3Kv/3bv7FmzRre8Y53FP/e5s2bx7x584q3d/6d3Nmjjz5KXV3dHnee3/rWt5JOp/nLX/4yrtd21FFHcc011wBwzTXX8LnPfQ6Ae++9l0996lMcddRR3HTTTVx66aXcfffdfPGLXxzX69vZxz72MU499VS+973vccQRR/C5z32OCy+8kCOPPJKbb76ZY445hi9/+cv8/e9/Bwpv6t773vfy+9//niuvvJKbbrqJlpYWLr74YgVekTGojUFEit761reyYcMGAN70pjfxT//0T0AhBKdSKa6++mre8pa3ALBo0SKSySRf+cpX6O7uprGxEdj9o+6enh6uu+46enp6aGho2O1nXn/99Rx55JEjdn/vvPNOcrkcP/jBD4rPO3fuXN797nfz7LPPMnPmzBHPsXXrVr7//e9z1FFHjXgegHnz5vHKK6/wpz/9ibe+9a0APPLIIyxcuJAVK1YU1910002Ew2F++MMfkkgkADj55JM588wz+drXvsZPfvIT/vSnP/Hss8/yne98h9NOOw2AxYsXs3HjRh5//HE+/OEPj/jZLS0tB+1j/3Q6zZe+9CWWLFkCwPTp0znllFP4v//7P2bOnMkTTzzBlClTOO+88zBNk0WLFhGPx+nv7z+gdfi+z4c+9KFiCD3hhBP47W9/yx//+EeWLl066vfceOONTJs2jVtvvRXLsgD453/+Z974xjfyrW99i//6r/+ipaUFoPhvsbe/x02bNjF58uQ9rpk6dSoAmzdvHtdrSyQSzJo1C4BZs2Yxa9YsPM8r/vsPh1so/Hv88pe/JJ/Pj+v1DTv33HOLnzzE43He+c53cswxx/D//t//Awq/97/5zW945plnOOaYY/jZz37G6tWr+dGPfsSxxx4LwEknncQFF1zAsmXL+OlPfzqu1yZyONHOrogUfec73+HWW2/l/PPP57e//W2xtzEcDnP77bfzlre8hY6ODh5//HHuv/9+/vCHPwCM+PgWwHEc8vk8W7du5ZFHHmHy5MnU1dXt9vP+9Kc/8Ze//IVPfepTI+5/+umnWbBgQTHoQiE4/uEPf+D1r3/9bs/z1a9+lRNPPJFTTjllt8cMw+CUU07h97//fbG23/zmN8XgO+yJJ57glFNOKYYrANu2eetb38pzzz1HKpXi6aefJhQKjfiY3zRN7r///t2C7p54nofruuNeP5adA+BwOBwaGgIKIXzdunW87W1v46abbmLlypWcddZZu31sfyAcd9xxxf8Oh8PU1dUV69jV0NAQK1eu5M1vfnMxCAJUVVVxyimnFHfR95Xv+9j2nvdvhn/eqxkjtm7dOrZt28Yb3/jGEfe///3v58EHHySfz+/T69v5766+vh6gGGIBamtrAYqfTCxfvpzGxkaOOuooHMfBcRxc1+WUU07hueeeO+BvZkQmAu3sikjR7NmzmT17Nq9//euJRqPcdtttPPvssxx77LE8+uijXH/99axdu5aKigrmzp1LPB4HRoaHzZs37/aR/Ve+8hVMc+R763w+z/XXX8/FF1+8245cX18fU6ZMGVfNTzzxBL/73e94+OGH+eUvfznqmtNOO42Pf/zj5PN5li9fjmmaxR3RYf39/aPuPDc0NOD7Pslkkr6+PmpqanZ7LftqOCjFYjHa2to499xzed/73rfPzxOLxYr/PVzT8L/FW97yFjzP47777uPmm2/m29/+NpMnT+YTn/hEcXf+QIlGoyNum6Y5ZqAcHBzE9/0x/653bjfZF5MnTx7RPz6a4TaXSZMm7dfPAIptNMPBdFf7+vp2fnM1bOd/19F+fldX15htMV1dXVRXV4/5/SKHI4VdkcPYxo0bufLKK7n00ks5/fTTRzx2wgknFPtga2trufzyyznttNP43ve+R1tbG4ZhcO+99+7Wm9nY2Mh3v/tdAFKpFPfccw+f//znWbx4Ma2trcV1d911F7lcjksvvZTu7u4Rz1FZWblbTy0UdrWmTJlSvJjOdV2++MUvcuGFFzJjxowxX+eSJUtwXZcnnniCRx55hDe
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABvvUlEQVR4nO3deZhT5dk/8O85JyfLJJl9YxuWYSuyKiBKWUTrhtiXl1qtokJVREFetx9Fi0pFrQsoVqwKqChuVEGtxbpWhVqUpYooyC4MwuxrZrKd5fdHZgKRWQ56kjPB7+e6pjrJPZk7E3td3zy5z/MIuq7rICIiIiJKMqLVDRARERER/RgMskRERESUlBhkiYiIiCgpMcgSERERUVJikCUiIiKipMQgS0RERERJiUGWiIiIiJISgywRERERJSUGWSIiOmHxzB+iExuDLBEBANatW4fLLrsMw4cPx6mnnoqpU6diy5YtVrdFjcaNG4c+ffpEv/r27YtTTz0V06dPx7fffhtTe/nll6NPnz645JJLWny8m266CX369MGcOXOit82ZMwfjxo2L23Noy+bNm3HDDTdg5MiRGDBgAM4880zMnTsXe/bs+dGPN23aNJO7JKL2hEGWiPDxxx/jmmuugdfrxYMPPogHHngAoijisssuw6ZNm6xujxqNGTMGK1euxMqVK/HCCy/grrvuQnl5Oa688kpUVFTE1IqiiC+//BLFxcXHPE5DQwM++uijRLVtyJIlS3DZZZfB7/fj9ttvx9NPP43p06dj27ZtmDhxItasWXPcj/nqq6/+6BBMRMnBZnUDRGS9hQsXYtCgQXjiiScgCAIA4PTTT8eZZ56JF154AUOHDrW4QwKAzMxMDB48OOa2AQMG4KyzzsI777yDyy67LHp7v379sHv3brzzzjuYMmVKzM989NFHcLlcSE1NTUDXbfvoo4+wcOFC3HDDDZg5c2b09uHDh+N//ud/cMstt2DOnDno3bs3evXqZWGnRNTecEWW6GcuEAigU6dOuOiii6IhFgDsdju8Xi/C4XBM7cKFC3H22Wejf//+OPnkkzF16lRs3749WjNnzpyYj8AHDx6MSy65BN9880205vLLL8fll18e08fChQvRp08frF69Onrb3r17MXPmTAwfPhzDhg3DtddeG11hO3jw4DH1wWAQZ555Jvr06RPzu/r06YOpU6fG/D5VVTFy5MhjHuO7777DrFmzMHLkSAwePBiXX345Nm/eHPOzPp8P8+fPx6hRozB48GBMmjQJH3/8cczva+7r888/x+rVq9GnTx8cPHiw7RfHgLS0tGZvT0lJwZgxY/DOO+8cc9/bb7+Nc845Bzbb8a9lqKqKF198ERMmTMDAgQMxduxYLFiwAMFgEMCxIxBHf7X0nBcvXowePXpgxowZx9wnyzLuvvtuSJKEpUuXAmj+tQdiRyPmzJmD119/Hd9//31MbWuvnZHn1/TYV111FVauXImzzjoLAwcOxCWXXIJ9+/bho48+woQJEzBo0CBcdNFFMf/fAIBNmzZh8uTJGDRoEIYPH44//OEPqKysPM5XgYiacEWW6GfO6XTiySefjH4fCoVQU1ODF154AXv37sXs2bOj982ePRubNm3CzTffjIKCAuzfvx+PPvoobrnlFqxZsyYahHNycrB48WJomobi4mI8/vjjmDlzJj788EOI4rHvnw8cOIDly5fH3FZSUoKLL74YeXl5mDdvHlJSUvDYY4/hyiuvxD/+8Y9mn8uyZcuaDUtutxsbN25EXV0dvF4vAGDDhg3HBIjdu3fjt7/9Lbp164a5c+dClmU8//zzuPLKK/HMM89g+PDhUFUVv//976OBt0ePHnj99dcxY8YMPPfcc7jrrrvg8/kAABdffDF+85vf4KKLLgIA9OzZE99//31bL0mLdF2HoigAAE3TUF5ejkcffRTZ2dk477zzjqk///zzceONN6K4uBj5+fkAIkFu7dq1ePbZZ7F27drj7uHOO+/Em2++iWuuuQZDhw7Ftm3b8Pjjj2P79u1YtmwZFi9ejFAohLKyMsycORPXXXcdxo4dCwDIzc095vEqKyvx9ddf46qrrop5I3W09PR0nH766fjwww8N93n99dejsrIS27Ztw+LFi1FQUNDmazd06NA2n19Tj1988QVKS0sxZ84cBINBzJs3D9OmTYMgCJg1axZcLhfuuusu3HrrrdGxiI0bN2Lq1KkYMWIEFi1ahJqaGjz66KO44oor8Nprr8HpdB7nq0FEDLJEFGP8+PE4cOAAAOCcc87ByJEjAUQCbn19PebOnYvzzz8fQOSjX5/Ph/vvvx/l5eXIyckBEFnNPfoj8MrKSsyfPx+VlZXIzs4+5nfed9996NWrV8yq7fLlyxEKhfDss89GH7dv37743e9+hy1btqCwsDDmMQ4fPoylS5fipJNOinkcIPIx+3fffYe1a9di/PjxACKrksOGDcPnn38erVu8eDHsdjuef/55eDweAMDYsWNxwQUX4MEHH8Rrr72GtWvXYsuWLXj88cdx1llnAQBGjBiBo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MZte97ZGLoqKiuB2u5Genh4d3Thebb12x/P8jn6zc7Sm/z/8UG1tLTRNw9KlS6OzvkdzOByGngMRxWKQJfqZKyoqwk033YRp06bh7LPPjrnvlFNOic6dZmRkYMaMGTjrrLPw1FNPoUuXLhAEAS+++CLWrVsX83M5OTl44oknAEQ+gn3hhRcwb948jBgxAh06dIjWPffccwiFQpg2bRrKy8tjHsPr9TZ7Ecz69evRuXPn6Iqiqqq45557cMUVV6BHjx4tPs/TTjsNqqpiw4YN0Yudfhho0tLSjukDAMrKygAAGRkZ8Hq9qK6uhq7rMaua27Ztg67rxwT4ljzxxBPIyclBMBjE5s2b8cADDwBAm2G2Of3798d//vMfVFVVHRPER48eDbfbjXfeeQcpKSno3Lkz+vfvf9y/AzhyYVlZWVnMG49
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArcAAAImCAYAAABJp6KRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACV60lEQVR4nOzdd3xUZdYH8N9z752WmfSEBAhFUCkKqEtVUay7q6Cu5bViW9aKWFHZde1iA1FRLIvICrqsvS2rrt21ALoWFCsohJKQPiUzc+eW949JxoRMkss4LfH3/XwiZOZkcmYywTPPnOc8wjRNE0REREREvYCU6QSIiIiIiJKFxS0RERER9RosbomIiIio12BxS0RERES9BotbIiIiIuo1WNwSERERUa/B4paIiIiIeg0Wt0RERETUa7C4JSLqAs+5+fXhz9w6PlaUjVjcUq/y3nvv4dRTT8X48eMxYcIEnHXWWfj8888znRa1OPjggzFs2LDYx4gRIzB27FicfPLJeP755zvEDxs2DAsXLtyp75HI18RTVVWFc845B1u2bPnFt9XWqlWr2j0Gw4YNw/Dhw7HPPvvgpJNOwptvvpmU77Nw4UIMGzYs9vnVV1+Ngw8+OCm3nSzxHou2H+eee27ac/r+++9x8sknt7ssWc+pTDIMA88//zymT5+OsWPHYq+99sLUqVOxcOFCNDQ0JHSbTz31FG6//fYkZ0r0yymZToAoWd5++22cd955mDJlCu644w4AwLJly3Dqqadi6dKlGDt2bIYzJAA48MADccEFFwAANE1DQ0MD/v3vf+Oqq67C119/jTlz5sRi//nPf6K8vDwjeX7wwQd45513Unb71157LfbYYw8A0dWvpqYmLFmyBBdccAEeeughHHjggUn9fhdccAFOP/30pN5msrR9LNrKy8tLey6vvPIKPv3003aXZfJ5mAyRSAQXX3wx3nnnHRx33HE4++yz4XQ6sXbtWjz22GN49tln8eCDD7Z7MWTFAw88gPHjx6coa6LEsbilXmP+/PkYM2YMHnjgAQghAAD77rsvDjnkECxfvpzFbZYoKirCXnvt1e6yww47DKWlpVi6dCkOP/xw/OY3vwGADnG9ya677trh/o0dOxZTpkzBY489lvTiduDAgUm9vWSK91hkk2zOzYq77roL7777Lv72t79h3333jV0+adIk/OEPf8Bpp52GWbNm4YUXXoDT6cxgpkTJwbYE6hVCoRD69++PE044IVbYAoDdbkdubi4ikUi72Pnz5+Pwww/HnnvuiX322QdnnXUWvv7661jM1Vdf3e7t0b322gsnnXQSvvrqq1jM9OnTMX369HZ5zJ8/H8OGDcOzzz4bu2zDhg2YOXMmxo8fj3HjxuHcc8/F+vXrAQCbN2/uEB8Oh3HIIYe0W0WZPn06hg0bhrPOOqvd99N1Hfvtt1+H2/jpp58wa9Ys7Lfffthrr70wffp0fPLJJ+2+1u/346abbsLkyZOx11574bjjjsPbb7/d7vvF+1i1ahWeffZZDBs2DJs3b+7+h2PRzJkz4XA4sGLFithlO74d/M0332DmzJmYOHEi9thjD0yePBk333wzQqFQh/t2xRVXYO+998akSZNw8803IxgMtot5/fXXceyxx2LUqFHYb7/9cPPNN6O5uRkA8Oyzz8ZWkA855BBcffXVsa976qmncOSRR2LPPffElClTsHDhQui6Hru+vr4el19+Ofbbbz+MGjUKRx99dNyWi3g8Hg922WUXbN26NXZZY2Mjrr32Wuy7774YNWoU/u///g8ffvhhu68Lh8O49dZbsd9++2HvvffGnDlzEA6H28Xs2JYQiUQwb948HHDAARg9ejT++Mc/4vnnn2/3c7366qtxxhln4LrrrsM+++yDI444ArquwzAMPPzwwzjssMOw55574re//S2WLVvW4f509RjvjB1bLFq1fX60/i79+9//xqxZs7D33ntj/PjxuOaaa9p9T9M0sXTpUvz+97/H6NGjcdhhh+GRRx6BaZpYuHAh7rvvvg63vePzcPv27ZgzZw4OPPBAjB49GscffzzeeOONDrk9/vjj+Mtf/oLx48dj7733xsUXX4za2tou76vP58Ott96KQw89FKNGjcLUqVPx9NNPt7uP8T46azlpaGjA448/jmOPPbZdYduqtLQUf/nLX/DTTz/h5ZdfBoBOf78PPvjg2O/CwQcfjC1btuC5555rF9vVv3fd3b+23+e+++7D3LlzMWHCBOy99964/PLLEQgE8PDDD+OAAw7Ab37zG1x00UUdWiq6+/2kXweu3FKv4HQ68eCDD8Y+V1UVTU1NWL58OTZs2IArr7wydt2VV16Jjz/+GJdddhkGDhyIjRs34p577sHll1+Of/3rX7HiuLS0FPfddx8Mw0BVVRXuv/9+zJw5E2+88QYkqePrwk2bNmHp0qXtLquursaJJ56IsrIyXH/99cjJycHChQtxxhlnxP5HsqPFixfHLRrdbjfWrFkDn8+H3NxcAMDq1atRX1/fLu6HH37A//3f/2Hw4MG45pprYLPZ8Nhjj+GMM87AkiVLMH78eOi6jrPPPjtWBA8ZMgTPPfccLrzwQvz973/HddddB7/fDwA48cQTcfzxx+OEE04AEF1lS3YfKgDk5uZi9OjRHYrwVtu3b8epp56KvfbaC7fddhvsdjveffddPProo+jTpw/OOeecWOyyZctw4IEH4u6778aPP/6IBQsWYNu2bbj//vsBAC+99BKuuOIKTJs2DZdccgm2bNmCBQsW4IcffsCjjz6KKVOm4Pzzz8cDDzyA++67L1ZYPfTQQ1iwYAFOO+00zJkzB19//TUWLlyIbdu2Ye7cuQCA2bNno66uDjfccAM8Hg9eeOEFXHXVVSgvL8fEiRO7fAxUVcXmzZsxevRoANGi9YwzzkBtbS0uvfRS9OnTB8888wxmzJiBxYsXY9KkSbHv+d577+HSSy/FoEGD8M9//hMvvfRSl9/r2muvxcsvv4yLLroII0aMwMsvv4y//vWvHeI+/vhjOBwO3H///WhuboYsy7j22mvx7LPP4txzz8Xee++NNWvWYO7cufB6vbjwwgstPcZtX4QahgFN09p9XyEEZFnu8j7Ec9111+G4447DokWL8MUXX2DBggUoLCzE5ZdfDgC444478Pe//x1nnXUW9ttvP6xduxbz5s2Dpmk44YQTUFVVhaeffrrTVoTa2locf/zxcDgcuPTSS1FYWIhnn30WF154Ie644w4cddRRsdgFCxbgsMMOw1133YXKykrceuutkGUZd911V9zcQ6EQTjnlFNTV1WHWrFno378/Xn/9dfzlL39BbW0tzj77bPzzn/8EEG3Dan1+lpaWwm63x73N1atXx14wd2b//fdHQUEB3njjDRx//PGWHuf77rsP55xzDkaOHIkLLrgAffr06fbfO6fT2eX9O++882K3v2TJEuy3335YsGABvvzyS8yfPx9fffUV+vTpg5tuugmbN2/GLbfcgpKSElx33XUArP1+0q8Di1vqlY488khs2rQJAPDb3/4W++23H4Bo8RAIBHDNNdfgiCOOAACMHz8efr8ft912G2pra1FaWgoguurb9u3I+vp63HTTTaivr0dJSUmH7zl37lzstttu7VZ3ly5dClVV8eijj8Zud/jw4Tj55JPx+eefY+jQoe1uY9u2bfjb3/6GPfbYo93tAMDIkSPx008/4d1338WRRx4JAFi5ciXGjRuHVatWxeLuu+8+2O12PPbYY/B4PACAKVOmYOrUqbjjjjvw9NNP491338Xnn3+O+++/H4ceeigAYOLEiaisrMRHH32EmTNntvve5eXlaXlrtqSkBF988UXc67777juMGDEC99xzT+x+7bvvvnj//fexatWqdsXt0KFDcf/990OSJBx44IEQQmDu3Ln47rvvsNtuu2HevHmYPHky5s2bF/uawYMH48wzz8Q777yDKVOmxN7GHzFiBCoqKuDz+bBo0SKceOKJuOaaawD8XBRcc801OOuss7Dbbrth9erVuPDCC2OP6/jx41FQUNCh+Ghb0Gmahi1btmDRokWor6/
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAByZUlEQVR4nO3deXxTddo+/uuc7E26UUrLVpYiVbQssi8VRHQcNmUYf64oKoIi8nXEQRwZRVFHFFxG3FgUwVFQQFFhdMS1ys6jiBSRnbK0dE+TZj/n90dJJDQpqZ7kJHi9X0+fTs+5m3M3+MfV08/53IIsyzKIiIiIiBKMqHYDRERERES/BYMsERERESUkBlkiIiIiSkgMskRERESUkBhkiYiIiCghMcgSERERUUJikCUiIiKihMQgS0REREQJiUGWiIjOaZz7Q3TuYpAlooDCwkLceOON6NOnD/r27Ytbb70VO3bsULstOsO0adOQl5eH119/Xe1WFHX06FE88sgjuOyyy5Cfn49BgwbhzjvvxLfffvubXq+kpAQTJ07EsWPHFO6UiOIFgywRAQC++uor3HHHHUhOTsbTTz+NOXPmQBRF3Hjjjdi2bZva7dEptbW1WL9+PTp37owVK1acM3cbN27ciNGjR2Pr1q2YMGECFi9ejJkzZ0Kr1eL222/Hk08+2eTX3LBhA77++usodEtE8UKrdgNEFB/mzZuHbt264ZVXXoEgCACAAQMG4LLLLsNbb72FXr16qdwhAcDHH38MAHjooYdwyy23YNOmTejfv7/KXf0+paWlmDp1Ki6++GK89NJLMBgMgXNXXnkllixZgn/9618477zzcM0116jYKRHFG96RJSI4nU60bt0a11xzTSDEAoBer0dycjI8Hk9Q7bx583DFFVfgoosuwsUXX4xbb70Vu3fvDtTMmDEDeXl5gY/u3bvjuuuuw65duwI148aNw7hx44L6mDdvHvLy8rB69erAsQMHDmDKlCno06cPevfujUmTJmH//v0A6v8UfWa9y+XCZZddhry8vKBr5eXl4dZbbw26ns/nw8CBAxu8xqFDhzB16lQMHDgQ3bt3x7hx47B9+/ag77XZbJg9ezYKCgrQvXt3jB07Fl999VXQ9UJ9bN68GatXr0ZeXh6OHj169n+cM6xatQr9+/dHv3790K5dOyxfvjxk3eLFi3HZZZeha9euuO666/DFF18Eru/3yy+/YNKkSbj44otx8cUX4+6770ZxcfFZe/juu+9www03oGfPnujbty+mTZuGEydOAGj4b3/6x+nv8emWLFmCuro6PP7440Eh1m/8+PHo3r07XnnllcAd6KFDh2LGjBlBdae/r6tXr8aDDz4IALjssssCtbIsY8mSJfjzn/+Mrl274vLLL8fixYuD7mw39vP5r5Ofn49t27Zh7NixyM/Px5/+9Cd88cUXOHDgAG655RZ069YNl19+OdauXRvU4/Hjx3HfffehT58+6NatG2655RYUFRWd9T0notAYZIkIRqMRr776Kv76178CANxuN8rKyvDcc8/hwIEDQXfBpk+fjlWrVmHixIl4/fXX8eCDD2Lv3r2YNm1aUBjIzMzEihUr8M477+DJJ59EbW0tpkyZAkmSQvZw5MgRLFmyJOhYaWkprr32Whw6dAizZs3CM888g/Lyctxyyy2orq4O+TqLFi0KGRDNZjO2bt2K2trawLEtW7agsrIyqG7fvn34y1/+gqNHj2LmzJmYO3cuBEHALbfcgi1btgCoD8C33XYbPvroI0yaNAkvv/wyOnbsiLvvvhvbtm3DI488ghUrVmDFihUAgL/+9a+Bry+88MIw/wpnt3fvXuzcuRNXX301AODqq6/G559/jvLy8qC6+fPnY+7cufjzn/+Ml19+Gd26dcO9994bVHPw4EFcd911qKiowJw5c/DEE0+guLgY119/PSoqKsL28MEHH+C2225Dy5Yt8eyzz+LBBx/E999/j2uvvRYVFRWYPHly4GfNzMzE4MGDA18PGTIk5Gt+++23uOCCC5CdnR32un/+859x7NixoF+YGjNkyBDcddddgfdj8uTJAICnn34aTz/9NIYOHRr4b37u3LlYsGBBRD+fn9frxbRp03DdddfhlVdegclkwv33348777wTQ4YMwauvvooWLVrggQceQElJCQCgsrIy8AvdP//5T8ybNw+SJOHGG28M/HJGRE3DpQVE1MCIESNw5MgRAMCf/vQnDBw4EEB9wLXb7Zg5cyaGDx8OAOjTpw9sNhueeuoplJeXIzMzE0D93dzu3bsHXrOyshKzZ89GZWUlmjdv3uCaTz75JM4777ygu7ZLliyB2+3GG2+8EXjd888/H9dffz127NiB3NzcoNc4ceIEFi5ciAsvvDDodQCgS5cuOHToEL755huMGDECALBu3Tr07t076C7l/PnzodfrsXTpUlgsFgD1oWjkyJF4+umnsXLlSnzzzTfYsWMHXnrpJQwbNgwA0K9fPxQXF2PTpk2YMmVK0LWzs7OD3ovfatWqVUhLS8PQoUMBAGPGjMGLL76IlStX4s477wQA1NXVYeHChbjxxhtx//33AwAGDRoEh8MRCNb+n9NkMmHJkiWBn7N///4YNmwYFi1ahAceeKDB9SVJwty5czFo0CDMmzcvcPziiy/G8OHDsXjxYkyfPh05OTkA6v8baNas2Vl/9qNHj+KSSy5ptKZdu3YAgGPHjqFLly6N1gJAs2bNAn1ccMEFaNOmDaxWK5YuXYqbbroJf//73wHUL58pKyvD1q1bcccdd0T08/nfizvvvDPwS57VasXf/vY33HLLLYE7/8nJyRg7dix++uknZGdn480330R1dTXeeecdtG7dGgBwySWXYPjw4XjhhRfw73//+6w/FxEF4x1ZImrgpZdewoIFC3DTTTfhs88+C9zN0+v1WLx4MYYPH47S0lJs2rQJy5cvx5dffgmgPuiezuv1wuPx4MSJE1i3bh1at26NZs2aNbjeN998gw0bNjQIT9u3b0f37t0DIRaoD4VffvklBg8e3OB15syZg169euHSSy9tcE4QBFx66aX4/PPPA73973//C4Ravy1btuDSSy8NhDsA0Gq1GDFiBH766SfY7XZs374dOp0uECgBQBRFLF++vEGIbYwkSfD5fBHVejwefPjhhxg2bBicTiesVivMZjN69uyJd999N3Cn+4cffoDT6cSVV14Z9P0jR44M+nrTpk3o06cPjEYjvF4vvF4vLBYLevXqhQ0bNoTs4eDBgygrK2vwWjk5OejRo0fgjnVTybIMrbbx+yoajSZQ+1v98MMP8Hq9uOKKK4KOz5w5E4sWLWryz9ejR4/A/87IyAAAdOvWLXAsLS0NQH3IBeofaLvggguQlZUVeM9FUcQll1wS9j0nosbxjiwRNdC5c2d07twZgwcPhtFoxKJFi7Bjxw5069YNhYWFePLJJ3HgwAGYzWacf/75SEpKAhAcMo4dO9bgz+hPPfUURDH492ePx4Mnn3wSEyZMCNyl8quurkabNm0i6nnLli1Yv349PvzwwwbrEv2GDRuGadOmwePxYOPGjRBFscGDUjU1NSHvGDdv3hyyLMNms6G6uhppaWkNfpamuvzyywEAJpMJbdu2xdixYzF+/PiQtV999RUqKiqwcuVKrFy5ssH5wsJCDB48OLBU4sxfGPxBy6+6uhrr1q3DunXrGrxWqF82/N8DIOz781vXerZu3fqsW2T51+62atXqN10D+LV/pX6+03/Z8TOZTI1e//Dhw2GXlzgcjka/n4gaYpAlIhQXF+Nvf/sbJk6c2OBuVc+ePQPrTtPT03H33Xdj2LBheO2119C2bVsIgoD//Oc/KCwsDPq+zMxMvPLKKwAAu92Ot956C7NmzUK/fv3QsmXLQN2bb74Jt9uNiRMnNljrmZyc3GANK1B/Z6tNmzaBB9N8Ph8ef/xx3HzzzejYsWPYn7N///7w+XzYsmUL1q1bhz/96U8NwmhqamqDPgCgrKwMAJCeno7k5GRUV1dDluWgh+OKioogy3LE62BfeeUVZGZmwuVyYfv27ZgzZw4AhAyzq1atQtu
"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",
"execution_count": 34,
"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",
"execution_count": 35,
"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": "iVBORw0KGgoAAAANSUhEUgAAAf8AAADECAYAAACROyhkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4AklEQVR4nO3dd1wT9/8H8FcSAgTC3ooICqKCE0cdgAMHYl2t1GodqNXWttba1tZf3bb122Ld1lktKtY9WuvEusUtKFUUFBBR2SAEQiD5/P7ApISEKXhA3s/HIw/l8rnPvfO5y+d9d5+7C48xxkAIIYQQncHnOgBCCCGEvFmU/AkhhBAdQ8mfEEII0TGU/AkhhBAdQ8mfEEII0TGU/AkhhBAdQ8mfEEII0TGU/AkhhBAdQ8mfEEJeg0QiQWJiIjIzM7kOhdSwnJwcxMfHQyKRcB1KjaPkTwghVbR371707dsXJiYmEIvFcHJyws8//8x1WPVCbm4uVqxYofo7KysLa9eu5S6gEhhj2LhxI9566y0YGRnB1NQULi4u2LFjB9eh1bgqJf/ff/8dPB5P9TI0N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Px8VFNU/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": "iVBORw0KGgoAAAANSUhEUgAAAgsAAADECAYAAAARfmKGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3n0lEQVR4nO3dd3wT9f8H8FeSjnTSSVug0Fpo2asCMspepcoSUFHZtoiCCMpPUGQooqIIAiKoIDJkCnwFLBsFZEOByiqlZRTogg66k3x+f9TEhqRpWlqu4/V8PHjw6OVzn3vf5e7yzmdcZEIIASIiIqJCyKUOgIiIiMo3JgtERERkEpMFIiIiMonJAhEREZnEZIGIiIhMYrJAREREJjFZICIiIpOYLBAREZFJTBaIiIhKgUajQVJSEm7cuCF1KKWOyQIREZVrR44cwaFDh3R/Hzp0CEePHpUuoALu37+PiRMnok6dOrCysoK7uzsaNmyItLQ0qUMrVcVKFn7++WfIZDLdP6VSCX9/f7z99tuIj48vqxiJqoyjR49iwIAB8PDwgLW1NXx8fBAWFoZbt26VuM7MzEzMnDlT72ZLVJHcvn0b48aNw8WLF3Hx4kWMGzcOt2/fljosXL9+Ha1atcL69esRFhaGHTt2YO/evdi/fz/s7OykDq9UWZRkpdmzZ8PX1xfZ2dk4cuQIli5dil27diEyMhK2tralHSNRlbBo0SK88847eOaZZz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NRfXq1UVycrJu2fnz54VcLhfDhg3TLdOet4mJiXr
"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+Q6lylKQJIYRode/ePRw+fFj978jISPz555/8BVRMdnY2vvrqKzRp0gQSiQS2trbw8vJCTEwM36FVqQol6a1bt0IgEKj/jIyM4OXlhenTpyMpKam6YiSkzrh06RIGDRoER0dHGBoawt3dHaGhoXj27Fml68zLy8O8efNw7ty5qguU1AnZ2dkIDQ3F1atXERsbi5kzZ+Lu3bt8h4W0tDR06tQJq1atwpAhQ3DkyBGcPn0a586dg7u7O9/hVSmDyrxpwYIF8PDwgFQqxcWLF7F+/XocO3YM9+7dg4mJSVXHSEidsHr1asycORMNGzbEjBkz4OzsjOjoaPzyyy/Yu3cvjh07hs6dO1e43ry8PMyfPx8AEBQUVMVRE33WqVMn9R8AeHl5YfLkyTxHBfz3v//Fy5cvceXKFTRv3pzvcKpVpZJ0cHAw2rdvDwCYNGkSbG1tsXz5chw5cgTDhw+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29rnL8eOnQo3N3dsXjxYly9ehWrVq1Ceno6tm/fXmo8kyZNwrlz53D69Gk0a9ZMvbwyuUArVgFbtmxhAFh4eDhLSUlhCQkJbM+ePczW1pYZGxuz58+fM8YYk0qlTKFQcN4bFxfHDA0N2YIFC9TLNm/ezACw5cuXa6xLqVSq3weALVu2TKNM8+bNWWBgoPrfZ8+eZQBYvXr1WFZWlnr5vn37GAC2cuVKdd2NGzdmvXv3Vq+HMcby8vKYh4cH69mzp8a6OnfuzFq0aKH+d0pKCgPA5s6dq14WHx/PRCIRW7RoEee9d+/eZQYGBhrLY2NjGQC2bds29bK5c+ey4h/LhQsXGAC2a9cuzntPnDihsdzNzY2FhIRoxD5t2jRW8qMuGXtYWBhzcHBgPj4+nDbdsWMHEwqF7MKFC5z3b9iwgQFgly5d0lhfcYGBger6/vzzT2ZgYMA+/fRTrWXL0x6MFX1OxclkMtaiRQvWrVs3Tl1CoZANGjRIY19UfeYZGRnM3Nyc+fr6svz8fK1lZDIZc3BwYC1atOCUOXr0KAPAvv76a/WysWPHMjc3N049P/30EwPArl+/rnWbGWMsMjKSAWAzZ84stQxjjLVq1YrZ2Nio/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",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка: (460, 9)\n",
"Outcome\n",
"0 299\n",
"1 161\n",
"Name: count, dtype: int64\n",
"Обучающая выборка после oversampling: (594, 9)\n",
"Outcome\n",
"0 299\n",
"1 295\n",
"Name: count, dtype: int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fcOGDTFjxgzExMRgwYIFOH78uN5r6ubmhnnz5gEAHj58iAULFqBjx4548OCBwdceeDGG88CBAwgODkaVKlUMrtOzZ08MGTIEO3fuxNixY/Ov6P8rV64cfvjhB3z44Yfo2rUrunXrBgCoW7cuAODSpUsIDg6GpaUlhgwZAh8fH9y5cwd//PEHpk+fDuDFh1FwcDCcnJwwZswYWFpaYtmyZWjRogX+/vtvNG7cWGefH3/8MTw9PTF58mScPHkSy5cvh7OzM06cOIFKlSrhm2++wa5duzB79mzUrl0bffv21W77sud6Yep/6NChaN26tfbx+++/r1NXmnrUCA8PR8+ePTFs2DD069cPK1euxDvvvIPdu3ejTZs2AF68piEhIYiKisLQoUNRqVIlnDhxAuPGjcPjx48xf/78PI/DWEeOHMGuXbtyfb5Hjx7w8fHBjBkzcPLkSXz//fd49uwZ1qxZo11n8ODBWL16Nbp3745Ro0bh1KlTmDFjBq5fv6733gsODsaQIUOgVqtx5coVzJ8/H48ePdIm+0IIdO7cGYcOHcKgQYMQGBiIPXv2YPTo0YiKitK+NkUhLS0NLVq0wO3btzFixAhUqVIFW7ZsQf/+/ZGQkIBPP/00121v376NH3/8sUD701ynMjIysGfPHsyZMwc2NjaYOnVqoY8hPj4ex44dw7FjxzBw4EAEBQXhwIEDGDduHCIjI7F06VLtugV53Yw5Z3N68OAB2rdvj+rVq2Pz5s2wsHiRLpji3A4MDMSoUaN0lq1Zswb79u3TWWbsMRpzHc+uqD9zMzI
"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",
" <td>3.000000</td>\n",
" <td>124.000000</td>\n",
" <td>80.000000</td>\n",
" <td>33.000000</td>\n",
" <td>130.000000</td>\n",
" <td>33.200000</td>\n",
" <td>0.305000</td>\n",
" <td>26.000000</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1.000000</td>\n",
" <td>80.000000</td>\n",
" <td>74.000000</td>\n",
" <td>11.000000</td>\n",
" <td>60.000000</td>\n",
" <td>30.000000</td>\n",
" <td>0.527000</td>\n",
" <td>22.000000</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>4.000000</td>\n",
" <td>90.000000</td>\n",
" <td>88.000000</td>\n",
" <td>47.000000</td>\n",
" <td>54.000000</td>\n",
" <td>37.700000</td>\n",
" <td>0.362000</td>\n",
" <td>29.000000</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <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>4</th>\n",
" <td>3.000000</td>\n",
" <td>139.000000</td>\n",
" <td>54.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>25.600000</td>\n",
" <td>0.402000</td>\n",
" <td>22.000000</td>\n",
" <td>1</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",
" <th>589</th>\n",
" <td>5.532765</td>\n",
" <td>123.754039</td>\n",
" <td>78.778726</td>\n",
" <td>30.922127</td>\n",
" <td>0.000000</td>\n",
" <td>27.981576</td>\n",
" <td>0.587583</td>\n",
" <td>48.143402</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>590</th>\n",
" <td>0.324393</td>\n",
" <td>122.297574</td>\n",
" <td>60.809705</td>\n",
" <td>33.243934</td>\n",
" <td>165.648787</td>\n",
" <td>33.975607</td>\n",
" <td>0.449215</td>\n",
" <td>31.378033</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>591</th>\n",
" <td>0.462644</td>\n",
" <td>159.918100</td>\n",
" <td>76.693967</td>\n",
" <td>35.537356</td>\n",
" <td>0.000000</td>\n",
" <td>48.316162</td>\n",
" <td>0.385976</td>\n",
" <td>27.272272</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>592</th>\n",
" <td>1.033191</td>\n",
" <td>128.066382</td>\n",
" <td>97.977873</td>\n",
" <td>40.977873</td>\n",
" <td>57.919788</td>\n",
" <td>31.985617</td>\n",
" <td>1.198703</td>\n",
" <td>33.027659</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>593</th>\n",
" <td>1.655930</td>\n",
" <td>132.147291</td>\n",
" <td>100.556954</td>\n",
" <td>28.590337</td>\n",
" <td>140.655930</td>\n",
" <td>33.423133</td>\n",
" <td>0.270142</td>\n",
" <td>45.196779</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>594 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" Pregnancies Glucose BloodPressure SkinThickness Insulin \\\n",
"0 3.000000 124.000000 80.000000 33.000000 130.000000 \n",
"1 1.000000 80.000000 74.000000 11.000000 60.000000 \n",
"2 4.000000 90.000000 88.000000 47.000000 54.000000 \n",
"3 1.000000 100.000000 66.000000 15.000000 56.000000 \n",
"4 3.000000 139.000000 54.000000 0.000000 0.000000 \n",
".. ... ... ... ... ... \n",
"589 5.532765 123.754039 78.778726 30.922127 0.000000 \n",
"590 0.324393 122.297574 60.809705 33.243934 165.648787 \n",
"591 0.462644 159.918100 76.693967 35.537356 0.000000 \n",
"592 1.033191 128.066382 97.977873 40.977873 57.919788 \n",
"593 1.655930 132.147291 100.556954 28.590337 140.655930 \n",
"\n",
" BMI DiabetesPedigreeFunction Age Outcome \n",
"0 33.200000 0.305000 26.000000 0 \n",
"1 30.000000 0.527000 22.000000 0 \n",
"2 37.700000 0.362000 29.000000 0 \n",
"3 23.600000 0.666000 26.000000 0 \n",
"4 25.600000 0.402000 22.000000 1 \n",
".. ... ... ... ... \n",
"589 27.981576 0.587583 48.143402 1 \n",
"590 33.975607 0.449215 31.378033 1 \n",
"591 48.316162 0.385976 27.272272 1 \n",
"592 31.985617 1.198703 33.027659 1 \n",
"593 33.423133 0.270142 45.196779 1 \n",
"\n",
"[594 rows x 9 columns]"
]
},
"execution_count": 39,
"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",
"execution_count": 41,
"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/NnZ2aFu3boYPXo0EhISLBUjUaVx9OhR9OjRA15eXrC1tYWfnx+GDx+Ov//+u8TrzMrKwrRp03Dw4MGyC5SonDt8+DAmTZqEuLg47Nq1C6NGjYJSKX8b1LZt29C6dWtcvnwZs2fPxp49e7Bnzx58/fXXcodGZhg4cCCcnJwKfd/JyempSP7oyStRl5IZM2bA398farUaR44cwVdffYUdO3bg0qVLcHBw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JWLhwIY4ePWp0TD09PTF//nwAwO3bt7Fw4UJERkbi1q1bJo89kNflY9++fQgLCzPc3i6oT58+GDZsGLZv347333//8QX9j6pVq+Krr77CW2+9hR49eqBnz54AgCZNmgAALly4gLCwMFhbW2PYsGHw8/PDjRs38PPPP2P27NkA8i66YWFhcHFxwaRJk2BtbY2vv/4abdu2xW+//YbmzZtLtjlmzBh4e3tj+vTpOH78OL755hu4urri2LFjqFWrFj7++GPs2LEDc+fORaNGjfDGG28Yli1tXS9J+Q8fPhwdOnQwvH799dclZaUvR72YmBj06dMHI0aMwIABA7By5Uq88sor2LlzJzp27Agg75iGh4cjPj4ew4cPR61atXDs2DFMnjwZd+/exYIFC4rcD3MdOnQIO3bsKPT93r17w8/PD3PmzMHx48fx5Zdf4sGDB1izZo1hnqFDh2L16tXo1asXJkyYgBMnTmDOnDm4cuWK0WcvLCwMw4YNg06nw6VLl7BgwQLcuXPH8KVGCIFu3brhwIEDGDJkCEJCQrBr1y5MnDgR8fHxhmNjCY8ePULbtm1x/fp1jB49Gv7+/ti0aRMGDhyI1NRUjB07ttBlr1+/juXLlxdre/rzlEajwa5duzBv3jzY2dlh5syZJd6HlJQUHDlyBEeOHMHgwYMRGhqKffv2YfLkyYiLi8OyZcsM8xbnuJlTZwu6desWOnfujHr16mHjxo2wsspLF8qiboeEhGDChAmSaWvWrMGePXsk08zdR3PO4/k9DdfcgsaMGQM3NzdMnToVcXFxWLBgAUaPHo0NGzYY5vnoo48wa9YsREZGIjIyEmfOnEFERITkix5Q/GOkv7MybNgw2Nrawt3dHcuXL8fbb7+NXr16Gb6oX7hwASdOnDCU6alTp3Ds2DH07dsXNWrUQFxcHL766iu0bdsWly9fNmo8Ks21AcirI+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",
"execution_count": 34,
"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 "
]
},
"execution_count": 34,
"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",
"execution_count": 6,
"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",
"execution_count": 7,
"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 "
]
},
"execution_count": 7,
"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",
"execution_count": 8,
"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 "
]
},
"execution_count": 8,
"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",
"execution_count": 36,
"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",
" Минимальное значение: 10.3\n",
" Максимальное значение: 47.5\n",
" 1-й квартиль (Q1): 23.5\n",
" 3-й квартиль (Q3): 33.1\n",
"\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",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAJKCAYAAADJM0hSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZDklEQVR4nO3de3zP9f//8ft7s6M5DnOIMMzIHDeUOaySIn3wicohImdCjoUiSgyxNYcQI1GG6lMRKjpoTDkUYo6hbY5z2nnv3x/99v56t2Hv2fbevG7Xy2UXez+fz9drj/f7vdfc38/38/V6m8xms1kAAACAATnYuwAAAADAXgjDAAAAMCzCMAAAAAyLMAwAAADDIgwDAADAsAjDAAAAMCzCMAAAAAyLMAwAAADDIgwDAADAsAjDAKz07NlTPXv2tGqLiopSx44dVadOHX366ad2qgz3q/DwcA0YMEDnz5/X4cOH1aRJE126dMneZRUK48ePV1BQkL3LAAq1IvYuAEDBdvHiRQ0cOFB169bV0qVL5ePjY++ScJ/p3LmzNmzYoBYtWshkMmnQoEEqXbq0v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LV++XFOmTFHbtm0tj82tY8aMGaMzZ85YXjQUKVLEKnhmPI5jx461Wved4d/rSu9UT4YbN25o9uzZGj58+B3v/52e/6z8+uuvKlasWK6E4ZIlS+qll15SVFSU6tatq759++r48eN64403brtNxgmlFy5cUMWKFS3
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABVEklEQVR4nO3dd3hUdf7+//tMZiadQAJJaBFRAZEgIFVgBUR0BQuWVVQQFcEVZFUU5CerIn6s2CiiLiKiIFhYULGygqhLEdaO5UtRaggtvUw7vz+ymXXMACOezMng83FdXDpn7sy8ZvDyujm83+cYpmmaAgAAAGKMw+4BAAAAgKNBkQUAAEBMosgCAAAgJlFkAQAAEJMosgAAAIhJFFkAAADEJIosAAAAYhJFFgAAADGJIgsAOKZwnx/gj4MiC+CofPzxx7ryyivVtWtXdevWTddcc42+/PJLu8fCH1hRUZHGjx+v9evXW/J6/fr10x133GHJawGoHRRZAL/ZypUrdf311ys1NVUPP/ywHnroITkcDl155ZWWlQjgt/ruu++0dOlSBQIBu0cBECVOuwcAEHseffRRnXrqqZo1a5YMw5AknX766TrzzDP10ksvqXPnzjZPCAD4I+CMLIDfpKKiQk2bNtWll14aLLGS5Ha7lZqaKq/XG5J99NFHNWDAALVr106dOnXSNddco++++y6YueOOO9S6devgrw4dOujyyy/Xt99+G8wMHTpUQ4cODZnj0UcfVevWrbV48eLgsS1btmjMmDHq2rWrunTpolGjRmnz5s2SpB07dtTIV1ZW6swzz1Tr1q1D3qt169a65pprQt7P7/erZ8+eNV7jp59+0tixY9WzZ0916NBBQ4cO1YYNG0J+tqSkRFOmTFHv3r3VoUMHXXzxxVq5cmXI+4X7tXbtWi1evFitW7fWjh07jvyb8wsHDhzQ5MmT1bdvX7Vr105du3bV6NGja7zOc889pzPPPFPt27fX5Zdfrg8//DD43tV+/PFHjRo1Sp06dVKnTp00evRobd++/YgzfPrpp7riiit02mmnqVu3bho3bpx2794tqebv+y9//fL7/fVnGjdunHr27Knc3FxdcMEFWrJkiSRp7dq1GjZsmCRp2LBhwf9ehg4dqttuu01jx45Vhw4dgr+vxcXFeuCBB9S/f3/l5uZq0KBBeu211w77eV577TW1adNGM2fO/N3fDQBrcEYWwG+SkJCgp59+OvjY4/GosLBQL730krZs2aLx48cHn6ter3jrrbcqJydHP//8s5588kmNGzdOy5YtCxbhRo0aacaMGQoEAsrLy9PMmTM1ZswY/etf/5LDUfPP29u2bdPcuXNDju3Zs0eXXXaZsrKydM899ygpKUnTp0/X1VdfrbfeeivsZ5k9e3bYgpicnKzPPvtMxcXFSk1NlSStW7dOBw4cCMlt2rRJf/nLX9SiRQtNmjRJLpdL8+bN09VXX605c+aoa9eu8vv9uvbaa4OFt2XLlvrnP/+p0aNH64UXXtDdd9+tkpISSdJll12mSy65RJdeeqkk6cQTT9TOnTuP9FtSg2maGjVqlAoLC3XbbbepYcOG+uGHH/TEE0/o7rvv1nPPPSdJmjFjhmbOnKnrrrtO3bt318cff6ybb7455LW2bt2qyy+/XC1bttRDDz0kn8+nWbNmaciQIVq6dKkyMjLCzrBkyRJNmDBBgwYN0qhRo3Tw4EFNmzZNl112mf75z3/qxhtv1OWXXy5JGjNmjNq2basbb7xRkpSTkxP2NW+//Xbt379fkydPVkpKipYuXaoJEyYoOztb7dq101133aV7771Xd911l7p16xb8uXfeeUfnn3++Zs2apUAgoIqKCl1xxRXav3+/xo4dq6ZNm2r58uW68847tW/fPt1www013vvtt9/W3//+d914440aPXr07/puAFiHIgvgdxk4cKC2bdsmSTr77LPVs2dPSVUFt7S0VJMmTdK5554rSeratatKSkr04IMPat++fWrUqJGkqrO5HTp0CL7mgQMHNGXKFB04cEANGzas8Z7333+/TjrppJCztnPnzpXH49Hzzz8ffN02bdpoyJAh+vLLL3XCCSeEvMbu3bv1j3/8Q6ecckrI60hS27Zt9dNPP2nVqlUaOHCgpKoi06VLl5AzlTNmzJDb7da8efOUkpIiSerTp48GDRqkhx9+WK+99ppWrVqlL7/8UjNnzlT//v0lSd27d9f27du1Zs0ajRkzJuS9s7OzQ76Lo5Gfn6/ExERNmDAhuMyjW7du2rZtmxYtWiRJKisr0z/+8Q9deeWVuu222yRJvXr1Unl5eTBT/RkTExM1d+7c4Gfs0aOH+vfvr9mzZ2vChAk13j8QCGjq1Knq1auXHn300eDxTp066dxzz9Vzzz2n8ePHBwur2+1Wenr6ET/3unXrNHr06OD32LVrV9WvX19ut1spKSk68cQTJVX9AaD63yXJ5XJp8uTJcrvdkqQFCxboxx9/1MKFC9WxY0dJUu/eveXz+fTUU0/p8ssvV/369YM/v2LFCo0fP14jR47U2LFjf9d3A8BaLC0A8LvMnDlTzz77rK666ip98MEHwTN6brdbzz33nM4991zt2bNHa9as0cKFC7VixQpJVUX3l3w+n7xer3bv3q23335bTZs2VXp6eo33W7Vqlf7973/XKAkbNmxQhw4dgiVWqiqFK1as0BlnnFHjdR566CF17txZffv2rfGcYRjq27ev/vWvfwVne//994Olttq6devUt2/fYImRJKfTqYEDB+qbb75RaWmpNmzYIJfLpX79+gUzDodDCxcurFFiDycQCMjv90eUzcrK0rx583Taaadpx44d+vTTT/Xiiy/qP//5T/B7/+KLL1RRUaFzzjkn5GcHDRoU8njNmjXq2rWrEhIS5PP55PP5lJKSos6dO+vf//532PffunWr9u7dW+O1cnJy1LFjR61bty7Sjx2iW7dumj59usaOHatXX31V+/bt04QJE9SpU6fD/lzLli2DJVaq+n1r2rRpsMRWO//881VZWRly9Y1vv/1Wf/vb35SZmam//e1vIfmj+W4AWIszsgB+l1atWqlVq1Y644wzlJCQoNmzZ+vLL7/Uqaeeqo8//lj333+/tmzZouTkZLVp00ZJSUmSQq/1uXPnTp1yyikhr/vggw/WWFbg9Xp1//33a8SIEWratGnIcwUFBWrWrFlEM69bt07Lly/XG2+8oWXLloXN9O/fX+PGjZPX69Xq1avlcDjUo0ePkExhYWHYM8YNGzaUaZoqKSlRQUGB6tevH3aJxG9x1llnSZISExPVvHlzXXzxxRo+fPgh82+88YYee+wx7d69W/Xr19fJJ5+shISE4PPVyyR+/YeFX/91eEFBgd5++229/fbbNd4j3B80qn9G0iG/m40bNx5y7sN5/PHH9fTTT+udd97Re++9J4fDodNPP1333ntvjf8efik5OTnkcWFhYcgfeH45m1R1Ga9qP/74o/r06aOVK1dq/vz5IWu1j+a7AWAtiiyA32T79u265ZZbNHLkSA0YMCDkudNOOy247rRBgwbBvwZ+5pln1Lx5cxmGofnz5+vjjz8O+blGjRpp1qxZkqTS0lK99NJLuueee9S9e3c1btw4mHvhhRfk8Xg0cuRI7du3L+Q1UlNTa6xhlaTVq1erWbNmwfW4fr9f9913n4YNG6aWLVse8nP26NFDfr9f69at09tvv62zzz67RhlNS0urMYck7d27V5LUoEEDpaamqqCgQKZphmyO27hxo0zTrFHgD2XWrFlq1KiRKisrtWHDBj300EOSFLbMrl+/XhMmTNDQoUN13XXXKSsrS5L08MMPBzeiZWdnS5L2798f8j38+jtMTU3V6aefXmPzm1R19jmc6r+WP9R306BBgyN82vBSU1N1++236/bbb9eWLVv0r3/9S0899ZQmT56sZ599NuLXSUtL088//xx2Nkkh8/Xu3VvPPPOMbrnlFj322GPq379/8L/Jo/luAFiLpQUAfpOmTZvq4MGDmjlzZo3lAatXr5ZUdZb2m2++UWVlpUaOHKmcnJxgiasusb88I+t2u5W
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAIgCAYAAABgXGRuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9y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v7+cnd31w8//JDvev58n82dO1d9+/aVt7f3Hfvl9fjfTXx8vMqUKZOvvnfj4+Ojffv2affu3bp27ZoyMzPznNnMi6+vryUIS1KNGjUkyRL4+/Tpo5SUFH3xxReSpC+++EIpKSl66qmnrMbp1auX1XaXLl108eJFnTx5Unv27JHZbM7z5zs9Pd1qeVKdOnVyBeE/27NnjwICAuTq6moZy93dXS1atNCuXbus+v75Z7lKlSqWJTNNmjSRi4uL+vbtq3nz5um7776Tt7e3Jk6cmCsIS7d+P0qUKKFu3bpZ7e/Zs6elPUe9evWsxsgJ26mpqXe9bcD9gplh4AGXM6NVp04dDRo0SBMmTNCGDRsss7RJSUl5hseKFSvKbDbr+vXrKlWqlE3f8+rVqwoLC9PUqVOtngTd3NzUsmVLrV+/Xu3bt1e9evV05MgR/f7771bHSso125YjISFBSUlJMpvN8vDwsKmuP9uyZYu2bNliVd+YMWMk3bpf8jr5K+e+utOMaI6dO3dagmCHDh1Up04dq/ZGjRrd8djs7GwtXLhQH3zwgVJSUlS1alX5+vrKxcXF0qdjx47697//rb/97W9q3ry
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAIgCAYAAABgXGRuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABSnUlEQVR4nO3deVxUZf//8feobIorKm6Viom44JKAmit6m6V5p5RLLrklKkq55HLnkmveiiuEOxqpqYVp/bI0tbvu2x0rl4TMNfdd0GRnfn/4YL5NojLIgHpez8eDB8y5rnPNZ84A854z1znHZDabzQIAAAAMKF9eFwAAAADkFcIwAAAADIswDAAAAMMiDAMAAMCwCMMAAAAwLMIwAAAADIswDAAAAMMiDAMAAMCwCMMAANgJ17UCHn+EYeAJ0aNHD/Xo0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CUKVOUmpqqwMBAq/Zjx46pU6dOqlixosaOHSsHBwdFRkbqrbfeUkREhHx9fS19mzVrpkGDBlluh4eH69ixY/e97+joaH399dc217xo0SLNmTNH3bt315gxYxQTE6PQ0FBduHBB06ZNkyR9//33GjhwoFq2bKm5c+fq5s2bmjFjhs6dO6d58+Zp7dq1ku6G6s8//9xy29XV9Z7Hk5KSouPHj2vGjBmaOnWqQkJClJiYqDfffFPXrl1TcHCwypcvr61bt+r999/X1atXNWDAgExrP3jwoEaMGKHXXntN48aN08qVKzVgwAB9++23KlmyZJYe/+XLl9WtWzfVqVNH06dPl6Ojo3788UctX75cpUuXVv/+/bM0zldffaURI0bo1Vdf1bvvvqtz585pzpw5OnbsmJYvXy6TyZSlcTIza9Ys3bp1S0WKFLlvH1ue/6SkJA0ZMkSNGzeWJP3666+aNGlSpn0znsvM+k2fPl3ffvutRo0aJQ8PDxUoUOCBY/3Vpk2b1LhxY02fPl1Xr17Vhx9+qKFDh1revO3bt0+9e/dWgwYNNHfuXMXFxWnevHnq2bOnPv/8czk7Oys2Nla9evVSmzZtNGfOHJnNZn311VcKCwtT5cqV1bZtW8v9hYaG6v3335erq6u8vb01cOBALViwQGFhYTZNYdq+fbuCg4P16quv6r333lNMTIzee++9B64zbdo0/e9//9OoUaNUsmRJ/fjjj5oxY4aKFSumgIAAJSUl6a233tLVq1c1dOhQlS5dWlFRUerXr5+WLl2qhg0bymw2KzAwUHFxcRoxYoRKliyp3377TXPnztWECRO0bNkypaenKzAwUKVLl9aMGTNUoEABRUZGauDAgfrmm2/03HPP6eTJk+rSpYsqV66sf//730pNTdWCBQvUtWtXbdy4UW5ublneFkBuIQwDT5B9+/apefPmcnBw0JIlS1SxYkWr9rCwMDk6OioyMtISFJs3b6527dppxowZVntCS5QoYfVR64Pmgqanp2vKlCmqUaOGfv31V0lS/vz5JemePbx/devWLYWHh6tz584aO3asJKlx48YqVqyYxo4dq969e+v5559XaGiovLy8FBYWZgl1jo6OmjdvnhITEy11/ve//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7vvbaa1qyZIlSUlIUGxurzZs3a/78+UpLS1NKSorV/Xl5eT3y401MTNSvv/6qFi1aWC1/+eWXH7ien5+f1q1bp7ffflsrV67UmTNnFBQUZHmDtGvXLpUqVUo1atSwPNa0tDS1aNFChw8fVlxcnNzd3RUZGakXXnhBZ8+e1Y4dO/TJJ5/op59+svyelixZUlWqVNG4ceM0atQoffXVV0pPT9eYMWP0/PPPS5J2794tX19fOTs7W+7L1dVV9evX186dOx95GwH2wJ5h4Ani6uqqDh06qHLlyurataveffddrV271rJnKy4uLtPwWLJkSZn
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAIxCAYAAACo1rVQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZSUlEQVR4nO3deXxM9/7H8feErGINEvS6CIktESqxtLa0V7VVvbilNLaiFM21dxFcS1wlqEpTFLUXbXRR/ZVbvdV71RatoqKx70nEkliyiMzvjz4yt1NBJjKZcF7PxyMPmfP9nu98ziRO3vOd75wxmc1mswAAAAADcnJ0AQAAAICjEIYBAABgWIRhAAAAGBZhGAAAAIZFGAYAAIBhEYYBAABgWIRhAAAAGBZhGAAAAIZFGAYAAIBhEYaBB1CvXr3Uq1cvq21xcXHq1KmT6tevr48//thBleFhtXz5cg0aNEgXLlzQoUOH1LRpU126dMnRZaGQvfHGGwoNDb3vcc6cOSN/f3+tX7++EKoC7KukowsAcP8uXryowYMHq0GDBlq8eLH8/f0dXRIeMl26dNGnn36qxx9/XCaTSa+++qoqVKjg6LJQyIYMGaLevXs7ugygSBGGgYfAhx9+qIyMDM2YMUPe3t6OLgcPIU9PT8XGxurkyZPy9PRUpUqVHF0S7KB69eqOLgEociyTAB5wly9f1urVq/Xcc8/d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04YcfymQy5WucvMyaNUtXr15VmTJl7tjHlp9/ZmamXnvtNT3++OOSpF9++UWTJ0/Os2/uzzKvftOnT9fXX3+t119/Xb6+vipZsuRdx8p1r9+5J598Uh4eHtq4caP8/Pws+3355ZeqU6eO6tevr8zMTPXp00cpKSkaMWKEKleurNjYWA0YMECLFi1SixYtLPvNnz9fo0aNUs2aNVWtWrV8PUa5IiIiFBYWpl69eumTTz7R3Llz9cUXX6hly5aKjo7Wpk2btGjRIjVs2FBPP/200tPT1bt3b5UvX14TJ05U6dKl9dNPPyk6Olpubm5Wj82qVavUr18/DRw4UKVKlVJWVpYkKTo6WhEREcrIyFDjxo21YcMGmx4/Sfr2228VHh6u5557TmPGjFF8fLzGjBlj07EDjkQYBh5Qu3fvVtu2beXs7KwPPvhANWrUsGqPjo6Wi4uLli9fbgmKbdu2VceOHTVjxgyrmdAKFSooKCjI6vad5OTkaOrUqWrQoIF++eUXSVKJEiUk6bbZot+7evWqYmJi1L17d0VEREiSHn/8cZUrV04RERHq16+f6tSpo3nz5qlevXqKjo62hDoXFxfNnTtXGRkZljr/85//SJJV3XkdT3BwsH744QdLrevXr1dCQoLWrFmjxo0bS5JatWql7OxsxcTE6MUXX1S5cuVuGzMxMVFPPfWUpk6dKicnJ1WsWFEdO3bU3r179eSTT97xuH8vISFB9erV09y5cy0/k5YtW2rbtm3auXOnXnnlFTk5OSk7O/uOY5jNZkVFRalVq1aKioqybK9Ro4b69u2rrVu3qm3btvmq54/279+vzz//XPXq1VNaWlqeffL6+d/NjRs3VKdOHcvPIzMz8459f/+z/GO/ffv26fHHH1f37t3v2OeP8vs799RTT+mrr77SiBEjJEnXr1/Xv//9bw0dOlSS9Pnnn+vQoUNat26dGjVqJElq3bq1evXqpaioKMXGxlrus2nTpurXr989HpW8tWrVSsOHD5ck1alTR19++aW8vLw0YcIESVLz5s21YcMG/fjjj3r66ad14sQJ+fj46O2339af/vQnS5+ff/5Zu3btshq7atWqGj16tOV27mx6z5491aFDh/t6/N577z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plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAJ6CAYAAADNSU//AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABzuElEQVR4nO3dd1yV5f/H8fdhKYgDF2pmKihOnDjKgaTl15VoaeUo09yZlpqWWzRT1NwjNXdaubO01FJzoGilJYaSmhOc4GAInN8fPjw/T6ACAge5X8/Hg0ec6x7nc7jA3uc6133dJrPZbBYAAABgQHa2LgAAAACwFcIwAAAADIswDAAAAMMiDAMAAMCwCMMAAAAwLMIwAAAADIswDAAAAMMiDAMAAMCwCMMAADzFuHcW8GQIw0A216lTJ3Xq1MmqLTg4WK1atVKFChX0zTff2KgyZFdLly5Vjx49dPnyZR0/flw1a9bUtWvXbF1WluLl5aUZM2Y80TmioqI0ePBgBQcHp1NVgDERhgGDuXr1qnr27Ck3NzctXLhQL774oq1LQjbTpk0bRUREqF69emrdurU6deqk/Pnz27qsbCckJEQbNmxQYmKirUsBnmoOti4AQOb68ssvFRMTo4kTJ8rd3d3W5SAbcnV11Zo1a3TmzBm5urqqUKFCti4JAB6KkWHAQK5fv66VK1eqZcuWSYLw6dOn1a9fP73wwguqWrWqOnXqpEOHDlnt4+fnJy8vryRffn5+VvsMGTLE6rgPPvhAXl5eCgoK0rlz5+Tl5aW1a9da7TNkyBCr80jSN998o+bNm6tSpUry9fXVjBkzlJCQYLXPzp079frrr6tq1aqqV6+eRowYoaioKAUFBSVbq5eXl2XayIOvp1y5cvLx8dF7772n69evW85/8+ZNffrpp2rcuLEqV66sFi1a6Ntvv33sz/r7779Xs2bNVLVqVbVp08bqo+wZM2bIy8sryTH//ej8+PHj6tu3r+rUqaOKFSuqfv36CggIUExMTLL7P+zc27ZtU5s2bVS5cm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UsGFDmc1m9enTR4cPH1a/fv3k4eGhn376SQMGDFBcXJxat26dohqBpwVhGDCAgwcPytfXV46Ojvriiy9UsmRJq+0zZ86Uk5OTli5dagmKvr6+atGihSZOnGg1Epo/f35VrVrV6vHDJCYmKiAgQBUrVtRff/0lSZYgkNzo2H03b97U7Nmz1b59ew0bNkySVK9ePeXLl0/Dhg1Tly5dVKZMGc2YMUPly5fXzJkzLcHDyclJ06ZNU0xMjKXO3bt3S5JV3cm9Hh8fH+3du9dS69q1axUaGqpVq1apWrVqkqT69esrPj5es2fP1uuvv658+fIlOeelS5f08ssvKyAgQHZ2dipYsKBatGih33//XY0bN37o635QaGioypcvr2nTpln65Pnnn9eePXsUFBSk7t27y87OTvHx8Q89h9lsVmBgoOrXr6/AwEBLe8mSJfX2229r586dSUY+U+ro0aOWEceoqKhk90mu/x/lzp07KlOmjKU/Hhxh/a8H+/K/+x05ckT16tVT+/btH7rPf/n6+mrOnDk6cuSIqlWrpn379qlkyZK6cuWKDh48qGeffVaHDh3SnTt31KhRI508eVLffvutPvzwQ8sbkxdeeEGFCxfW4MGDtWvXLjVs2FCSFB8frzFjxqhIkSJJnverr77SpEmTNGbMGL366quPrPFBrq6u8vT0lCR5enpavm/SpIk2btyo999/XyaTSZcuXdL+/fs1adIkq+M7deqkPn36SLr3O+3v769Zs2apYcOG2rt3r3bv3q2pU6eqWbNmln2io6MVGBioFi1ayMGB+IDsg2kSgAFUqFBBEyZMUN68eTV06FCdO3fOavuBAwfUqFEjqxFTBwcHNW/eXH/++adu376dpuddtWqVLl++bPmfriTly5dP9vb2unTp0kOP++233xQTEyM/Pz/Fx8dbvu5/HL9nzx7FxMTo2LFjaty4sdXoZrNmzbR169YUj8CazWbFx8crLi5OR44c0aFDh1SpUiVJ934uzzzzjCUI39eqVSvFxsbqjz/+SPacL730kqZOnSqTyaQ7d+7ohx9+sEwbeNCDr+2/obZevXpavny5cuTIoZMnT2r79u2aM2eOrl27pri4OElSgQIFFB4e/tDX9s8//+jSpUtJfo4+Pj5ydXXVnj17UlzPf39mAQEBevXVV1WuXLmH7pdc/z9KeHj4I0eZU6py5co6cOCA9u3bp5s3byo+Pv6xF5l5e3vLzc1Ne/fulSTt379ftWvXVpUqVXTw4EFJ0q5du1SmTBkVL15cBw4ckCQ1b97c6jzNmzeXvb291XSMfPnyJRuEf/75Z40ePVo1a9ZUu3btnug13/fqq6/q/Pnzlmk569evV65cudSkSROr/R4cgTaZTGrSpImOHDmimJgY7du3TyaTSQ0bNkzy93f58mWdOHEiXWoFsgre2gEG4OrqKn9/f5UuXVpvvPGG+vfvr9WrV1tGaSMjI5MNjwULFpTZbNatW7eUK1euVD3njRs3NG3aNA0ePNgqZDs7O6t27dpatWqV6tevL09PTx0/ftzqf7A3btyQpIdOBYiIiFBkZKTMZrMKFCiQqrr+a/369Vq/fr1VffenP0RGRiZ78df9n9XDRkTv2759uyUINmzYUKVLl7baXrFixYcem5iYqClTpmjFihW6c+eOihYtKm9vb+XIkcOyj6+vr7777jv973//U40aNXT69GmrgH7/5zh69GiNHj06yXNERESkuJ4HrV+/XqdPn9bcuXP12WefJbvPw/r/Ya5evaro6Gg988wzKarhUT766CNFR0erR48ejx0Rvs/Ozk4NGjTQvn371KdPH+3fv18ff/yxihUrZll+cPfu3WrUqJGke78bkpL8fjg4OMjNzU03b960tD3sb+evv/6Sr6+vfvnlF+3YsSPJnPm0qFOnjoo
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAJCCAYAAAAlYMo/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABarElEQVR4nO3deVxU9f7H8feAgCCuqGC2qCi4gpqgdt3CtTRLrcxcsrTcyd00ccvtKrhhuKTmlqK55s2ytJvd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8rPz08dOnTQxYsX09Rz8eJF9e/fX4GBgfL399c777yjQ4cOWfpT/5998803Cg4OVrVq1RQYGKjhw4db/ezNZrMWLlyol156SX5+fmrcuLHmz59vNbd3165d6tChg/z9/RUYGKghQ4bYPO0ldR9nzpwpX19fHTt2TL6+vlqxYoXVuL/++ksVKlTQV199ZdmHr7/+Wt27d5e/v78aNGigTz/9VCkpKVbrZeRYAeQkzgwDuYzZbNZff/2lsWPHKikpSd26dbPqP378uN58802VKlVKw4cPl5OTkxYvXqx33nlHCxYsUGBgoGVs/fr11bNnT8tyRESEjh8/ft/H3rVrl77++muba54zZ46mTp2qDh06aOjQoTp8+LDCw8P1119/afz48ZKk//73v+rRo4caNmyoadOm6fr165o0aZIuXLig6dOnW/7Qfvnll1q1apVl2d3dPc3+3L17VydOnNCkSZM0btw4hYaG6s6dO3r77bd19epVBQcHq2TJktq8ebM+/vhjXblyRd27d0+39gMHDmjgwIF67bXXFBISoqVLl6p79+769ttvVbRo0Qztf3R0tNq3b6+qVatq4sSJcnZ21k8//aTPP/9cxYsX1wcffJCh7WzYsEEDBw7UK6+8or59++rChQuaOnWqjh8/rs8//9wq3NkqLCxMN27cUIECBe47xpaff0JCgvr06aM6depIkv744w+NGTMm3bH3hqh/jps4caK+/fZbDRkyRN7e3sqTJ88Dt3Uvs9mspKQky3JycrIuXLigTz/9VLdu3dKrr75q6Rs1apTWrFmjbt26qVq1atq5c6fGjx+vuLg49erVSykpKerWrZuKFy+uSZMmKU+ePFq8eLF69Oihb775Rs8991yax1+6dKk++eQTvfPOO6pXr562bdumkJAQqzExMTF666235OrqqpCQELm6umrRokVq3769Vq1aJW9vb8vYkSNHqk2bNoqIiNCBAwc0depUFS5cWAMGDJAkTZo0SYsWLdK7776rf/3rXzp48KBCQ0Mtx4mdO3fq3XffVa1atTRt2jTFxsZq+vTp6tSpk1atWqW8efM+9DmV/v55tW3bVq+//rreeOMNlStXTv7+/lq/fr3atm1rGbdu3Tq5ubmpSZMmunLliuV5rl+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Ip2rZsqUSEhK0f//+dLfZpEkTTZ06VSaTSbdv39Y333xjmTZwr3v37Z+htk6dOlq6dKlcXFx0/PhxbdmyRbNmzVJMTIwlSHl4eCgqKuq++3by5EldunQpzfMYEBAgd3d3/fLLLxmu55/P2dixY/X666+rfPny9x2X3s//QaKioh54ljmjqlSpoh07dmjbtm26ceOGkpKS0rytfj+VKlXSqlWrtGrVKkVERMjHx0elSpXStGnT1KxZM8u43377TWazOd3f0YSEBO3evVtFixZV2bJlFRISoiFDhmjDhg1KSUnR0KFD0w1oJ0+e1NWrVy2BO9VLL71ktbxt2zZVqFBBnp6elsd1cHBQvXr19Ouvv1qN/ecLQC8vL8s0iX379ikpKUlNmjSxGjN8+HDNmzdP8fHx2r9/v+rXr2/5f5KUlKRnnnlG3t7eaX5/bJUaelPv0rFnzx6dPn1arVq
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAImCAYAAABTm0IfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB4XUlEQVR4nO3dd3hU1boG8HfvqekhlRaICAkt9BJEFBAFEfAoeix0QUApFlTkihTxYAOlI4qINMXCQQTLERUrXUGqShFCSSOkTDJ9r/tHyMiQSZiEyewhvL/nydXs/c3km0m8583KKpIQQoCIiIiIqBqS1W6AiIiIiKiqMOwSERERUbXFsEtERERE1RbDLhERERFVWwy7RERERFRtMewSERERUbXFsEtERERE1RbDLhERERFVWwy7RERE1QTPiSIqjWGXSGU//vgjBgwYgA4dOqBjx44YNmwY9u7dq3ZbdBUbNGgQBg0apHYbVerZZ59F9+7d/f51T506heTkZKxbt87vX7s86enpGDlyJE6fPu2T50tOTsb8+fN98lxEamPYJVLRli1b8PDDDyMsLAyvvvoqXnnlFciyjAEDBmDXrl1qt0dEV4lffvkF33//vdptEAUkrdoNEF3LZs+ejZYtW2Lx4sWQJAkAcMMNN+CWW27BqlWr0K5dO5U7JCIiurpxZJdIJRaLBXXq1MG9997rCroAoNfrERYWBrvd7lY7e/Zs3HbbbWjevDnatGmDYcOG4dChQ66aZ599FsnJya6PVq1a4f7778eBAwdcNZ7+vD179uxSf5Y9duwYxo4diw4dOqB9+/YYNWoUjh49CsDzn3GtVituueUWJCcnu32t5ORkDBs2zO3rOZ1OdO7cudRz/P333xg/fjw6d+6MVq1aYdCgQdi9e7fbY00mE2bMmIEuXbqgVatW6N+/P7Zs2eL29Tx9bN++HevWrUNycjJOnTp1+W/ORXJycjB9+nR069YNzZs3R4cOHTBmzBjX87z55pto3rw58vLy3B63fPlyNGvWDOfOnQMA/PbbbxgwYABatWqFrl274r333sPQoUPx7LPPVqgfu92OWbNm4aabbkKLFi0wfPhwrF+/vszXVtaf3T1NA1i/fj3uuusutGzZEl27dsXs2bNhs9lc9/ft24fhw4ejY8eOaNOmDUaPHo2//vrL7Tnee+899OrVCykpKejSpQumTZsGk8nkuq8oCt566y3ceuutaN68OXr27ImVK1dW6D0oy0cffYQ77rgDzZs3R9euXTF//nw4nU4AwGeffYbk5GT8+eefbo/ZvHkzkpOTcfDgQQBAbm4upkyZghtuuAEpKSn497//ja1bt1a4l88//xx33303Wrdujc6dO2PKlCmun5HL/ax6cvLkSYwePRodO3ZEy5Ytcd9997lGctetW4dJkyYBAG655RbXz1T37t0xc+ZMDBkyBC1atMBzzz0HAMjMzMSkSZNw8803o0WLFrjnnnvwzTfflPt65s2bhyZNmuC///2v69quXbswcOBAtGzZEh06dMDEiRORk5NT4feKqKox7BKpxGg04s0338Q999wDALDZbMjKysIbb7yBY8eO4d5773XVPvPMM/jkk08wcuRILFu2DJMmTcJff/2FCRMmuC1IiY2Nxdq1a/H+++9j5syZKCgowNixY6EoisceTp48ieXLl7tdy8jIwH333Ye///4b06ZNw2uvvYbs7GwMGT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BgDceeedOHnyJH7//XcAwDfffAObzYZ+/foBALZu3YrY2Fg0a9bM9RxOpxPdunXD/v37S01V8WTPnj2w2Wylvift2rVDnTp1XO9VRcTExKBhw4Z4/vnnMXHiRHz22WdQFAWTJk1Co0aNyn1
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABh3UlEQVR4nO3deXxU9b3/8fc5s2bfSMIWRFYXVguItShi3erSn9rWWwXFFoGq9bpSrVRxtwpqK7ggtSjqVVu8VWuvtrbu4oKtiqIiyA4JCSH7rOec3x9DRkcCDDjJSfD1vI9cyJlPZj6Z+OjjzTef8/0ajuM4AgAAALoY0+0GAAAAgL1BkAUAAECXRJAFAABAl0SQBQAAQJdEkAUAAECXRJAFAABAl0SQBQAAQJdEkAUAAECXRJAFAOwzOOMH+HYhyALYK6+99prOOussjRkzRoceeqjOPfdcffDBB263he0GDx6su+++u12ee9KkSZo0aVK7PPc3cc899+gPf/hDRp7ryiuv1IQJEzLyXADaD0EWwB57+eWXdd555ykvL0+33Xabfvvb38o0TZ111llaunSp2+2hnV177bW69tpr3W5jB7/73e8UCoXcbgNAB/K63QCArmfOnDkaPny47r33XhmGIUn67ne/q6OPPlqPPPKIRo0a5XKHaE8DBgxwuwUAkMSKLIA9FA6H1atXL/34xz9OhlhJ8vv9ysvLUywWS6mdM2eOjj32WA0ZMkSHHHKIzj33XH3yySfJmiuvvFKDBw9OfowYMUL/9V//pY8//jhZ09avsufMmaPBgwfrqaeeSl774osvdOGFF2rMmDEaPXq0pk2bplWrVkmSNmzYsEN9JBLR0UcfrcGDB6e81uDBg3XuueemvJ5lWTr88MN3eI41a9booosu0uGHH64RI0Zo0qRJeu+991K+tqmpSTfccIPGjRunESNG6PTTT9fLL7+c8nptfbz99tt66qmnNHjwYG3YsGH3P5yvaWpq0uWXX66RI0fqsMMO04033piyYjlp0iRdc801uueeezRu3DgNHz5c5513nmpqarR48WIdc8wxGjlypCZPnpzy+umMFuzqfWn9ntr6uPLKK9t8Ptu2deedd2rChAkaMmSIJkyYoDlz5iT/e2v9Gc6dOzf597vvvlvHHHOM5s6dqzFjxuh73/ue6uvrZVmWHn30UZ188skaNmyYxo8fr9mzZysSiez0+1m+fLlGjRql8847T9FoVJJUV1ena665Rt/97nc1dOhQ/eQnP9GSJUt292MBkEGsyALYI8FgUPfdd1/y82g0qvr6ej3yyCP64osvNGPGjORjM2bM0NKlS3XppZeqT58+Wrt2rX73u9/psssu03PPPZcMwqWlpZo7d65s21ZlZaXmzZunCy+8UP/85z9lmjv+e3vdunVauHBhyrWqqiqdccYZKi8v16xZs5Sdna27775b55xzjv7617+2+b0sWLCgzYCYk5Ojd999V42NjcrLy5MkvfPOO6qtrU2pW7lypX7yk5+ob9++mjlzpnw+nx5++GGdc845evDBBzVmzBhZlqWf/exnyWDXr18//e///q8uuOACPfTQQ7r22mvV1NQkSTrjjDP0ox/9SD/+8Y8lJVY+N27cuLsfyU4tWrRIRx55pO666y6tXr1ad955pzZv3qx58+Yla/7617/q4IMP1k033aTKykpdf/31mjhxogKBgH71q18pFArpmmuu0fXXX6/58+en9bq7e1/Gjx+vJ554QlJirnX58uWaO3euJKm4uLjN53zggQf0P//zP/rVr36liooKffDBB7rzzjvl8/l00UUX6Yknntjh/ZOkTZs26ZVXXtGdd96puro6FRQU6Oqrr9bTTz+t8847T6NGjdLy5cs1b948ffLJJ1qwYEHKP9AkadWqVfr5z3+u4cOHa968efL7/YpEIjrnnHNUU1OjSy65RGVlZVq8eLGmTJmiBQsW6LDDDtujnxWAvUOQBfCNnHjiiVq3bp0k6bjjjtPhhx8uKRFwm5ubNXPmTP3gBz+QJI0ZM0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xxwgLKzsyWl7ve5ceNGHXzwwSnPe+utt+4wVhCLxXTzzTdrypQp6tWrV8pjdXV16t27d1o9v/POO3rxxRf1zDPP6Lnnnmuz5vvf/74uu+wyxWIxLVmyRKZp7vDr4vr6+jZXjLt16ybHcdTU1KS6ujoVFha2OSKxJ4455hhJUlZWlioqKnT66adr8uTJu/yar4Z6SSopKZEkNTQ0JK99NWy2av0Z7a103pecnJw9es4pU6YoJydHixcv1uzZs3X77bdr4MCBmjlzpsaOHbvLr/3qa7UGzK+/N16vV0VFRSmBva6uTv369VNDQ4Nuv/32lO3M6urqVF1dvcN/t62qq6tT/oEAoH0QZAHskfXr1+uSSy7R1KlTkyt8rb7zne8k506Liop0wQUX6Pvf/77uv/9+VVRUyDAMPfroo3rttddSvq60tFT33nuvpMQq2COPPKJZs2Zp7Nix6tGjR7LuoYceUjQa1dSpU1VTU5PyHHl5eTvMsEqJlbPevXsn5x4ty9KNN96os88+W/369dvp93nYYYfJsiy98847+tvf/qbjjjtuhzBaUFCwQx9SIsRIUlFRkfLy8lRXVyfHcVJmL5cvXy7HcXYahL7u3nvvVWlpqSKRiN577z399re/laRdhtm6uro2+2oNtO0lnfdlT7Vu73bWWWdp69ateuWVV3Tffffpl7/8pd54443kr/zT6a21l6/+YygWi2nbtm0pvRUWFmrBggV65plnNGvWLL344ovJ8ZC8vDz17dtXs2fPbvN10v1HFYBvhtECAHukV69e2rZtm+bNm7fDeEDrHduDBg3SRx99pEgkoqlTp6pPnz7JENcaYr+6Iuv3+zV06FANHTpUY8eO1UUXXaRwOKz3338/WbN161bdc889mjFjhoLB4A59jRo1Sh988EFKmN26dau
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAKJCAYAAABeTyRIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAByDUlEQVR4nO3dd1iV9eP/8ddBQFDce6aC4sQVjpyhXxuS5UjNlYojc3w0dxmOXLkVxZErFdNyW5mllpUpimVqbnMPXCQOppzfH16eX0fAOEcOBzjPx3V5CffideDt8XVu3vd9DEaj0SgAAADAATnZOwAAAABgL5RhAAAAOCzKMAAAABwWZRgAAAAOizIMAAAAh0UZBgAAgMOiDAMAAMBhUYYBAADgsCjDAAA4MGvfe4v37EJmQRkG0qHOnTurc+fOZsvCwsLUokULVaxYUV999ZWdkiGzWrFihXr37q2bN2/qxIkTevHFF3Xnzh17x0rXNmzYIG9vb12+fDnZbby9vRUUFJSGqVIuNjZWEydO1NatWy3aLzIyUsOGDVNYWJiNkgFpizIMZAC3b9/We++9pzx58mjJkiVq0qSJvSMhk2nVqpVu3Lih+vXr66233lLnzp2VN29ee8fK8NauXau3337b3jGSdOPGDX3++eeKj4+3aL/jx49r8+bNSkhIsFEyIG052zsAgP+2bNkyRUdHa8qUKSpUqJC94yAT8vDw0Pr163XhwgV5eHioQIEC9o6UKVSrVs3eEQD8B84MA+lcRESEVq9erTfeeCNRET5//rwGDBigevXqqVq1aurcubMOHjxoto2fn5+8vb0T/fHz8zPbZsSIEWb7ffDBB/L29lZoaKguX74sb29vbdiwwWybESNGmB1Hkr766is1b95clStXVuPGjRUUFKRHjx6ZbbN79261b99e1apVU/369RUYGKjIyEiFhoYmmdXb29s0beTfj6d8+fLy9fVV//79FRERYTr+vXv3NGnSJDVt2lRVqlSRv7+/1q1b95/f62+//Vavv/66qlWrplatWpn9GjgoKEje3t6J9nn61+AnTpxQv379VKdOHVWqVEkNGjTQ+PHjFR0dneT2yR17x44datWqlapUqaJ69epp/PjxevjwoUV5nnw/Q0NDTetv376tF198Mcmfv5OTk0qXLq0CBQqY/fyfpX379kn+vP6935Osz9ouMjJSH374oerXr//MYz3t6NGjevfdd1WzZk1Vr15dXbt21aFDh0zrR4wYoYCAAK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WKmIvxEixYtFBMToz///DPJYzZr1kwzZ86UwWDQw4cPtW3bNtO0gX/792N7utTWr19fq1atUtasWXXmzBnt3LlT8+fP1507dxQbGytJypcvn8LDw5N9bH///beuX7+e6Pvo6+srDw8P7dmzJ8V5nv6ejR8/Xm3atFH58uWT3S6pn/+zhIeHP/Msc0pVqVJF+/fv1969e3Xv3j3Fx8f/5wVaZcuWVd68efXee+8pMDBQP/zwg/Lnz6+hQ4eqcOHCpu1y5cplKsKSTOOsatWqpmVPXiBFRkbq3Llzunnzpvz9/c2+XsmSJVW9enXt37/fbPmwYcMUGhqq/v37q0SJEv/5WJ8em4ULFzZNgdm3b59cXFzMXoA5OTnp9ddf/8/jPq127dr68ssv1bNnT61atUqXLl1S3759n/liasSIERoyZIgiIyN16NAhbd68WSEhIZJkGsPWsiYPkBY4MwykUx4eHmrZsqXKlCmjd955RwMHDtTatWtNZ2nv3r2bZHnMnz+/jEaj7t+/r+zZs1v0Nf/55x/Nnj1bw4YNMyvZ7u7uql27ttasWaMGDRrIy8tLJ06c0OnTp832lZT
"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",
"execution_count": 17,
"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++++RmZmJqVOn4sCBA1yHhcuXLyMkJAS2trb48ssv0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rDy68Pt27cZj8djY8aM0SqzaNEiBoAdOnRIM0z
"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/D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y9e1fjmFQKDw/HJ598gsmTJ6v1FFTFMaXCKmHbtm0MADt27BhLSkpiL1++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++uqevcuXPg8XjYu3cv5s6dC0dHR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OqvsCsGrZt28YAsIiICJaWlsaePXvGfv31V2ZjY8OkUil7/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",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка после oversampling: (5808, 18)\n",
"stroke\n",
"0 2917\n",
"1 2891\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAosAAAH4CAYAAAAitKflAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABbUUlEQVR4nO3dd3iT5eLG8TvppgMoo+whU7YgDjaITAcuBMdBPAoOP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YkpOTrcjISOv111+3LrnkEuuuu+7K93p169a1+vfvn+fy1NRUa8CAAZYk68033yzS9leuXGlJsl588cU838vKyrISEhJc/37llVcsSdb8+fPdft5ut1uPP/6467LFixdbkqw2bdpYkqw1a9a4bXfIkCFWZGRkvvfVE6/ss9ijRw9J0u7duyVJJ06c0GOPPaaWLVsqKipKMTEx6tu3r9avX5/nZ9PS0jR27Fg1btxY4eHhql69um688UbFx8dLkvbs2eO29H3uV+7ZlZyp188++0xPPfWUqlWrpsjISF133XX5Ll2sWLFCffr0Ufny5VWuXDl17drV4/4w3bp1y/f2x44dm+e6H3/8sdq1a6eIiAjFxsZq0KBB+d7++e5bbk6nUxMnTlTz5s0VHh6uuLg4DR8+XCdPnnS7Xr169XTNNdfkuZ0RI0bk2WZ+2cePH5/nMZWk9PR0jRkzRg0bNlRYWJhq166txx9/XOnp6fk+Vrl169Ytz/ZefPFF2e32PO+OCvp4vPrqq+rQoYMqVaqkiIgItWvXTl988UW+t//xxx/rsssuU7ly5VSxYkV16dJFP/74o9t15s6dq65duyo6OloxMTFq3759nmyzZs1y/U4rV66sO+64QwcPHnS7zl133eWWuWLFiurWrZuWLFlywccpPj5e7du3V2hoaJ7vVa1a1fX4VKlSRZI0bty4PM/BnKWF+Ph49evXT9HR0br99tslSSkpKRo1apRq166tsLAwNWnSRK+++qosy7pgthdeeEF2u11vvPGG22PWuXNnRUZGKjo6Wv3799eff/55wW2duytLuXLl1LJlS/33v/8t1M/l9zVt2jS3x2HXrl3q3bu3IiMjVaNGDT333HN57q/J11ZhxytvPwfffPNNNW/eXGFhYapRo4YefPBBnTp16oL3Jed3sWfPniI9PllZWXr++efVoEEDhYWFqV69enrqqafyjCf16tXTXXfdpaCgILVu3VqtW7fWV199JZvNpnr16uW5rXOdu3RYrVo13Xrrrdq3b5/rOjljzquvvupxO2PHjnW7D7///rvCw8MVHx/vevyqVaum4cOH68SJE3l+vqC/t4I8Z3Py5jzXpexZrnbt2ql+/fo6fPiw6/KCPrfzc+7z6Nyvc3eDKch9lKStW7dq4MCBqlKliiIiItSkSRM9/fTTea6X+3d3vtst6jiU4+uvv9bZs2d1yy23aNCgQfrqq6+UlpZW4J+PiIjQ9OnTFRsbqxdffDHP+FKQ7ed0nY4dO+bZflBQkCpVquT696OPPqpWrVrpgQceUFpamhwOh+677z7VrVtXY8aMyfPzDz30kCpWrJhvTymsIi1DnyvnzubcqV27dmn27Nm65ZZbVL9+fR09elRvv/22unbtqs2bN6tGjRqSJIfDoWuuuUYLFy7UoEGD9PDDDyspKUkLFizQpk2b1KBBA9dtDB48WP369XO73dGjR+eb58UXX5TNZtMTTzyhY8eOaeLEierZs6fWrVuniIgISdKiRYvUt29ftWvXTmPGjJHdbtcHH3ygHj16aMmSJbrsssvybLdWrVp6+eWXJUnJycm6//77873tZ555RgMHDtQ999yj48eP64033lCXLl20du1aVahQIc/PDBs2TJ07d5YkffXVV/r666/dvj98+HBNmzZNQ4cO1T/+8Q/t3r1bkydP1tq1a7Vs2TKFhITk+zgUxqlTp1z3LTen06nrrrtOS5cu1bBhw3TxxRdr48aNmjBhgrZv367Zs2cX6nY++OAD/etf/9L//d//uZZWz3Whx2PSpEm67rrrdPvttysjI0OffvqpbrnlFn333Xfq37+/63rjxo3T2LFj1aFDBz333HMKDQ3VihUrtGjRIvXq1UtS9h++u+++W82bN9fo0aNVoUIFrV27VvPmzXPly3ns27dvr5dffllHjx7VpEmTtGzZsjy/08qVK2vChAmSpAMHDmjSpEnq16+f9u/fn+/vPkfdunW1cOFCHThwQLVq1cr3OlWqVNHUqVN1//3364YbbnAtx+Us0UnZf4h79+6tTp066dVXX1W5cuVkWZauu+46LV68WH//+9/Vpk0bzZ8/X//85z918OBBV978/Otf/9JLL72kt99+W/fee68kafr06RoyZIh69+6tV155RampqZo6dao6deqktWvXFugP+YQJE1S5cmWdOXNG77//vu69917Vq1fP4xJQly5dNH36dNe/X3zxRUly+0PToUMH1/87HA716dNHV1xxhf7zn/9o3rx5GjNmjLKysvTcc8+5rmfytZX7vlxovPL2c3Ds2LEaN26cevbsqfvvv1/btm3T1KlTtWrVKq/db0/uueceffjhh7r55ps1atQorVixQi+//LK2bNmS57WeW1ZWVr7F4nw6d+6sYcOGyel0atOmTZo4caIOHTpUoDdwniQmJiotLU3333+/evToofvuu0/x8fGaMmWKVqxYoRUrVigsLExS4X5vBX3O5paZmambbrpJ+/bt07Jly1S9enXX94r73A4LC8vzJm7VqlV6/fXX3S4r6H3csGGDOnfurJCQEA0bNkz16tVTfHy8vv32W9frObec350kbdmyRS+99JLb970xDs2YMUPdu3dXtWrVNGjQID355JP69ttvdcstt1zwZ3NERUXphhtu0HvvvafNmzerefPmhdp+3bp1Xdft2LGjgoM917Lg4GC988476tChg55//nlVrVpVf/zxh+bNm5f
"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",
"execution_count": 24,
"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+cUlEQVR4nO3dd3hT1f8H8HeStkk3lNJBGQXKpqwyhAJllwICimxkyfjJUBRF0S9TFBkCykYBFVBZynBQ9pSlLNmrZRTaUko36UjO74+aa9OkpSktN23fr+fpA7m543PPXZ977rknCiGEABERERFRCaSUOwAiIiIiIrkwGSYiIiKiEovJMBERERGVWEyGiYiIiKjEYjJMRERERCUWk2EiIiIiKrGYDBMRERFRicVkmIiIiIhKLCbDRERE+RQXF4ebN28iI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jAr7/+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",
"execution_count": 48,
"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 "
]
},
"execution_count": 48,
"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",
"execution_count": 28,
"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",
"execution_count": 49,
"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",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABH3klEQVR4nO3deViU9f7/8dcMiwICoqCouSO4oKgp7htZ5lZftY7lvh1RUcsl1MJEMzIVTcVcM3NLTWw7mR7tlGhZqHXMciF3LXdFxQUQ5veHP+Y0AToVMNz1fFwXl3J/3jPzvmfw8sXn/tz3bbJYLBYBAAAABmN2dAMAAADAH0GQBQAAgCERZAEAAGBIBFkAAAAYEkEWAAAAhkSQBQAAgCERZAEAAGBIBFkAAAAYEkEWAP6GuBcOgL8CgizwF7Bjxw717NlToaGhatSokfr37699+/Y5ui38f71791bv3r1zHQ8KCtK8efMKrJ/PPvtM48aNs35/5swZBQUF2XwFBweradOmGjp0qL799lubx3/zzTcKCgrSN998U2A9G9G8efOyva9169bVk08+qbVr19rUbty40Vpz/PjxHJ8vISHBWpOFzwJ/d86ObgDAn/PFF19oyJAhat26taZPny5JWrlypXr27Knly5erQYMGDu4Qhc3y5ctz3D506FC1bt1akpSamqpz585Zf5bmzZuntm3bSpJq1aqldevWKSAgoIA6NrZ169ZJkjIzM5WSkqKEhARNmjRJTk5Oevrpp21qzWazNm/erKFDh2Z7nk2bNhVIv4CREGQBg4uNjVVISIgWLFggk8kkSWratKkeeeQRrVq1iiALu1WoUEF169a12da+fXv16tVLL730kho3bqxixYqpWLFi2eqQu9++Vy1bttShQ4e0du3abEG2fv36+vTTT7MF2bS0NG3btk01atTQwYMH87tlwDBYWgAY2J07d1SuXDk9/fTT1hArSa6urvL09FR6erpNbWxsrB577DEFBwerfv366t+/v81/iuPHj892GPSZZ57Rjz/+aK3J6TB5bGysgoKCtHHjRuu2Y8eOafjw4QoNDVXDhg0VHh6uo0ePSvrfoexf16empuqRRx6xOWzau3dvBQUFqX///javl5GRoWbNmmV7jhMnTmjkyJFq1qyZ6tatq969e2vv3r02j01JSdErr7yiFi1aqG7duurWrZu++OILm9fL6eubb76xHv49c+bMgz+cPyEzM1OLFy/Wo48+quDgYLVr104rV67M9h4sXrxYnTp1Up06dayf1ddff22tmTdvnh599FHFxcUpNDRUzZs31xNPPKHExEQlJibadUja1dVVI0aMUHJysj799FNJ2Q9n37lzR9HR0WrZsqWCg4P1+OOP66233rJ5nuTkZL388stq2rSpateurX/84x/atWuXTc2VK1c0efJktWnTRsHBwQoNDVVERITN+33q1CkNGTJEjRo1UkhIiLp3767t27fbPE9SUpLCw8NVv3591a9fXxERETp9+vQD3/cvv/xSPXr00MMPP6xGjRppzJgxOnv2rKTs/zZ+/fXrn0F7eXl52fybzdKhQwcdPnw42/KChIQEmUwmtWzZ8ne/FvBXxowsYGBFixbVwoULrd+npaXp2rVrWrVqlY4dO6bIyEjrWGRkpPbs2aPRo0erQoUKOnnypObMmaMxY8bok08+sf6n6ufnp7i4OGVmZurcuXOaP3++hg8frs8++0xmc/bffU+dOpXtUPX58+fVvXt3lS5dWtHR0XJ3d9e8efPUt29f/etf/8pxX5YuXZpjQPTw8NDu3bt148YNeXp6SpISExN15coVm7ojR47oH//4hypVqqSoqCi5uLhoxYoV6tu3r5YtW6bQ0FBlZGRowIAB1sBbpUoVvf/++4qIiNA777yjSZMmKSUlRZLUvXt3PfXUU9YZs4CAAP38888P+khyZbFYdPfuXbtqo6OjtXHjRoWHh6tevXravXu3YmJidP36dUVEREiSZs6cqXfffVdjxoxRUFCQzp8/r/nz5+u5557TF198ITc3N0nSL7/8ou3bt2v27NlKTk5WUFCQXnjhBUnSpEmTFBAQoOTk5Pv206RJE5nNZn377bfZZhAlKSYmRjt37tS4cePk6+urhIQETZ8+XcWLF1e3bt2Umpqqvn376tKlSxo1apRKlSql+Ph4DRo0SEuXLlWTJk1ksVgUHh6ua9euaezYsfL19dXhw4f1xhtvaNKkSXrrrbeUmZmp8PBwlSpVStOnT5ezs7NWrFihoUOH6tNPP1XFihV1/PhxPfPMM6pSpYpef/113b17VwsWLNCzzz6rDz/8UCVLlsxxHz/44AONGzdOnTp1Unh4uK5evaq5c+eqe/fuev/99zVs2DA988wzkqThw4erZs2aGjZsmKR7M9n38+vP/datW0pISFBCQoKmTp2arbZZs2by9vbOtrxg06ZNevTRR+Xi4nLf1wL+bgiywF9Ix44dderUKUlSu3bt1KxZM0n3Au7NmzcVFRWlDh06SJJCQ0OVkpKiadOm6dKlS/Lz85N0bwbu14dCr1y5oldeeUVXrlyRr69vtteMiYlRtWrVbGZtly9frrS0NL399tvW561evbqeffZZ7du3T1WrVrV5jrNnz2rJkiWqVauWzfNIUs2aNXXixAklJCSoY8eOku79p96wYUOb2cS4uDi5urpqxYoVKlasmCSpdevW6tSpk6ZPn64NGzYoISFB+/bt0/z5863rPRs3bqzTp0/r66+/1vDhw21e29/fP88Ooe/evVu1atV6YN3x48e1fv16jR49WoMHD5YkNW/eXCaTSYsWLVKPHj3k4+OjCxcuaNSoUTaz40WKFNGIESN0+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09JyYmatu2bfroo4/0ySef5FjTtm1bjRkzRunp6dq1a5fMZrOaNGliU3Pt2rUcZ4x9fX1lsViUkpKi5ORkFS9ePMclEr/Ho48+Kklyc3NT+fL
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABbEklEQVR4nO3deVyU5f7/8fcguygiIppmKiqK+4LLN1cyj5V5cknLLU3LylQw0zLTXLByN42M3LdcwszKkx3tZLaI4snUBHHPJcAt1Nhlfn/4Y04TqAw3OCyv5+MxD53ruu9rPjPI7Xuuue57TGaz2SwAAAAAeeJg7wIAAACAooxADQAAABhAoAYAAAAMIFADAAAABhCoAQAAAAMI1AAAAIABBGoAAADAAAI1AAAAYACBGgAAADCAQA0gzwYOHKiBAwdatUVFRal79+4KCAjQpk2b7FQZiqtVq1Zp+PDhunjxomJiYtSiRQtduXLF3mXlSmxsrEJCQvTggw+qQYMGatu2rYKDgxUTE3PPali4cKH8/f1v23/u3Dn5+/tr8+bN96wmoDhwtHcBAIqPy5cv64UXXlD9+vW1dOnSO/7HDeRFz5499emnn6pt27YymUx68cUXVb58eXuXdVfHjh1T37591aRJE02cOFHe3t6Ki4vTmjVr1KdPH61atUpNmjSxd5mqWLGiNmzYoGrVqtm7FKBIIVADyDfLly9XSkqKZs6cKV9fX3uXg2LIw8NDEREROnPmjDw8POTj42PvknJl+fLl8vLy0kcffSRHx//919u5c2d17dpVYWFhCg8Pt2OFtzg7OxeKYA8UNSz5AJAvrl69qnXr1unxxx/PFqZPnz6tUaNG6cEHH1STJk00cOBA7d+/32qboKAg+fv7Z7sFBQVZbfPaa69Z7TdmzBj5+/srMjLyth9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lkfffRRbd++PdczwWazWRkZGUpLS9PBgwe1f/9+S+DYu3evqlSpYgnTWbp3767U1FT98ssvOY7ZpUsXzZs3TyaTSUlJSfrXv/5lWQLxV399bn8Pxm3bttWaNWvk4uKi48ePa+fOnfrggw905coVpaWlSZK8vb0VHx9/2+d28uRJxcXFZXsdAwMD5eHhoR9++CHX9fz9NZs+fbp69+6tunXr3na7nH7+dxIfH3/H2e7catiwofbu3auffvpJ169fV0ZGRrZlHLczevRo7d69W3PmzFHv3r3l4eGhzz//3HJS4l/5+flZhdwKFSrIy8vLEqalW//er1+/LulWuE5LS1O3bt2sxmnRooWqVKmivXv3WrUPGzZMx44d04QJE+Tl5XXX2v/679TZ2Vnly5e3LO3Zs2eP7r//fsu/benWJzWdOnW667hAccEMNQBDPDw81KNHD9WsWVNPP/20goODtWHDBstscWJiYo4BtEKFCjKbzbpx44ZKly5t02P+8ccfWrBggcaNG2cV1N3c3NSqVSutX79e7dq1U61atRQTE6Njx45Z7SvptssaEhISlJiYKLPZLG9vb5vq+rstW7Zoy5YtVvVlLeVITEzM8ePwrNfqdjOzWXbu3GkJkx06dFDNmjWt+uvXr3/bfTMzMzV37lytXbtWSUlJqly5sho1aiQXFxfLNh07dtQXX3yhRx55RM2bN9fp06etQn7W6zhlyhRNmTIl22MkJCTkup6/2rJli06fPq3Fixfr3XffzXGb2/38b+fy5ctKTk5WlSpVclXDnWQttxg+fHiuZqb/ztPTU926dbME3yNHjujVV1/VrFmz9Pjjj1vCbU7Py93d/bbjZq2Tvt3vWlbwzpKcnKyqVatqzpw52rBhgxwc7jy/9vflIg4ODjKbzZJuzXbn9Lti9Pc
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90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zDVp0iSNGDFCFStW1Mcff6xx48apdu3aql27ts6fP6/nn39eTk5OGjlypMqWLat169Zp6NChmj59ujp27HjPx/h2jz/+uCRp165dat68uSTpxo0bWrx4sUJDQ3Xp0iV5eXlle+zMmTP11FNPKTw8XCdOnNC7776r4sWLKzw8PMvYHTt2aNiwYXrmmWc0bdq0O/6727t3r+Lj4xUSEiJXV1fNmjVLw4cP1+bNm+Xm5qYjR46ob9++qlevnsLDw3Xp0iWFh4crMTFR7du3t/n+A3mNQA08wHbs2KGgoCA5ODjo448/VtWqVa3658yZI0dHRy1btswSNoOCgtShQwdNnz7dakW2XLlyVm8d3+0t24yMDE2bNk1169bVvn37JMnytvLtK823unLliiIjI9WtWzdNmDBBktSiRQuVKVNGEyZM0Msvv6yaNWsqIiJCPj4+mjNnjuUJ2tHRUbNmzVJycrKlzl9//VWSst0neuv98ff315YtWyy1rlu3TgcPHtTKlSvVsGFDSVJgYKDS09MVGRmpF198UWXKlMky59mzZ9W2bVtNmzZNxYoVU/ny5dWhQwf99ddfat269R3v960OHjwoHx8fzZo1y/Iz+de//qXff/9d0dHRGjBggIoVK6b09PQ7zmE2mxUWFqbAwECFhYVZ2qtWraq+fftq06ZNCgoKylE9t9uzZ4++/PJL+fj4KDExMdsx2f387+b69euqWbOm5eeRkpJyx7G3/ixvH7d79261aNFC3bp1u+OY7Hz99dfKyMjQs88+K0lq06aNpkyZopUrV97xBMWDBw9qw4YNevPNN/XSSy9Jkpo3b65Tp04pOjpagYGBmjt3rrp27apJkyZZjqtVq5Z69uypqKgo9ezZ09I+bdo0PfHEE5KkKlWq6KmnntL27dtVu3ZtffLJJ7p48aI2bNigypUrS7r5grBv376aPn26OnTocM/7eLvM7Tjnzp2zah80aNA9/23UqlVL7777ruX27t279f3332cZt3v3bg0cOFBt27ZVaGjoXV/EXblyRevWrVOVKlUkSS4uLurVq5e2bdumtm3bav78+SpVqpQWLlxo2dtevXp1vfjiizm6v0B+Y8sH8ACrU6eO3nvvPbm5uWn8+PFZzqrfvn27nnzySauV2xIlSqh9+/bau3evrl27lqvvu3LlSp07d05Dhw61tJUpU0bFixfX2bNn73jcn3/+qeTkZAUHBys9Pd3ylbm14Pfff1dycrL279+v1q1bWz1BP/3009qwYUOOV4LNZrPS09OVmpqq3bt3a9euXapXr56km49L5cqVLWE6U8eOHZWSkqK///472znbtGmjmTNnymQy6fr16/rPf/5j2QJxq1vv2+3BuEWLFlq+fLmcnJx0+PBhbdy4UXPnztXFixeVmpoqSXJ3d1dcXNwd79vRo0d19uzZLI+jv7+/XF1d9fvvv+e4ntsfs2nTpun5559X7dq17zguu5//3cTFxd11tTunfH19tX37dm3dulVXrlxRenq6MjIy7nlcVFSUmjZtKkdHRyUmJiotLU3BwcH65ptvdPXq1WyPydwW1aZNG6v2iIgITZ06VX/99ZdSU1OzhN0mTZqocuXKlq0Wt7ZneuSRRyTJ8oJl+/btatiwoSVMZ+rYsaPOnTuno0eP3vM+3s5sNktSlpDr4+Nzz2Nvf4Hq6emppKQkq7bTp0/r1Vdfldls1qRJk1Ss2N3
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABSoUlEQVR4nO3deVyU5f7/8fcoe7jghkvHVFTEREnFpTQRzcysjlJuqSfTtCL3JSvUXDPFFb+oHFdSMwuzOi32y05WpriUqYnhhrkkiCigbCLz+8MHcxpFY7jBAXk9H495wNzXdV98Zkac91xc932bzGazWQAAAAAKpIy9CwAAAABKMgI1AAAAYACBGgAAADCAQA0AAAAYQKAGAAAADCBQAwAAAAYQqAEAAAADCNQAAACAAQRqAAAAwAACNQAAJQwXOQaKFwI1gCIzYMAADRgwwG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+//331b9/f0k3AkRiYuIt/S9cuCBJVgEiv2tuFy1apNq1a6tnz563zMTNnDlTr776quVP8s7OznJ2dla5cuUkyTJLGRoaesvyFOlGGHF3d5fJZLrl/MaZmZnatWuXmjVrludyjJt17NhRwcHBMpvNunjxokJDQzVq1Ch9+umnqlChgk6dOnXLPnk9L3lp1aqVNm3apEOHDmnmzJlasWKFXnrpJUv7zQc3Pvvss5bvIyIitGbNGk2dOlVdunSxPDd/7TN+/HidOXPGErQcHByswmvu8zhhwgSrdfC5KlSoYHX/TvXkunr1qubNm6cRI0b
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqoAAAImCAYAAACb96jJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMpklEQVR4nO3dd1yV9f//8edBIRVxm5ozRXEAigPcg1xpWqF9LPdKUxw5cuRe5CIzcc/cW7FhppWjMhVMw9Qc4MytoLhAOb8//HJ+HgE9IHku43G/3bgJ13Wd67yucx1uPnmvYzKbzWYBAAAABuNg7wIAAACAxBBUAQAAYEgEVQAAABgSQRUAAACGRFAFAACAIRFUAQAAYEgEVQAAABgSQRUAAACGRFAFgBTgs1KQFvA+h70RVAFJu3btUqtWreTt7S0fHx916NBBBw8etHdZ+D9t2rRRmzZtktzv5uamadOmvbB6fvzxRw0cONDy87lz5+Tm5mb15e7urqpVq6pbt27av3+/1eP37NkjNzc37dmz54XV/DKaNm1agte1dOnS8vHxkb+/v44fP57g2H/boEGD5Ovrm6rnfLL2Z13Ls34fUmr9+vVyc3PTuXPnJEnHjx/XBx98YHXMi/5dA9LbuwDA3rZv366PPvpItWvX1sSJEyVJS5YsUatWrbRo0SJVrFjRzhXCaBYtWpTo9m7duql27dqSpPv37+vixYu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wHi0aKKNC1DhgyaNWuW5eeYmBhFRUVp6dKlCg8P14ABAyz7BgwYoJCQEPXt21eFChXS6dOnNXXqVPXr10/ffvutJejmzp1bQUFBiouL08WLFzV9+nT16NFDP/74oxwcEv5teObMmQRdyZcuXVKLFi2UJ08ejRw5UpkyZdK0adPUrl07ffPNN4ley7x58xINgM7Oztq3b59u3bolFxcXSdLevXt1/fp1q+NOnDih//3vfypSpIiGDh0qR0dHLV68WO3atdOCBQvk7e2thw8fqmPHjpZAW7RoUW3YsEH+/v766quvNGLECEVHR0uSWrRooebNm+u9996TJLm6uiYIFclhNpv14MEDm44dOXKk1q9fr65du8rLy0v79u1TQECAbt68KX9/f0nS5MmTtWLFCvXr109ubm66dOmSpk+frt69e2v79u3KmDGjJOmff/7Rjh07NGXKFEVGRsrNzU2ffPKJJGnEiBFydXVVZGTkU+upUqWKHBwctH//fsvr8biAgAD98ssvGjhwoHLlyqWdO3dq4sSJypYtm5o1a6b79++rXbt2unr1qvr06aNXX31V69atU+fOnTVv3jxVqVJFZrNZXbt2VVRUlPr3769cuXLp77//1hdffKERI0Zo/vz5iouLU9euXfXqq69q4sSJSp8+vRYvXqxu3bpp8+bNKly4sCIiIvT++++raNGimjBhgh48eKCZM2fqgw8+UHBwsHLmzJnoNW7cuFEDBw7UW2+9pa5du+rGjRv68ssv1aJFC23YsEHdu3fX+++/L0nq0aOHSpcure7du0tKWStlREREoo8dPny4Pv74Y7366quaO3euBg0apJIlS6pkyZJ65513tGTJEkVHRytz5sySpNDQUJ0+fVrjx49XdHS0OnfurMqVK2vatGmKiYnRzJkz1alTJ23fvt3y+/O4iRMn6quvvlKHDh1UrVo1hYWFafLkyXrw4IG6du2qZcuWaezYserZs6cqVKigqKgozZ07V/3795eXl5fy5s2b5DUm9X43m81Wf1h//fXX6t+/v5o0aaKPP/5Y58+f15QpU3TixAktXLhQJpNJ27dvl7+/v9q2bauePXvq3r17Wr58uUaPHi13d3eVLVvW6jnee+89Xbx4UWvXrtWqVaus6ly8eLGaNGmiqVOn6uTJkxo/frwk6csvv3zaLQNShKAKPKZx48Y6c+aMJKlBgwaqVq2apEcB9vbt2xo6dKgaNWokSfL29lZ0dLTGjx+vq1evWsbJOTk5WXVVXr9+XWPGjNH169eVK1euBM8ZEBCg4sWLW7W6Llq0SDExMVq4cKHlvCVLltQHH3yggwcPqlixYlbnuHDhgubOnasyZcpYnUeSSpcurVOnTmnnzp1q3LixJOm7775TpUqVrFoDg4KC5OTkpMWLF1v+E69du7beeustTZw4UWvXrtXOnTt18OBBTZ8+3TLesnLlyjp79qx+//139ejRw+q58+bNm2pd3Pv27VOZMmWeeVxERIRWr16tvn37WrqEq1evLpPJpNmzZ6tly5bKnj27Ll++rD59+li1br/yyivq2bOn/v77b0vdDx480MCBA62GgMS/PvHHPCuopk+fXtmzZ9eVK1cS3b93715Vq1bNcn98fHyUKVMmSygMDg7W0aNHtXr1akugqFmzptq0aaPJkydr3bp1unz5sjJmzGhVq4+Pj86cOWMZ43nt2jWFh4ere/fuqlWrliTJ09NTQUFBiomJkfTofZAxY0YtWrTIcp1VqlRR3bp1NW/ePKtJZPHi4uI0efJkVa9eXYGBgZbt5cuXV6NGjTR//nwNGDDAEiqdnJyUI0cOm98bjwe2e/fu6ejRowoICJCLi4uaNm1qdezYsWNVs2ZNSY9CbL169bR3716VLFlSzZo109y5c7VlyxY1a9ZM0qOAXaRIEZUvX14HDhzQjRs31LZtW5UvX16SVLRoUa1atUq3b99OEFRv3rypxYsXq3Xr1pY/XqpWraorV65o37596tq1q86ePatOnTpZQrkk5c+fX35+fgoNDbXc88Q87f3u7e0t6VFonTx5smrUqKHJkydb9hcpUkTt27fXjh07VLt2bZ04cULvvvuuhgwZYjnGy8tLPj4+2rNnT4KgmjdvXks4ffI+eXh4WMbzV6lSRQcPHkzQKg+kFoIq8Jjp06frwoUL2rlzp5YvX66PP/5Y06dPl5OTk6Ur9tKlS4qIiNCpU6f0888/S5LlP/l
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqoAAAImCAYAAACb96jJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMeklEQVR4nO3deXxM5////+eEpDRiV1H7GpHELigaUktL6VvK174rtZcoUvsWSkJV7Pu+lNbSKqWtpSiNqlKUiiW0YmsQYs38/vDLfIxMYhJhTupxv91ya+Y6Z868zlyjnq5znWtMZrPZLAAAAMBgnBxdAAAAAGALQRUAAACGRFAFAACAIRFUAQAAYEgEVQAAABgSQRUAAACGRFAFAACAIRFUAQAAYEgEVQBIRXyHysvjv9TX/6VzwX8LQRVIwq5du9SqVSv5+vqqcuXK6tChgw4dOuTosvD/a9Omjdq0aZPodg8PD02dOvWF1fP9999r4MCBlsfnz5+Xh4eH1Y+3t7feeOMNdevWTb/++qvV8/ft2ycPDw/t27fvhdWcFk2dOlUeHh7y8fFRTEyMzX1WrFghDw8P+fv7p/rr37t3T8HBwdq4cWOynhdfd2KPn/S0z3dKffnll/Lw8ND58+clSSdPnlSLFi2s9nnRf3aAxBBUgURs375dH3zwgdzc3DRhwgR9+umncnJyUqtWrRQeHu7o8mBACxcu1D///JOgvVu3blq1apVWrVqlefPmaeDAgbp8+bJatWqlbdu2Wfbz8vLSqlWr5OXl9SLLTrMePHigH374wea2TZs2PbfXvXTpkhYtWqQHDx48t9d4kTZv3qyDBw86ugzApvSOLgAwqtDQUJUpU0YzZsyQyWSSJL3xxht66623tHTpUlWsWNHBFSKtKFCggMqWLWvV9s4776h169YaPHiwqlSpokyZMilTpkwJ9kPiypcvr2+//VaNGjWyao+KilJ4eLg8PT1148YNB1UHIDUwogrYcOfOHeXNm1dNmza1hFRJcnFxkZubm+7fv2+1b2hoqOrWrStvb2+VL19eHTp00LFjxyz7DBo0yOryb9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qTZs2CgkJ0dq1a3Xp0iVlzJjRqtbKlSvr3Llzln84XL16VREREerevbv8/PwkSaVLl1ZYWJju3bsn6dHnIGPGjFq4cKHlPKtWraratWtr7ty5VjeRxYuLi1NISIiqV6+u0NBQS3v58uVVv359zZs3TwMGDFCBAgUkPfozkj17drs/Gzlz5lSlSpWsLv9fuHBBhw4d0oQJEzRjxgzLvmazWSEhIapRo4ZCQkIs7YUKFVL79u21Y8cOSzCOjY3V2LFjVbVqVcs+tWrV0o4dO9SxY0d5enpKejSlo1SpUpKkyMhIderUSd27d7ccO2/evAoICNCBAwdsBud4SX1+fX19k1X/X3/9pcaNG2vw4MGWfcqVK6fKlStr3759ls9JPHd3d7m7u0tSgvfdx8dHEyZMkPSorw8dOpRglB143giqgB2mTZumf/75Rzt37tTy5cv10Ucfadq0aXJxcbFcio2KitLp06d15swZ/fjjj5Jk+Us+XvwoyZUrV7Rp0yblzZtX2bNnT/B6O3fu1J49ezRnzhy1bdvW0n7gwAGVLVvWElKlR3/RxL/ekyOnn376qSpWrKgyZcokCKomk0m1atXS999/rwYNGujBgwf67rvv1K9fP6ugun//ftWqVcsSTqRHAatBgwaaNm2abt26pQMHDsjZ2dnqMqiTk5NWrlxp3xv8/4uLi9PDhw+VLl06u5/j5eWlkSNH2twWP1IkST///LPMZrP8/f2tRlv9/f01Y8YMHThwQLVr17YEqmvXrikiIkJnz55NtD/
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABTjUlEQVR4nO3deXyM5/7/8fdEEgmxxBZLtfaISqzZWmu06qBO0VKKnh5aVaWoWmorpVQJSlVTlNjbRrXVHvot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y5Mlav369PvnkE8tznJVZs2bp6aefVnBwsM6cOaOpU6eqSJEiCg4OlnRnqcsnn3yivn37KiAgQNu2bdOQIUNy/NwC+QmBGsA97d69W61atZKTk5M+//xzVatWzap93rx5cnZ2VmhoqCVstmrVSh07dtT06dOtZmTLlClj9ZX4/dbGpqena/LkyXr88cf1xx9/SJKKFCkiSZlmmu9248YNzZ8/X927d9fYsWMlSc2aNVPp0qU1duxYvfLKK6pdu7bmzp0rLy8vzZs3zxIMnZ2dNWfOHCUlJVnq3LZtmyRl+ir/r4/H19dXv/76q6XWtWvX6ujRo1q9erUaNWokSWrevLnS0tI0f/58vfjiiypdunSmMS9evKhnnnlGkydPloODg8qVK6eOHTtq//79euqpp+75uO929OhReXl5ac6cOZbX5IknntCOHTsUHh6u1157TQ4ODpkOlLub2WzWjBkz1Lx5c82YMcOyvVq1avrXv/6lLVu2qFWrVtmq568OHjyob7/9Vl5eXoqPj8+yT1av//0kJCSodu3altcjOTn5nn3vfi3/2u/AgQNq1qyZunfvfs8+OVGuXDmlpqbq+vXrVh+MnJ2d1bBhQzk7O1v9PlWsWDFTrYGBgdq3b5/l9rZt29SuXTtJd37HV61apfPnz6ty5cqKjIxUgwYNVLx4ccXExMjV1VUjR45U06ZNJUn+/v76888/rT5c3MvMmTO1Zs0azZs3Ty1atLhv3zp16mjq1KmW2wcOHNCGDRsk3XmNPv/8c7300ksaPny4pe7ExMRs1QHkdyz5AHBP9erV07Rp01SqVCmNHj0601fEERERat26tdXMraOjozp06KDff/9dt27dytH9rl69WpcuXdLAgQMt20qXLq0iRYro4sWL99xv3759SkpKUlBQkNLS0iw/GUsLduzYoaSkJB06dEhPPfWU1Sxr+/bttXHjxmzPBJvNZqWlpSklJUUHDhzQnj17VL9+fUl3npcqVapYwnSGTp06KTk5Wb/99luWY7Zt21azZs2SyWRSQkKC/vOf/1iWQNzt7sf212DcrFkzLV++XEWLFtXx48e1adMmffrpp7p69apSUlIkSWXLllVMTMw9H9vJkyd18eLFTM+jr6+v3NzctGPHjmzX89fnbPLkyXr++edVt27de/bL6vW/n5iYmPvOdmeXt7e3IiIitHPnTt24cUNpaWlKT083PK7ZbJYkQ7P6gYGBOnbsmOLj43XmzBlFR0dbZosDAgLk6OioX3/9VdKd2f2M5R4eHh4KDQ1VkyZNdPbsWe3YsUPLli3T3r17Lb8P97JixQqFhISoQ4cO2foA9dcPnhUrVlRiYqIkaf/+/UpKSrJ8CMjQsWPH7Dx8IN9jhhrAPbm5ualz586qUaOGevTooSFDhmjNmjWW2eK4uLgsA2i5cuVkNpt18+ZNFS9e3Kb7vH79uubMmaMRI0ZYBXVXV1f5+/tr9erVat68uWrVqqXDhw/r2LFjVvtKuueyhtjYWMXFxclsNqts2bI21fVX69at07p166zqy1jKERcXl+UBdRnP1b1mZjNs2rTJEiZbtmy
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAJKCAYAAAAMQdLDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZv0lEQVR4nO3deXxNd/7H8fclu1iD2MYWJUKCEkvLiNQYLdVBLbVNiw5FY61qbVW0HWInws8aOw26TEuHdtppS4guVGSIpWNLQhFbVrm/Pzzc6a3Q3JwbN8l9PR8PD+73+z1fn3tvHO977vecYzKbzWYBAAAAyJNiji4AAAAAKMwI1AAAAIABBGoAAADAAAI1AAAAYACBGgAAADCAQA0AAAAYQKAGAAAADCBQAwAAAAYQqAEAAAADCNQAAACAAQRqAA7Xv39/9e/f36otNjZWXbp0UUBAgLZt2+agylBURUVFaciQIbp06ZLi4+PVrFkzXblyxdFl5crx48c1evRoPfnkk2rYsKFat26tUaNGKT4+3tGlAU6LQA2gwPnll180dOhQlS1bVitXrtRTTz3l6JJQxHTr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Lq1atVsWJF/e1vf8vVPB999JHGjRunZ599VqNGjdL58+c1b948JSQkaPXq1TKZTLmaJydz5szRjRs3VKpUqQeOseX9T09P16uvvqrWrVtLko4ePaq33347x7H33sucxr333nvatWuXXn/9dfn5+cnFxeWhc90TEhJi+YDWvXt3tWzZUrVr15bJZFLHjh2txv7e6+rt7a2ZM2dq4MCBioyMVFhYmKKiohQTE6Ply5cXiiUwQEFBoAZQIBw8eFAhISFydXXV//3f/6lmzZpW/YsXL5abm5uioqIsYTMkJESdO3fWrFmzrI7IlitXTo0bN7Z6/CDZ2dmaMWOGGjRooKNHj0qSihcvLkn3HWn+tRs3bigiIkK9evXSpEmTJEmtW7dWmTJlNGnSJL300kt67LHHtGjRItWvX1+LFy+2BEM3NzctWLBAaWlpljr//e9/S5JV3Tk9n+DgYH377beWWrdv367jx49r8+bNatKkiSSpTZs2ysrKUkREhHr37q0yZcrcN2diYqL+/Oc/a8aMGSpWrJjKly+vzp0764cfflD79u0f+Lx/7fjx46pfv74WLFhgeU+eeOIJffPNN4qJidHf/vY3FStWTFlZWQ+cw2w2Kzw8XG3atFF4eLilvWbNmnrxxRf15ZdfKiQkJFf1/NaRI0f0wQcfqH79+rp+/XqOY3J6/x/m9u3beuyxxyzvR3p6+gPH/vq9/O24w4cPq3Xr1urVq9cDx+SkT58+unTpklauXGkJ32XLllXr1q01YMAABQUFScr96/rEE0+oV69eWr58uRo1aqS5c+eqb9++atu27e/WAuB/WPIBoEAICAjQe++9p9KlS+uNN97QuXPnrPoPHDigdu3aWR25dXFxUadOnfTTTz/p1q1befp7N2/erEuXLmn48OGWtjJlyqh48eJKTEx84Hbff/+90tLSFBoaqqysLMuve0sLvvnmG6WlpSkuLk7t27e3Osr6zDPPaPfu3bk+Emw2m5WVlaWMjAwdPnxYhw4dUsOGDSXdfV2qVq1qCdP3dOnSRenp6frxxx9znLNDhw6aN2+eTCaTbt++rU8//dSyBOLXfv3cfhuMW7durfXr18vd3V0JCQnau3evli5dqitXrliWEPj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JR8ACpwRI0bI19dXCxcutITR4OBgffHFF7p586Zl3J07d/SPf/xDgYGBcnNzk3T3qGmxYr+/azt+/Li2bdumyZMn5xjAq1Spoh07dmj37t3atWuXYmNjra6
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAswAAAJhCAYAAABVU+YqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACGM0lEQVR4nOzdeVxN+eM/8NctbaaQUNZBaaMFlWwhBjO2iflYsy8hGvu+DApD2YUGYx+MrLNgmGHGlspYhpKMsrZQWrTr/P7w635d1XVvU849ej0fDw/uOee+76vbuder0/ueIxMEQQARERERERVJS+wARERERESajIWZiIiIiEgJFmYiIiIiIiVYmImIiIiIlGBhJiIiIiJSgoWZiIiIiEgJFmYiIiIiIiVYmImIiIiIlGBhJiIi+ojwemREpY+FmegjNnjwYAwePFhhWVhYGHr27AlbW1v8+OOPIiWjj9WuXbvg5eWFxMREREZGwsnJCUlJSWLHUtnq1athZWWFJUuWfLDHPHXqFEaOHIlWrVrB0dER3bt3R2BgINLT09Ue6+zZs5g5c2YZpCQq31iYicqRFy9eYOzYsTA2Nsa2bdvQsWNHsSPRR6Z3795ISEhAmzZt8OWXX2Lw4MGoWrWq2LFUkp+fj6NHj8LS0hLHjh1DZmZmmT/e1KlTMWXKFNSuXRuLFy/Gpk2b0K1bN2zfvh1DhgxBamqqWmPu2LEDz549K6PEROVXBbEDENGH8/333yMrKwsrVqyAqamp2HHoI2RoaIjg4GDExsbC0NAQ1atXFzuSyi5cuIC4uDisWrUKnp6e+Omnn/C///2vzB5v69at+Omnn7BhwwZ89tln8uUtW7aEi4sLBg0ahI0bN2L27NllloGIVMMjzETlRHJyMvbt24cePXoUKssxMTHw8f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Vr1wYAuLm54YsvvsDatWuxbt06+TzjOnXqvDcb8Oa3QGZmZvj2229Rt25dAICrqytu3LiBq1evAgAsLCzk+0vBc3Tw4EFERkbi4MGDcHBwkGcZPHgw/P39ERwcjMuXLyMkJATr169H586d5dt0794d9+/fBwCkpKRg06ZN6Nu3LxYsWCDPZWlpiUGDBiE4OBiDBg0CAOTl5WHmzJlwcnKSb9e0aVMcO3ZMXpivXbuGmJgYLF++XKWvn0hsnJJB9JGztbXF8uXLUblyZcyePRuPHz9WWH/16lV06NBB4chrhQoV0K1bN/zzzz949epViR53//79SExMhLe3t3xZlSpVoK2tjbi4uGLv9/fffyMrKwvu7u7Iy8uT/yn41f/FixeRlZWFO3fuoFOnTgpHSb/44gucOnVK5SO5giAgLy8POTk5uHnzJsLDw9GkSRMAb56X2rVry8tygZ49eyI7Oxs3btwocszOnTtj9erVkMlkyMjIwK+//iqfovC2t7+2d4tvmzZtsGfPHujp6SE6Ohpnz57Fpk2bkJSUhJycHACAiYkJ4uPji/3a/v33X8TFxRV6Hp2dnWFoaIiLFy+qnOfd58zX1xdfffUVrK2ti92uqO+/MvHx8UqPVqvKzs4OV69exeXLl5GWloa8vDzk5+e/937BwcFo0aIFdHV1kZqaitzcXLi7u+Onn36Sn60iNjYWT58+RdeuXRXu261bN4Xbly9fho2NDUxNTeXPp5aWFtzc3HDp0iUAb15jAFTKBgA2NjbYt28fateujZiYGJw/fx7btm3Dv//+K98ninL58mVUr14djRs3lmd5/fo1OnTogH/++QcpKSm4cuUKdHR0FH6g09LSwhdffCG/ff36deTk5KB79+4K4zs5OaF27dry0v523rf16dMHYWFhePLkCYA301oaNGhQ6PVFpKl4hJnoI2doaAgPDw8
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAALwCAYAAAC3EOLQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zL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daimTNWrUUMGCBWPt//eV0H+KiYnRpEmTtGzZMj158kQ5c+ZUqVKllCZNGssxNWvW1Pfff6///e9/Kl++vC5cuBCr5D/7Pg4dOlRDhw6N8xo3btxIcJ5/Wrt2rS5cuKBZs2Zp7Nix8R7zvPF/ntu3byssLEy5c+dOUIYX6devn8LCwtS1a9cEX5l+Jm3atCpZsqTlcenSpfXGG2/ovffe0+rVq2O9I7N+/XpNmjRJf/31lzJmzCg/Pz+5u7tb9j/7/r/o7+i9e/e0adMmbdq0Kc6+l2VlFMAIFGoAhildurRlXvQ333yjtm3bSpIyZMigW7duxTn+5s2bkqRMmTJZtiV0zu2UKVOUN29eNWnSRPv374+1b+TIkerWrZvlLfk0adIoTZo0SpcunSRZrlJOmDAhzvQU6e9C6+XlJZPJFGd94/DwcO3du1elS5eOdzrGv9WqVUvdu3eX2WzW7du3NWHCBH388cdav369MmTIoIsXL8Z5Tnzfl/gEBATo22+/1fHjxzVy5EjNnTtXnTt3tuz/982Nb7/9tuXPc+bM0cKFCzV06FDVq1fP8r355zGffvqprly5YvnBI3Xq1LHK67PvY9++fWPNg38mQ4YMsR6/KM8zjx8/1sSJE9WzZ88Xfv0vGv/4HD5
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAK2CAYAAABuEQuhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABw6klEQVR4nO3deVhUdeP+8XsQUBRXVFyyVFTADTdcSlOxxyzNUp8y1xZtUctcUUstFZcUzS1TczdNLcsWKysrlzIUdwNDUcwlcQHFBVnn90c/5tsE9jAMzIHh/bouLpnPOXO4GY56c+ZzzjGZzWazAAAAAOSIi9EBAAAAgIKMQg0AAADYgUINAAAA2IFCDQAAANiBQg0AAADYgUINAAAA2IFCDQAAANiBQg0AAADYgUINAAAA2IFCDQAA7oobKgP/G4UagN369eunfv36WY2Fh4era9euqlu3rj766CODksFZrVmzRi+99JIuX76s48ePq1mzZoqLizM61v/Ur18/+fr6Wj78/PzUuHFjde/eXWvWrFFqaqrV+kFBQRo7dqxNXyMnz8lKQkKCgoODFR4ebpX/n3/XAUiuRgcA4HyuXr2ql19+WfXq1dPy5cvl6+trdCQ4me7du+vTTz9V69atZTKZNGjQIJUrV87oWNlSt25dvfnmm5KktLQ0Xb9+XTt37tT06dMVHh6uuXPnysXlr+NdCxculKenpyE5IyMj9dlnn6lHjx6WsYzcAKxRqAHkupUrV+rOnTuaOXOmvL29jY4DJ+Tp6anNmzfrzJkz8vT0VIUKFYyOlG2enp5q1KiR1VhQUJBq1qypqVOn6ssvv1TXrl0l/VW+85NatWoZHQHIl5jyASBXxcfHa/369XrssccylemYmBgNHTpUDzzwgBo1aqR+/fpp//79VusEBQVZvSWe8REUFGS1zj/f0h4xYoR8fX0VFhamc+fOydfXV5988onVOmPHjrXajiR99NFH6ty5s+rXr6927dppwYIFSktLs1pnx44devrpp9WoUSO1bt1aEydOVEJCgsLCwrLM6uvra3lb/O/fj5+fnwIDA/Xqq68qPj7esv0bN25o+vTpeuihh9SgQQN16dJFH3/88f98rb/66is9+uijatSokbp372711vyCBQuyfGfA19dXCxYssDw+fvy4XnnlFbVs2VL16tVTmzZtFBISojt37mS5/t22/f3336t79+5q0KCBHnjgAYWEhOj27ds25cl4PcPCwizLr169qmbNmmX583dxcVGNGjVUoUIFq5//v3n66aez/Hn9/XkZWf9tvYSEBL3++utq3br1v27LFn379pW3t7c2bNiQ6XvNcO7cOQUHB6t169aqV6+eWrVqpeDgYKv9SZJSUlIUEhKiwMBANWvWTGPGjMk0JSY8PFx9+/ZVQECAmjdvbrVOWFiY+vfvL0nq37+/ZX/+55SP5ORkzZ07Vx06dFDDhg3VpUsXffrppzn6/oGCjCPUAHKF2WzWn3/+qZCQEKWmpuqll16yWn7y5Ek99dRTql69usaPHy83NzetWbNGzzzzjFasWKHmzZtb1m3btq0GDx5sebxo0SKdPHnyrl87PDxcW7dutTnzkiVL9M4776hv374aN26cIiMjtWDBAv3555+aNm2aJOnHH3/UoEGD1KFDB82dO1fXrl3TzJkzdf78ec2bN08bN26U9Fcx//jjjy2P//42fcb3k5KSoujoaM2cOVNTp05VaGio7ty5o969e+vq1asaOnSoqlatqu+//15vvPGGrly5opdffjnL7EeOHNGoUaP0xBNPaMKECfrggw/08ssv65tvvlH58uWz9f1funRJffr0UaNGjTRjxgy5u7tr586dWrlypSpWrKgXX3wxW9v54osvNGrUKD322GMaNmyYzp8/r3feeUcnT57UypUrZTKZsrWdrMyePVs3btxQqVKl7rqOLT//pKQkvfrqq2rdurUk6bffftPkyZOzXDfjZ5nVejNmzNA333yjMWPGyMfHR66urv+6rexwcXFRq1attHXrVqWmpsrV1fq/6MTERPXv319ly5bVm2++qZIlS+rgwYNauHChihUrZvW1v/76awUEBGjGjBmKi4tTaGioTp48qU2bNqlIkSLat2+fnnvuObVs2VJz587V9evXNW/ePPXv318ff/yx6tWrp4kTJ2ry5MmaOHGiWrRokWXmUaNGaceOHRo0aJACAgK0Y8cOjR07Vm5uburSpUuOXwugoKFQA8gV+/btU7t27eTm5qb3339f1atXt1q+cOFCubu7a82aNZay2a5dO3Xp0kUzZ860OiJbrlw5q7fE/21ubHp6ukJCQlSvXj399ttvkqQiRYpIUqYjzX9348YNLVq0SD179tT48eMlSa1bt1aZMmU0fvx4Pffcc6pdu7YWLFggf39/LVy40FIM3d3dNW/ePN25c8eSc9euXZKU6a38f34/gYGB+uWXXyxZP/nkE0VFRWnDhg1q3LixJKlNmzZKTU3VokWL9PTTT6tMmTKZtnnx4kU9/PDDCgkJkYuLi8qXL68uXbro0KFDeuihh+76ff9dVFSU/P39NW/ePMvP5P7779fPP/+ssLAwvfjii3Jxccl0otzfmc1mhYaGqk2bNgoNDbWMV69eXc8++6x27Nihdu3aZSv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HSdNmqRJkyZl+hqXLl3Kdp6/27Jli2JiYrR48WK9/fbbWa5zt5//3Vy9elWJiYmqWrVqtjL8mzFjxigxMVEvvfRSrhyZzhAbG6tixYpl+a6E9NcJv4sXL7Ycwa5fv748PDx048YNq/X+uU+5uLiobNmySkhIUEJCgtLT0/X+++/r/fffz/Q1/v7z/zcZP3t7/34AzoBCDSBXBQQEWOZFf/jhh+rbt68kqXTp0rpy5Uqm9S9fvizpr7ekM2R3zu28efN07733qnv37pne8p46daoGDx5seUu+aNGiKlq0qEqWLClJlqOUoaGhmaa
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABXlElEQVR4nO3deXyM5/7/8fcgq8SusbSKIILEGqKlSFVVlZKiWpwqtXNaVDkNPbYeJajGSUlRoiWqsbW0+u1Gq7VEa6soQtRSCUWC7DK/P/wyx0hoJndiEnk9H495yNzXdV/zmXti8p5rrrnHZDabzQIAAACQJyXsXQAAAABQlBGoAQAAAAMI1AAAAIABBGoAAADAAAI1AAAAYACBGgAAADCAQA0AAAAYQKAGAAAADCBQAwAAwwrie+L47jkUFQRq4D7Vv39/9e/f32pbVFSUunXrpgYNGmjt2rV2qgz3q/DwcA0dOlQXLlzQkSNH1KJFC126dMneZf2t/v37y8vLy+rSqFEjtW/fXlOnTlVCQoJV39v/XxWEgIAATZw4MV/HvFvtzz//vLy8vLR169Y8jX3s2DH17dvXapuXl5dCQkJyPcbt9zk0NFRLly7NUz3AvVbK3gUAuDf++usvDRs2TA0bNtTSpUvl5eVl75Jwn+nZs6fWr1+vNm3ayGQyafjw4apQoYK9y8qVBg0a6K233rJcT09P12+//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q48eP3/G2o6KitHnzZptrXrx4sebPn69+/fpp0qRJio6OVkhIiP7880+9/fbbkqTvvvtOw4cP1+OPP653331XV65c0ezZs3X27FktWLDA8kd37dq1+vTTTy3Xb307Oev+pKenKyYmRrNnz9bMmTMVHByslJQUvfDCC/rrr780ZswYVa9eXV9//bXefPNNXbx4UcOGDcux9gMHDmj8+PF69tlnNXnyZH300UcaNmyYvvzyS1WqVClX9z8+Pl4vvviimjRpolmzZsnR0VHbt2/Xhx9+qAceeEBDhgzJ1TifffaZxo8fr2eeeUavvvqqzp49q/nz5+v48eP68MMPDS1fmDt3rq5evaoyZcrcsY8tj39qaqpGjx6tNm3aSJJ+++03TZs2Lce+twaq2/vNmjVLX375pd544w15enqqVKlSdx0rN06ePClJeuihhyzb9u7dq7S0NE2ePFkZGRmaNWuWhg8frm3btqlu3bpq3LixNm7cqD59+lj22bBhg1xdXdWpUyft3btXEyZM0IgRI+Tn56fz589rzpw5GjdunD766KNsNdy4cUMvv/yy5cVv7dq1tX79eo0cOVIrVqxQixYtNGHCBEVFRWns2LGqUaOGTp06pQULFmjcuHHavHnzHR/v7du368KFC3r22Wfl7Oysp556SuvXr9err74qR0dHS7/Zs2drxYoVGjhwoB599FEdPHhQwcHBysjIUK9evXT+/HnL/7Xbl3k4OTnpySef1BdffKEJEyZYatmxY4cuX76s7t27Z6trzZo16tOnj5577jn16tUrV8cVsCcCNXAf27Nnj9q3by8HBwd98MEHqlmzplX7woUL5ejoqPDwcEvYbN++vbp27arZs2dbzchWqFDB6i3cu62NzczM1IwZM9SwYUP99ttvkqSSJUtKUraZ5ltdvXpVoaGh6tOnj4KCgiRJbdq0Ubly5RQUFKSBAweqbt26CgkJkbe3txYuXGj54+zo6KgFCxYoJSXFUucPP/wgKee3nm+9P35+fvrpp58sta5bt05Hjx5VRESEmjZtKklq27atMjIyFBoaqueff17lypXLNub58+f15JNPasaMGSpRooQqVaqkrl27at++ferYseMd7/etjh49Km9vby1YsMDymDzyyCPasWOHdu3apSFDhqhEiRLKyMi44xhms1nBwcFq27atgoODLdtr1qypl156Sdu2bVP79u1zVc/tDh48qI0bN8rb21uJiYk59snp8b+bpKQk1a1b1/J4pKam3rHvrY/l7f0OHDigNm3aWAWuu411K7PZbHVMExIStHv3br3//vtq2rSpZaZauvm7FhYWZvkdSExMVFBQkI4fP6769esrMDBQb731lk6fPm0J4hs2bNDTTz8tZ2dn7d27V87OzhoyZIgltJYrV04HDx6U2WzOFn63b9+u/fv367///a/l98jf31+nT5/Wzp075evrq+vXrysoKEhdunSRJLVs2VLXrl3TrFmzdPHixTsuv1m3bp3q1asnHx8fSTfXwX/66afaunWrnnnmGcv9Cw8PV79+/fT6669Luvk7eeHCBe3Zs0dDhw61hOg7LfPo3r27IiMjtXfvXrVo0UKStHnzZtWuXdty27fKGqdKlSqWn//uuAL2xJIP4D7WoEEDzZo1S2XLltWkSZN05swZq/bdu3erQ4cOVjO3pUqV0tNPP61Dhw7p+vXrebrdiIgIXbhwQSNHjrRsK1eunEqWLKnz58/fcb9ff/1VKSkpCggIUEZGhuWStbRgx44dSklJ0eHDh9WxY0er4NGlSxdt3bo11zPBWQEqLS1NBw4c0N69ey2haffu3apevbolTGfp1q2bUlNTtX///hzH7NSpk+bPny+TyaSkpCR98cUXliUQt7r1vt0ejNu0aaOPPvpITk5OOn78uL755hu9//77unTpktLS0iRJFStWtFoecLsTJ07o/Pnz2Y6jn5+f3NzctGPHjlzXc/sxmzFjhp577jnVr1//jv1yevzvJi4u7q6z3bnl4+Oj3bt36+eff9bVq1eVkZGhzMzMXO27Z88eNWzY0HJ55JFHNHbsWDVq1Ehz5861+l2rU6eO1QuqBx98UNLNF4SSLAFv48aNkqRffvlFsbGx6tGjh6SbL+CSk5PVtWtXzZ07V1FRUWrTpo1GjRqV40zy3r175eDgYLXEpkSJEoqIiNCoUaPk6OiopUuXqkuXLoqLi9POnTsVERGh7777TpIsvze3u3Tpkr777js
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAJcCAYAAADZzjNFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABiwklEQVR4nO3dd3xTZf//8Xegg0KZBcqWJYUCZZahIFCWX0BkyYZbBKnIEBEZyhAERKZQZq3svQRRFAWVW0VGcQBSrKzK3rSMllKa3x/8mpvYgk1P0rTk9Xw8+qA558qVT3KV9p0r1znHZDabzQIAAACQJlmcXQAAAACQmRGoAQAAAAMI1AAAAIABBGoAAADAAAI1AAAAYACBGgAAADCAQA0AAAAYQKAGAAAADCBQAwAAAAYQqAEAgF1xEWa4GgI1gMfq0aOHevToYbUtPDxcrVu3lr+/v9avX++kyvCkWrZsmYKDg3X58mUdPXpUNWvW1LVr15xdVqodP35c77//vpo3b64qVaqoRo0a6ty5s1atWqWEhASHPObevXvl5+envXv3prg/JCREfn5+dn/cM2fOyM/PT5s2bZIkxcTEaNiwYQoPD7e0Sel3CPCkIVADsMnVq1f12muvKW/evPrkk0/UuHFjZ5eEJ0y7du106dIl1atXT23atFGPHj2UL18+Z5eVKtu2bVO7du3066+/qlevXgoNDdWMGTPk7++vSZMmaeDAgU/07G1ERIS2bNmixMREZ5cCpCs3ZxcAIHNZvHix4uLiNGXKFPn6+jq7HDyBvL29tXHjRkVFRcnb21sFChRwdkmpcvz4cY0cOVL169fXRx99JDe3//2JbdCggWrXrq1Bgwbpyy+/VIsWLZxYKQB7Y4YaQKpdv35dq1at0gsvvJAsTJ86dUqDBg3Ss88+q6pVq6pHjx46cOCAVZugoCD5+fkl+woKCrJqM2LECKv7DRkyxPJx9j8/Yk4yYsQIq34kaf369WrZsqUqVaqkhg0bKiQkRPfv37dqs2vXLnXu3FlVq1ZVvXr1NGbMGMXExFg+Qk/pK+nj64efT/ny5RUYGKi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EiRO6cOFCstcxMDBQ3t7e+umnn1Jdzz9fswkTJqhDhw6PDVMpjf/jXLx48bGz3alVuXJl7du3Tz///LNu3ryphISEfz3I7lH7o6KiVLFiRauvpk2bSpL27Nkjs9mc4s/p3bt3rZZMlS1b1ur/V9KSq9jYWKvHGzdunDZs2JDsq2PHjlbt9uzZo1q1ailbtmyWx/X29lbNmjW1e/duSan7GUqtsmXLWr15LFasmKQHb36BJwEz1AD+lbe3t9q2bavSpUurS5cuGjx4sNauXWuZLY6Ojk4xgObPn19ms1m3bt1Sjhw5bHrMGzduaNasWRo2bJhVkPDy8lLt2rW1Zs0a1a9fX2XLltXRo0f1119/Wd1X0iOXNVy6dEnR0dEym82P/Xg+NTZv3qzNmzdb1Ze0lCM6OjrFA+qSXqtHzcwm2blzpyVMNmjQQKVLl7baX7FixUfeNzExUTNmzNDKlSt1584dFS5cWAEBAfL09LS0adiwoT7//HP93//9n2rUqKFTp05Zhfyk13HcuHEaN25csse4dOlSqut52ObNm3Xq1CktWLAg2RKIhx87pfF/lKtXryo2NlZFixZNVQ2PM3z4cMXGxio4OPhfZ6aT5M2bV9mzZ9fZs2etthcuXNjqE5q5c+cqMjJS0v9e35YtW6bY58Nvdry8vKz2ZcnyYD7sn0G+VKlSqly5crK+vv/+e6vbN27c0LZt27Rt27ZkbZM+NUrNz1BqZc+ePVX1A5kVgRpAqlWpUsWyLnr16tXq3r27JCl37ty6cuVKsvaXL1+WJMvH1pJ
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArIAAAImCAYAAACvjmnVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABNJElEQVR4nO3deXyM5/7/8fdEkloSW6i0BLWHRGyNfUt1o/RYeihiL7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VatUtmxZnT17NuPBeQwpKSmaNWuWXn75Zfn5+enVV19NsywhOTlZs2bN0htvvKGKFStaxmr37t2WY6ZOnaqXX35ZERERCgwMVJ06ddSsWTNFR0crOjracl0P4+7urr59+yohIUHfffedpPtLC/752Nu3b2v48OGqV6+e/Pz89Nprr2nu3LlW50lISNAnn3yiWrVqyd/fX//+97+1a9cuq2OuXLmiESNGqGHDhvLz81NgYKB69+5t9Xr/8ccfevfdd1W9enUFBASodevW2rJli9V5jh07ph49eqhKlSqqUqWKevfurTNnzmT4uu/YsUNt27ZV1apVVb16dYWEhOj8+fOS0v638c+vf/4M/tOlS5ck3R/PB/Xo0UO9evWymgl90IoVK9SkSRP5+fmpQYMGmjp1qpKTk62O2bdvn9q3b6+AgAAFBgZq8ODBunLliqU/9Wf20KFDat68uSpWrKimTZtqw4YNGb4eDxoyZIiCgoIs3wcFBSkiIkJhYWGqXr26KleurJCQEP3999+aNWuW6tWrp6pVq6pv3766evXqI18b4AwIssATlD17ds2cOVOtWrWSJCUlJenixYuaNGmSTp48qbfeesty7KBBgxQVFaXu3btr3rx5Cg0N1fHjxxUSEmJ140/BggW1bNkyffnllwoLC9ONGzfUp08fm7+MpfvB4sG3quPj49W6dWudOnVKw4cP1/jx43Xp0iV17NhRCQkJNs8zZ84cmwExV65c2rt3r27cuGFpi46OtvplLUknTpxQixYtdPbsWQ0dOlQTJkyQyWRSx44dFR0dLel++OvSpYvWrVunHj16aPr06SpRooR69+6tffv2adiwYVq2bJmWLVsmSWrVqpXl+woVKqQzCvYxm826d++eza8HDR8+XFOmTFGzZs00c+ZMvfbaawoLC9O0adMsx0yYMEHTp09X69atNWfOHH366adKSEjQe++9p1u3blmO+/PPP7VlyxZNmjRJoaGhmjhxosqXL6/y5cvbfV01a9aUi4uLfv75Z5v9YWFh2rp1qwYPHqy5c+fqpZde0rhx4xQVFSXp/h8pHTt21ObNmzVgwABFRETI29tb3bp1s4RZs9msHj16aMeOHXr//fc1d+5c9enTR7t27dKwYcMk3Q+EPXr00K1btzRu3DhNnz5defPmVc+ePXX69GlJUlxcnNq0aaPLly/rs88+0+jRo3XmzBm9/fbbunz5crrXuHr1anXp0kXPPfecJk6cqNDQUB04cECtW7fW5cuX1atXL8vPQsGCBVW/fn3L96nLMR5Ut25dubq6qmPHjoqIiNDBgwctf1xWrFhRXbt2VY4cOWw+NjIyUh9//LFq1qypmTNnql27dpo9e7Y+/vhjyzF79+5Vp06dlD17dn3++ef68MMPFR0drQ4dOuj27dtW5+vRo4deeuklRURE6IUXXlD//v3T/AGQGfPmzdP58+c1adIk9ezZU998841atmyp7du369NPP9XAgQO1efNmTZky5ZGuDXAWLC0AnqImTZrojz/+kCS9+uqrql27tqT7Affvv//W0KFD1bhxY0lSYGCgEhMTNXbsWF26dEkFCxaUdH8G7p9vKV65ckWffvqprly5ogIFCqR5zrCwMJUuXdpq1nbBggVKSkrS/PnzLectV66c3n77bR06dEglS5a0Osf58+c1e/ZsVahQweo80v23PU+dOqWtW7eqSZMmkqT169frxRdftJpNjIiIkLu7uxYuXCgPDw9JUoMGDfTGG29o3LhxWrlypbZu3apDhw5p2rRplvWeNWrU0JkzZ7R792716dPH6rm9vb2z7O3VvXv32hUa4+LitHz5cg0cOFDdu3eXJNWpU0cmk0mRkZFq27at8uXLpwsXLmjAgAFWs+PPPPOM+vbtq99//91S97179zR48GCrJSapr0/qMen9cZHK1dVV+fLl08WLF232R0dHq3bt2pbxqV69unLmzCkvLy9J0po1a3T06FEtX77ccgNivXr1FBwcrAkTJigqKkoXLlxQjhw5rGqtXr26/vjjD8sfFpcvX9bJkyfVq1cv1a9fX9L9QPjPNZ4RERHKkSOHFixYYLnOmjVrqlGjRpozZ44GDx6cpv6UlBRNmDBBderUUXh4uKW9SpUqaty4sebOnatBgwapaNGikux/671s2bKaNGmSRowYoalTp2rq1KnKnj27qlWrplatWun111+3+bgbN25Y/kgZOnSopPs/A3nz5tXQoUPVuXNnlS5dWuHh4XrhhRcUGRlpWZ4QEBCgJk2aKCoqSu3atbOcMzg4WL1795Z0P2A3b95c06ZNs7yOmeXh4aFJkybJ1dVVtWrV0tdff634+HitWLFCnp6eku7fjJr6R5C91wY4C4Is8BRNmzZN58+f19atW7V06VL1799f06ZNk7u7u+Wt3vj4eMXFxenUqVP68ccfJSnN25v37t2T2WzWpUuXtH79ehUuXFj58+dP83xbt27Vzp07NXv2bKubQPbv369KlSpZQqx0PxSmPt+DM6+fffaZqlWrpoCAgDRB1mQyqWHDhtq8ebOaNGmie/fu6T//+Y8GDhxoFWSjo6PVsGFDS3iR7gewJk2aaNq0afr777+1f/9+ubm5Wb096uLioq+++sq+F/j/S0lJUXJy8iOtbaxQoYJGjBhhsy91Rl2Sdu/eLbPZrKCgIKvZ2qCgIM2YMUP79+9Xo0aNLIHrypUrOnnypE6fPp3uePr6+tpdZ3rMZrPV8pV
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABPXElEQVR4nO3deXiN1/7//9dGxoaIKTFUEUSUiCGG1tRwHB9Ui1NUcU5LSw055qGmGtKjamx8Q1MURSlRQyc9tKaWGFpFRQmSGipBSJBJZP/+6C/72BWanTuxE3k+ritX7LXWvfLO3tivrKz7vk1ms9ksAAAAADlSxN4FAAAAAAUZgRoAAAAwgEANAAAAGECgBgAAAAwgUAMAAAAGEKgBAAAAAwjUAAAAgAEEagAAAMAAAjUAAABgAIEaAIACjpseA/ZFoAaQa/r06aM+ffpYtR06dEidO3dW7dq1tX79ejtVhsfVypUrNWDAAF25ckUnT55Uo0aNFB8fb++ysm3evHny8fHR9OnTc3R8YmKixowZo0OHDlnasvp3CCBvEagB5Jlr165p4MCB8vDw0NKlS9WmTRt7l4THTNeuXRUXF6fmzZvrxRdfVJ8+fVSqVCl7l5UtGRkZ2rRpk2rWrKnNmzcrOTnZ5jkiIyO1efNmZWRk5EGFALKrmL0LAPD4+uijj5SSkqJZs2bJ09PT3uXgMeTm5qbw8HDFxMTIzc1NZcuWtXdJ2bZ3715dvnxZc+fOVe/evfX555/rpZdesndZAHKAFWoAeeL69etas2aNnn/++fvCdHR0tIKCgvTss8/K399fffr00eHDh63GBAYGysfH576PwMBAqzHjxo2zOm7EiBHy8fFRRESELly4IB8fH23cuNFqzLhx46zmkaT169erY8eOqlOnjlq3bq2QkBDdvXvXasyuXbvUs2dP+fv7q3nz5po8ebISExMVERGRZa0+Pj6WX73f+/3UqlVLAQEBGjp0qK5fv26Z/+bNm/rPf/6jtm3bqm7duurUqZM2bNjwl8/1l19+qQ4dOsjf319du3a1+vV/SEiIfHx87jvGx8dHISEhlscnT57UkCFD1LRpUz399NNq0aKFZsyYoZSUlCzHP2ju7du3q2vXrqpbt66effZZzZgxQ0lJSTbVk/l8RkREWPqvXbumRo0aZfn6FylSRFWrVlXZsmWtXv+H6dmzZ5av173HZdb6sHGJiYl666231Lx584fOlZXw8HDVrFlTDRs2VJMmTbRu3br7xsTHx2vkyJF69tlnVbduXb3wwgvatGmT5Xnq27evJKlv375W2zzMZrM+/PBDtW7dWn5+furRo4eOHj1q9b21b99e//3vf9WpUyfL3D/99JOOHDmil156SX5+furUqZP27dtnVdP27dvVq1cv1a9fX3Xq1FH79u21evXqh36vwOOOFWoAucpsNuv333/XjBkzlJ6ergEDBlj1R0VFqXv37qpSpYomTpwoBwcHrVy5Uv/85z+1bNkyNW7c2DK2VatWGjRokOVxaGiooqKiHvi1Dx06pC+++MLmmj/44APNmzdPvXv31vjx4xUZGamQkBD9/vvveueddyRJ3333nd588021adNG8+fP140bNzRr1ixdvHhRCxYssISh9evXa8OGDZbHbm5u930/d+7c0ZkzZzRr1iwFBwdr9uzZSklJUa9evXTt2jUFBQWpYs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+V1dXq8dFivyxfvbnsJ/V8+Xi4vLAeePj4zVlyhRt375dJpNJTz31lBo1aiSJa2GjcCNQA8gT9erVs+yL/uSTT9S7d29Jkru7u65evXrf+CtXrkiSPDw8LG3Z3XO7YMECVa5cWV27dtWBAwes+oKDgzVo0CDLr+S
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABc80lEQVR4nO3deVxU9f7H8fcoICAormi2qKiIieICSkkqdb3+zCy13O3m1bQ0vWnmUmhXk3LBXVERN1LTiq6229XuzXJBsQxLzBVzSXBBUNlE5veHD+Y6gcZwwAF5PR8PHjDn+z1fPodxnPd853vOmMxms1kAAAAACqWcvQsAAAAASjMCNQAAAGAAgRoAAAAwgEANAAAAGECgBgAAAAwgUAMAAAAGEKgBAAAAAwjUAAAAgAEEagAAAMAAAjVwjxs4cKAGDhxotS02NlbdunVTkyZN9OGHH9qpMtyroqKiNGzYMJ0/f16HDh1S69atdenSJXuX9afye6xI0tWrV9WrVy81bdpUW7dulSQFBwdrwoQJdxxvwoQJCg4OLpZa/8zAgQPl7e1t+WrcuLFatGihHj16KCoqStnZ2Vb9C3I8AG7Pwd4FALi7Ll68qJdeekkPP/ywVqxYIW9vb3uXhHtMjx499K9//Uvt2rWTyWTSyy+/rKpVq9q7rEK5evWqhgwZokOHDmnx4sVq3769JGnRokVyc3Ozc3V31qRJE7311luSpBs3biglJUXbt2/Xu+++q9jYWM2bN0/lyt2cVysNxwOUZARqoIxZtWqVMjIyNHPmTHl6etq7HNyD3NzcFB0drZMnT8rNzU01atSwd0mFkhum4+PjtWTJEj366KOWtiZNmtixsoJxc3OTn5+f1bbg4GDVr19foaGh+uyzz9StWzdJpeN4gJKMJR9AGZKcnKz169frqaeeyhOmExISNGrUKD366KPy8/PTwIEDtW/fPqs+wcHBVm8j537d+rZ2fm8djxkzRt7e3oqJidHp06fl7e2tjz/+2KpPfm+Pf/jhh3ryySfVtGlTdejQQQsXLtSNGzes+nz77bfq06eP/Pz81K5dO02ePFmpqamKiYnJt1Zvb2/L2/q3Hk/jxo3l7++vkSNHKjk52TL+lStX9O677+qJJ56Qr6+vunbtqo8++uhP/9ZffPGFunTpIj8/P/Xo0UOxsbGWtoULF+b7zoC3t7cWLlxouX3o0CG98soratu2rR5++GEFBQVp2rRpysjIyLf/7cbeunWrevToIV9fXz366KOaNm2a0tLSbKon9+8ZExNjab948aJat26d7/1frlw51atXTzVq1LC6/++kT58++d5ft+6XW+ud+qWmpuqNN95Qu3bt7jjWnVy7dk0vvviifv31V0VERFiF6VuPM1dKSoomTpyogIAA+fv7a9asWcrJybHaZ+DAgXrzzTcVERGhDh06yNfXV3369FFcXJxVv8OHD2vYsGFq2bKlWrZsqREjRujUqVOSpOzsbLVr106vvfZanpo7deqkkJCQPz22AQMGyNPTUxs2bLjt8eSG7WbNmqlt27YaO3asEhMTrcYpyOPzww8/VI8ePeTn56dmzZrp6aef1pdffmlpz8nJ0dy5cxUcHKymTZsqODhYs2fP1vXr1y19MjMzNXPmTLVv315NmzbVU089pS+++OJPjxO4m5ihBsoAs9ms33//XdOmTVN2draGDRtm1X706FH16tVLdevWVUhIiBwdHRUVFaW//e1vWrlypQICAix927dvr+HDh1tuh4eH6+jRo7f93bGxsfr8889trnnZsmWaO3euBgwYoIkTJyo+Pl4LFy7U77//rnfeeUeS9J///Ecvv/yyHn/8cc2bN0+XL1/WzJkzdebMGc2fP18bN26UdPNJ/aOPPrLcvvWt7dzjuX79uo4dO6aZM2cqNDRUYWFhysjIUL9+/XTx4kWNGjVKderU0datW/Xmm2/qwoULeumll/KtPS4uTmPHjtUzzzyjSZMmae3atXrppZf01VdfqXr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YG5ntCYnZ2tlasWGG5T69du6bx48crPj5eTZs21aJFi+Ti4qLVq1db+gQGBuqJJ55QZGSkxo8fr549e2r58uXasmWLevbsKUnatGmT6tatq5YtWxboOKtXr67r16/r8uXLeV7k7du3T87Ozho6dKicnJwkSR4eHjpw4IDMZrOuXr1aoMfnqVOnNHjwYKsX4HXq1FGPHj20b98+Pfnkk9qzZ4+aNm1qOY6AgAC5uLjI3d1dkrRz50599913mjt3rrp06SLp5mMwPT1dYWFh6tq1a54XBIA9sOQDKAOaNGmi6dOnq3Llypo4caJOnz5t1b5nzx517NjRaubWwcFBTz75pH7++Wddu3atUL93w4YNOn/+vEaMGGHZ5uHhofLly+vcuXO33e/HH39URkaGgoODlZ2dbfnKDSg7duxQRkaGDh48qCeeeMJqlrVLly7asmVLgWeCzWazsrOzlZWVpbi4OO3bt09NmzaVdPPvUqdOHUuYztWtWzdlZmbqp59+ynfMTp06ae7cuTKZTEpLS9OXX35pWQJxq1uP7Y/BuF27dlq7dq0qVKigo0ePatu2bVqyZIkuXbqkrKwsSVK1atXyvA1/q+PHj+vcuXN5/o7+/v5yc3PTjh07ClzPH/9m06ZN07PPPqvGjRvftl9+9/+dJCYm3nG2u6B8fX21Z88e7dq1S1euXFF2dnae5Re38/PPP+vIkSNat26dHnroIU2YMEHnz5+/4z6xsbFydHRUUFCQZZurq6vlBMZbNWjQwOpxlrv0Kj09XZK0e/duBQQEyNnZ2XI/uLm5qXXr1tq5c6ckqV69emrVqpU2b94sScrIyNCXX36pHj16FOgYpZv3oaR836Hw9/dXenq6unbtqtmzZys2Nlbt2rXTK6+8IpPJVKDHp3RzGdfYsWOVmpqq/fv3a/PmzVq3bp0kWf4Nt2nTRjt27FC/fv0UGRm
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAIxCAYAAABtpC/BAAAAOXRFWHRTb2Z0d2FyZQBNYXRwb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o3l6+url19+WVevXrWMf+3aNf373//WI488ombNmqlnz5567733/vZn/cknn+ixxx5TixYt1KdPH0VHR1valixZkusnA56enlqyZInldmxsrF566SW1bdtWTZo0UceOHTVz5kylpqbm2v92Y3/xxRfq06ePmjVrpvbt22vmzJm6ceOGTfVk/zyjoqIs7b/99ptat26d6/NfqlQp1atXT1WrVrV6/u+kf//+uT5ff94vu9Y79UtOTtZrr72mDh063HGsv7py5YrMZrOysrKstpctW1avvfaa/vGPf9x232+//VZNmzbV66+/LrPZnGPJx6RJkzRkyBBFRkaqW7duatq0qZ544gl98803ljFiYmL03XffadiwYVZhOtuQIUM0cOBAlS1b1rJt//79GjZsmHx9fdW0aVMFBARoyZIllseQ/f/t008/VUhIiFq2bCk/Pz+FhoZa/Q6YzWatXbtW//jHP+Tj46NHH31Uq1evtlpiEh0draCgIDVv3lx+fn6aOHGi1VKebdu2WZaRtW/fXn5+fjpx4sRtf2ZAUcYMNYAczGazLl68qJkzZyozM1PBwcFW7SdOnFDfvn1Vt25dhYaGytHRUevXr9czzzyjNWvWyM/Pz9K3c+fOevHFFy23IyIi7viiGR0drY8//tjmmpcvX64FCxYoKChIr776qmJiYrRkyRJdvHhRs2bNkiR99dVXeuGFF/Twww9r4cKF+v333zVnzhydP39eixYt0pYtWyTdCubvvfee5barq2uOx5ORkaGTJ09qzpw5CgsLU3h4uFJTUzVgwAD99ttvCgkJUa1atfTFF1/o9ddf15UrV/T888/nWvvhw4c1btw4/fOf/9TkyZO1YcMGPf/88/rss89UpUqVPD3+hIQEDRw4UC1atNDs2bPl5OSkb775Rm+99ZaqVaumESNG5Gmc7du3a9y4cXr88cc1atQonT9/XgsWLNCJEyf01ltvGVo6MG/ePF27dk3ly5e/bR9bnv+0tDS9/PLL6tChgyTpp59+0vTp03Ptm/1c5tZv9uzZ+uyzzzRx4kR5eHjIwcHhjmNl8/f3t7xBCwwMVNu2bVW/fn2ZTCZ17979tvvt379fL730kh5//HHNnDnztj/To0ePKiEhQSEhIXJ1ddWiRYv08ssv65tvvlGFChX07bffSlKON5bZnJ2dNWXKFMvt2NhYDRkyRN27d9eCBQtkNpu1fft2LV26VPXr11ePHj0sfadOnarAwEBFRETo8OHDWrBggdzc3DR27FhJ0pw5c7Ru3ToNHTpU7du315EjRxQeHm75e7F//34NHTpUbdu21cKFC5WUlKRFixZp8ODBeu+991SmTBlJ0s2bN7VmzRqFhYXp6tWr8vDwuOPPHCiqCNQActi/f7/8/f3l6OiolStX5pj9Wrp0qZycnLR+/XpL2PT391fPnj01Z84cqxnZSpUqWa0jvdPH2llZWZo5c6aaNGmin376SZJUunRpScox0/xn165dU0REhPr166fQ0FBJUocOHVSxYkWFhoZq6NChatiwoZYsWSIvLy8tXbrUEmKcnJy0aNEipaamWurMDiq5rX/98+Px9fXV999/b6l127ZtOn78uDZv3qyWLVtKkjp27KjMzExFRESof//+qlixYo4xL126pG7dumnmzJkqVaqUqlSpop49e+rgwYN65JFHbvu4/+z48ePy8vLSokWLLM/JQw89pN27dysqKkojRoxQqVKllJmZedsxzGazwsPD1bFjR4WHh1u2161bV0OGDNGuXbvk7++fp3r+6siRI/rwww/l5eWl5OTkXPvk9vzfyY0bN9SwYUPL85GWlnbbvn9+Lv/a7/Dhw+rQoYP69et32z65GTBggC5fvqzVq1dbwrebm5s6dOigwYMHy8fHJ8c+hw8fVnBwsLp166awsLA7vkG5du2atm3bpjp16ki6NfMdFBSkvXv3qlu3brp48aIkqXbt2n9bq3QrUD/00EOaO3euSpW69QF1+/bt9eWXXyoqKsoqUHfu3FkTJ06UJLVr1067d+/W119/rbFjxyo5OVnr169XUFCQxo8fL+nW79rly5e1f/9+BQcHa968eapXr56WL19u+T/cvHlz9ejRQ5GRkRo4cKDlvp5//vl8/14BRQVLPgDk4O3trdmzZ6tChQp69dVXc5x5YN++ferSpYvVzK2Dg4N69Oiho0eP6vr16/m6382bN+vy5csaOXKkZVvFihVVunRpXbp06bb7/fjjj0pNTVVAQIAyMzMtX9kzd7t371ZqaqqOHTumRx55xCrEPPbYY9qxY0eeZ4LNZrMyMzOVnp6uw4cP68CBA2ratKmkWz+XWrVqWcJ0tl69eiktLU2HDh3KdcyuXbtqwYIFMplMunHjhj799FPLEog/+/Nj+2sw7tChgzZs2CBnZ2edOHFCO3fu1JtvvqnExESlp6dLkipXrqz4+PjbPrZTp07p0qVLOX6Ovr6+cnV11e7du/Ncz19/ZjNnztSTTz6pxo0b37Zfbs//ncTHx99xtjuvmjVrpn379mnPnj26du2aMjMzcyzjuJ1XXnlF3377rebNm6cnn3xSrq6u2r59u+WgxD+7cOGCnnvuOZnNZk2ZMsUSam+nUqVKljAtSe7u7pKklJQUSXl7s/ln//znP7Vy5UplZGQoNjZWO3bs0OLFi3Xz5k1lZGRY9f3rm0l3d3fLko+DBw8qMzNTXbt2teoTGhqqVatWKSUlRYcOHVLnzp0t/18yMzN1//33y8PDI8fvkZeXV57qB4oyZqgB5ODq6qrevXurfv36evrppzVq1Cht2bLF8gKelJSUawCtUqWKzGaz/vjjD91333023efvv/+uRYsWacKECVZB3cXFRW3atNHmzZvVsWNHNWjQQLG
"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",
"execution_count": 53,
"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",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HeartDisease\n",
"No 292422\n",
"Yes 27373\n",
"Name: count, dtype: int64\n",
"\n",
"Обучающая выборка: (191877, 18)\n",
"HeartDisease\n",
"No 175453\n",
"Yes 16424\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAekAAADCCAYAAABt0jrWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+xElEQVR4nO3deXwM9//A8dfuZnNfciDivs9EHJFEVIUejqpGWxRfWkpbelBVWrQUbYmiEuomX4qibbTVKj1QR+KmrrhJEJH7Pnbn90e+u7+sBEHYSN7PxyOP1pzvmZ2Z93yOmVEpiqIghBBCiDJHbe4AhBBCCFE8SdJCCCFEGSVJWgghhCijJEkLIYQQZZQkaSGEEKKMkiQthBBClFGSpIUQQogySpK0EEIIUUZJkhbiMSbvIhKifLunJD1w4EAaNWpk8te8eXOefPJJJk+eTEpKysOKUwiz+v7772nUqBExMTHFjh83bhxBQUGPLJ7r168zbNgwYmNjjcNuPT8bN26Mj48PwcHBhIeHk5+fb7KMoKAgxo0b98hiftzFx8czefJkunTpQvPmzY37+amnniqybyuazz//nAkTJpCUlMTevXvx9fVFp9M98jgURWHt2rW89NJL+Pj4GH+jZs2asWvXrkceT2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Hx4f27dszadIkk+a7yMhIOnXqRHh4OJ07d6ZFixY8//zzbNmyBYDk5GRatGjBV199ZbLcrKwsWrduzYIFC4ptEinuHC/pMVF4noMHD9KnTx/jNemzzz4zudYOHDiQgQMHmqy7UaNGzJs3746xJCcnM2nSJAICAmjRogUvv/wye/bsKXY5Wq2WevXq4eTkRN++fe/YPGSYz/DXpEkT/P39+eijj8jJybltPMUtw7ANBw4cwNPTk+zsbAYMGICXlxeBgYF8/vnnZGVlmcy3a9cuXnnlFVq3bk27du14//33uXbtmnG84bp25MgRXnjhBby8vHjuuef47bffbru/4uLi6NWrFx06dDBOcz/X3FuVWpK+cOECADVq1ODGjRv079+frKwsvvjiCxYvXkz37t3573//S3h4uHGeMWPGsHz5cl566SUWLlxIYGAg48aN4+effzZO07RpU9atW2f8e/PNN4us++TJk8yePZuRI0cyc+ZMkpKSGDBgADdu3AAK7rD69u3L8ePHmThxIrNmzUKv19O/f3/OnTtnXE52djYtWrQwWZ+7u7vJun766SdGjBhB3bp1CQsLY+TIkWzatIm33nqrSCee0NBQ43JCQ0NNxpU0pvuxf/9+fvnlF5NhFy5coG/fviQkJPDll18ybdo0rly5Qr9+/UhISCjRcuPi4vjqq6+YOHEiTz31VIm39dSpUwwePBhnZ2dmz57NggULaNOmDaGhocaLt06n47XXXuOnn35i+PDhzJ8/n7p16zJixAj2798PwIwZM5gxYwZBQUF88803vPjii4SEhLBo0SIAzp49S3BwMDExMUyYMIGQkBBUKhWDBg0iKirKJKY333yTdevWsXTpUnr16sXSpUvZuHHjXfeBXq8nPz+/yN+tv/2+ffsYPHgw1tbWzJkzh48++oioqCj+85//GC+eJdkvBvPmzeP1119nxowZBAQEGM+D0NBQ3nrrrbvGrVar8ff35+jRo8W2nx44cICxY8fy9NNPs3jxYsaPH8/evXt5//33jdMsXLiQiRMn4u/vzzfffEP//v1ZvHgxEydONE6zevVqJk2aRJcuXVi4cCEhISFYWloyZswYrl+/DsDixYtZs2YNI0aMYNmyZfTr14+lS5caS6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pUGDBly5coUhQ4aY3Dh4enoSHBzMgQMH6N69O1FRUTRv3ty4Pb6+vtjY2ODg4AA
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Контрольная выборка: (63959, 18)\n",
"HeartDisease\n",
"No 58484\n",
"Yes 5475\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfIAAADCCAYAAACynEDJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA9VklEQVR4nO3dd3gU5drA4d+29EYSagi9SkihhNAEAipKUcNR6VI8CIhIE+GIHkFAaVISROlw6AIKChaUJgiE3iEECCQBQkgP6bvz/QHZjyUhJJiwxH3u6+LSTNtnZuedZ94ysypFURSEEEIIUSqpzR2AEEIIIZ6cJHIhhBCiFJNELoQQQpRiksiFEEKIUkwSuRBCCFGKSSIXQgghSjFJ5EIIIUQpJolcCCGEKMUkkQtRisn7nIQQRUrkffr0oW7duib/vLy8aNu2LRMnTiQpKamk4hTCrDZv3kzdunWJiorKd/64ceMIDAx8avHcunWLQYMGER0dbZz2cPmsV68efn5+BAUFsXLlSnJycky2ERgYyLhx455azMKyDRs2jODgYFJSUvjhhx/o0qWLWeLIyspi4cKFdO3aFV9fX2N58fHxITw83Cwx/V3aoq7w3HPP8d///tf4d3Z2NmfPnuWrr77i/PnzrF27FpVKVaxBCiFM/fXXX+zZsyfP9AfLp16vJykpib179/LFF19w5MgR5syZg1p97/49JCQEBweHpxq3sFxDhgzhnXfeISQkBDs7O7766iuzxDFixAgiIyPp168flStXxsbGBq1WS5UqVXB0dDRLTH9XkRO5g4MDvr6+JtOaNm3K3bt3mTdvHidPnswzXwjxdORXPgMDA6lRowZTpkzhp59+omvXrsC9p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27dv06tXL3x9ffnyyy+xsrJi7969LFu2jHLlyjFo0CAAxowZw549exgyZAg+Pj7s2bOHcePGodPp6Ny5M5C3KX/37t0sWLDA5LPPnz/PlStXGDVqFM7OzsybN4/evXuzfft2ypUrR3x8PN27d8fW1pZPPvkEW1tbVqxYQa9evdi4cSM1a9YEICMjg4YNGzJhwgTjtocNG2byWT/++CNjxoyhS5cujBgxgujoaGbPnk14eDjLli0z6VYICQmhbNmyAMTGxppsq7AxPYkjR46wbds2k2lXr16le/fu1KhRg2nTppGTk8OCBQvo0aMHW7Zswc3N7bHbjYmJ4auvvmLSpEm0adPGZF5B+3rhwgX69etHx44dmT17Noqi8OOPPxISEkKNGjXo1KkTer2eAQMGGC8KNWrU4Pvvv+e9995jxYoVNGnShOnTp7NixQr69+9Py5YtOX36NDNnziQnJ4d3332X8PBw3nzzTapVq8aECRPQ6XSsXLmSt99+m6VLl+Lv72+MaciQIbRt25b09HT279/PokWLqF69Om+88UaBx8BgMOTpa4a8g84OHz5M//79CQgIYM6cOSQlJTF37lz69u3Lxo0bsbGxKdRxyRUcHMzHH3+Mg4MD3t7eDBkyhAULFhASElLgxTCXWq2mefPmbNu2jZycHLRa06J/9OhRxo4dy9ChQ2natCm3bt1ixowZjB49mlWrVgHw7bffMnv2bHr37s348eM5f/48wcHB3Lx5k6lTpwKwevVqJk+ezPvvv0/jxo1JSkpi0aJFjBkzBj8/PypUqMCiRYtYu3YtH330EZ6enpw8eZLZs2ej0+kYPnw4iqLw3nvvcezYMYYPH07NmjXZsWMHI0eOJCsri9dee63Aff30009p0KABd+/eZdu2bUybNo169erRokWLxx6nU6dOsXbtWubOnYufnx8ZGRn07NmTuLg4hg8fjoeHB7///jsff/wxd+7cYfDgwY/dJsAbb7xB69atAZg4cSKA8bpWoUIF4zn12Wef0aZNG4KDgzl69CghISGkpaXx4YcfGvdty5Yt/Pvf/6ZJkyacO3eO+fPnc/78eRYvXlzo609xKUqZe9DixYsLvIl40JOW1fxERUURFRXF4MGDGTBgAKNGjeLs2bMEBwdz48YNpkyZAsDXX3/NvHnz6NmzJyNHjiQyMpK5c+dy4sQJNmzYgI2NDXDvOv7RRx8xbNgwqlSpwtKlSxk4cCDfffcd9evXz/P5M2bMwMvLiyFDhgCFu04URpETuaIoJheypKQkQkNDWbBgAX5+fnh5ebF//37q16/P3Llzjc0nLVq0YP/+/Rw6dIhBgwYRFhbGr7/+yn/+8x/efvttAJo3b050dDSHDh0yJvKHmwqvXLmSJ6aUlBS++eYbmjRpAoC3tzcdOnRg5cqVjBkzhhUrVpCYmMjatWvx8PAA4Pnnn+eVV15h7ty5zJs3D4D09HTc3d1NPs/Kyspk32fOnEnr1q2ZOXOmcXq1atXo168fe/bsoW3btsbp9evXp3LlygB5TtrCxlRUBoOByZMn06BBA86ePWucHhISgq2tLcuXLzd+J82bN6dDhw4sXryYjz766LHbXrduHfXq1SMoKCjPvIL29cKFC7Ro0YIZM2YY+2dbtmzJzp07OXToEJ06dWLv3r2cPHmS+fPn06FDBwACAgKIjIzk4MGD1KlTh5UrV9K7d2/jRa1FixbExsZy+PBh3n33XUJCQrCysmLlypXGfWzbti2dO3dm+vTpJrWoKlWqGL/n5s2b891333HmzJnHXhxeeOGFR87L/R4BZs2aRfXq1fn222/RaDQA+Pj40KlTJzZt2kSvXr0KdVxyvfzyy3Tr1s0k/oeP++O4u7uTnZ1NYmIi7u7uJvOOHj2KjY0NgwYNMp7zLi4unD59GkVRSE1N5euvv+att94y3ui2atUKFxcXJkyYQP/+/alduzaRkZEMHDiQoUOHmhyXoKAgjh49SqdOnQgNDcXLy8u4P/7+/tja2hr7J//66y/+/PNPZs+ezSuvvAJA69atSU9PZ+bMmXTu3DnPjciDatWqZfxufX192bRpE2fOnClUIl+1ahXt27enffv2AKxZs4awsDD
"text/plain": [
"<Figure size 200x200 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Тестовая выборка: (63959, 18)\n",
"HeartDisease\n",
"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0aNslpf165d1QkTJqiqqqqKoqiPPPKIOmLECKtp9u/frxqNRvXXX38tNEZVVdXLly+rRqNR3bJlS4ljunOefBMmTFC7du1aaIxms1nt06eP+uyzz6pGo1E9ePCgqqqqOm7cOLV9+/ZWv0lSUpLaqlUr9aOPPlLv5vZ1LViwQO3Xr5/V+JJs6zfffKO+8sorqtlstkxjNpvVVq1aqZMnT1ZVVVV37typGo1GdceOHVbTvPDCC+rixYvVlJQUtUmTJur06dOt1j916lTL7/F///d/aps2bay2MTc3V33iiScscd9tn4aGhqrvv//+XfdD/nYW9e/23+SFF15Qe/XqpZpMJsuw6OhotXHjxur69etLvF/y4/3HP/5R7H4v7Hy53axZs1Sj0ajGx8erqmp93CxfvlwNDg5Ws7OzLdPv2rVLXbx4saooipqamqoGBQUV2EebNm1SjUajGhERoaqqqn744YeW8y7fn3/+qRqNRvWHH35QVVVVhw8frr788stW0/zrX/9Sv/32W1VVVXXv3r2q0WhUt23bZjXN+PHj1Q4dOqi5ubmFbt/BgwetjnlVVdX09HTVaDSqy5cvv+t+yXf7/shXkvO0uGP3dkajUV20aJHVsP79+6tPPfWU1bGSkpKihoaGqmPHji3xtt3Lck6ePKk2adJE7dOnj9Xxe6eSrL+wY7KoZQwdOlQ1Go3q5s2braYLCwtTmzVrpiYlJannz58v9Pf79ttvVaPRqO7atUtV1ZLlgdvj279/vxoYGKgmJSWpqlrya3tJlLqkeuTIEZo2bWo1TKvV0r59e8LCwtBoNHTs2JGOHTu
"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",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Обучающая выборка после oversampling: (351482, 51)\n",
"HeartDisease\n",
"Yes 176029\n",
"No 175453\n",
"Name: count, dtype: int64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAH2CAYAAADgXj1iAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABpiklEQVR4nO3dd3QU5d8F8Dszu+k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ejJkzZ6JTp04V/vupYFu2bEHHjh2h1+uxceNGjBw50vSlN7cqVarkayt79eqF119/HV988QW6deuGatWq5XvsFi1aoGPHjli8eDEmTpyY70v0119/jaCgIHz55Zemy0JCQtC5c2f06NEDK1euxEcffQQ3NzdMnToVo0ePxty5c/H++++bbj979mxER0dj8eLFeYKeq6srLl++jEWLFuGtt956iFcpR5nNAQwMDAQA3L17FwBw8eJFjBkzBqGhoWjSpAk6duyITz75BBkZGab7ZGVl4csvv8QjjzyCoKAg9OnTBz/88IPp+oKGnI0/xqG4iRMnYtiwYdi0aRO6du2KFi1a4IUXXsDFixfz1Hf37l2MGzcOwcHBaNasGV544QX8888/eW7z/fffF/i77u9W/f333zFgwAA0bdoU7du3xyeffIK0tDTT9cbhwoJ+tmzZUuKa7ty5k+8+xuece7ixoK7fcePGoUGDBjhy5IjpsrCwMIwcORItW7ZEy5Yt8dprr+Xpki7I/b9rxYoVaNGiBdavX1+q53rs2DGMGDECbdq0QWBgILp164YFCxZAURTTbVJSUvDxxx+jY8eOaN68OQYOHIjdu3ebrldVFd988w169uyJoKAg9OjRA//73//yzIO7ceMGxo4di/bt26N58+YYNmwYTpw4ke81zd3136FDB3zxxRd5aikLx48fx9ChQ9GsWTMEBwfj3XffzTdMVdzrYqx35cqVePzxx9GsWTNs3rwZkyZNAgA88sgjJer2Hzp0KCpXrmz6uwH5jxtjOAwKCkJoaCgmTJiAqKioPI+zceNG9O7d2zSssWDBAsiynO82AwYMQPPmzREUFIT+/ftj586dpusVRcHcuXPRrVs303OePXs2srOzTbfJzMzEF198gc6dOyMwMBB9+/bFjh07inyOR44cyTc9pVu3blixYkWh95k4cWKRx6/xMffv348hQ4YgKCgIjz76KL777rs8j6MoCpYuXYoePXogMDAQjz32GL799ts8txk2bBiGDRtWYM3G9+mCBQvQoEGDPLcxDgUZ/1bGY+Lnn3/GqFGj0KxZM3Tp0gWLFi3KcwzLsoy1a9eib9++CAoKQpcuXTBr1ixkZmYW+vybN2+OQYMG4fz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xuLFi7Fw4cJ8gaEgoiiibdu2+Pnnn2EwGKDT5X3rnzhxAu+88w5effVVtGnTBpGRkZg5cybGjx+PNWvWAACWLFmCuXPnYujQoZg0aRIuXLiABQsWICIiAjNmzAAArF27Fp988glef/11tGrVComJiVi2bBkmTJiAFi1aoEqVKli2bBnWrVuHd999FwEBATh9+jTmzp0LvV6PsWPHQlVVvPbaazh58iTGjh2LOnXq4LfffsNbb72FrKwsPPHEE0U+1w8//BBNmjRBamoqfv75Z3z++edo2LAh2rVrl++2r776KgYNGgQg573euHFjvPrqqwCA6tWrmz6k33rrLTzxxBMYNWoU/vjjD0ydOhUAMHjwYADAlClTsGXLFlMQOHbsGGbMmIGkpCS89tprxf59CpOdnW16be83ZcoUdO7cGQsWLMCJEyewcOFCpKWl4e233za9Dlu3bsX//d//oXXr1vjnn3+waNEiXLhwAcuXLze1VZUqVcLChQuhKAoiIyOxaNEijBkzBn/
"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 = ['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+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dOOXE5ffo05s6di9TUVHz44Ycl/j5F0Wg08rZ93PTp09G+fXssWbIEZ8+eRWhoKDIzM/HJJ5/I22HXrl14//330bJlS/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
}