AIM-PIbd-31-Belianin-N-N/laboratory_2/lab2.ipynb

3062 lines
2.3 MiB
Plaintext
Raw Normal View History

2024-10-12 05:17:25 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Приступаем к работе...\n",
"\n",
"### Начнём анализ данных. Выгрузим в датафрейм первый набор (Цены на бриллианты)\n",
"\n",
"P.S. Кааажется будет трудно... :|"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['Unnamed: 0', 'carat', 'cut', 'color', 'clarity', 'depth', 'table',\n",
" 'price', 'x', 'y', 'z'],\n",
" dtype='object')\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 53943 entries, 0 to 53942\n",
"Data columns (total 11 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Unnamed: 0 53943 non-null int64 \n",
" 1 carat 53943 non-null float64\n",
" 2 cut 53943 non-null object \n",
" 3 color 53943 non-null object \n",
" 4 clarity 53943 non-null object \n",
" 5 depth 53943 non-null float64\n",
" 6 table 53943 non-null float64\n",
" 7 price 53943 non-null int64 \n",
" 8 x 53943 non-null float64\n",
" 9 y 53943 non-null float64\n",
" 10 z 53943 non-null float64\n",
"dtypes: float64(6), int64(2), object(3)\n",
"memory usage: 4.5+ MB\n"
]
}
],
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"# Первый датафрейм о бриллиантах\n",
"df = pd.read_csv(\".//static//csv//diamonds_prices2022.csv\")\n",
"print(df.columns)\n",
"\n",
"print()\n",
"\n",
"df.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Описание набора:** В этом наборе данных представлен датасет о ценах на бриллианты. Рассматривается набор данных, содержащий цены и атрибуты примерно для 54 000 бриллиантов круглой огранки. В наборе данных 53 940 бриллиантов с 10 характеристиками (карат, огранка, цвет, прозрачность, глубина, таблица, цена, x, y и z). Большинство переменных являются числовыми по своей природе, но переменные cut, color и clearity являются упорядоченными факторными переменными со следующими уровнями. О валюте для столбца price: это цена ($). Что касается столбцов x, y и z, то они представляют собой размеры алмаза в виде (( x: длина в мм, y: ширина в мм, z: глубина в мм))"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>carat</th>\n",
" <th>cut</th>\n",
" <th>color</th>\n",
" <th>clarity</th>\n",
" <th>depth</th>\n",
" <th>table</th>\n",
" <th>price</th>\n",
" <th>x</th>\n",
" <th>y</th>\n",
" <th>z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0.23</td>\n",
" <td>Ideal</td>\n",
" <td>E</td>\n",
" <td>SI2</td>\n",
" <td>61.5</td>\n",
" <td>55.0</td>\n",
" <td>326</td>\n",
" <td>3.95</td>\n",
" <td>3.98</td>\n",
" <td>2.43</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>0.21</td>\n",
" <td>Premium</td>\n",
" <td>E</td>\n",
" <td>SI1</td>\n",
" <td>59.8</td>\n",
" <td>61.0</td>\n",
" <td>326</td>\n",
" <td>3.89</td>\n",
" <td>3.84</td>\n",
" <td>2.31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>0.23</td>\n",
" <td>Good</td>\n",
" <td>E</td>\n",
" <td>VS1</td>\n",
" <td>56.9</td>\n",
" <td>65.0</td>\n",
" <td>327</td>\n",
" <td>4.05</td>\n",
" <td>4.07</td>\n",
" <td>2.31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>0.29</td>\n",
" <td>Premium</td>\n",
" <td>I</td>\n",
" <td>VS2</td>\n",
" <td>62.4</td>\n",
" <td>58.0</td>\n",
" <td>334</td>\n",
" <td>4.20</td>\n",
" <td>4.23</td>\n",
" <td>2.63</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>0.31</td>\n",
" <td>Good</td>\n",
" <td>J</td>\n",
" <td>SI2</td>\n",
" <td>63.3</td>\n",
" <td>58.0</td>\n",
" <td>335</td>\n",
" <td>4.34</td>\n",
" <td>4.35</td>\n",
" <td>2.75</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 carat cut color clarity depth table price x y \\\n",
"0 1 0.23 Ideal E SI2 61.5 55.0 326 3.95 3.98 \n",
"1 2 0.21 Premium E SI1 59.8 61.0 326 3.89 3.84 \n",
"2 3 0.23 Good E VS1 56.9 65.0 327 4.05 4.07 \n",
"3 4 0.29 Premium I VS2 62.4 58.0 334 4.20 4.23 \n",
"4 5 0.31 Good J SI2 63.3 58.0 335 4.34 4.35 \n",
"\n",
" z \n",
"0 2.43 \n",
"1 2.31 \n",
"2 2.31 \n",
"3 2.63 \n",
"4 2.75 "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Для наглядности\n",
"df.head()\n"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>carat</th>\n",
" <th>depth</th>\n",
" <th>table</th>\n",
" <th>price</th>\n",
" <th>x</th>\n",
" <th>y</th>\n",
" <th>z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" <td>53943.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>26972.000000</td>\n",
" <td>0.797935</td>\n",
" <td>61.749322</td>\n",
" <td>57.457251</td>\n",
" <td>3932.734294</td>\n",
" <td>5.731158</td>\n",
" <td>5.734526</td>\n",
" <td>3.538730</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>15572.147122</td>\n",
" <td>0.473999</td>\n",
" <td>1.432626</td>\n",
" <td>2.234549</td>\n",
" <td>3989.338447</td>\n",
" <td>1.121730</td>\n",
" <td>1.142103</td>\n",
" <td>0.705679</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>1.000000</td>\n",
" <td>0.200000</td>\n",
" <td>43.000000</td>\n",
" <td>43.000000</td>\n",
" <td>326.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>13486.500000</td>\n",
" <td>0.400000</td>\n",
" <td>61.000000</td>\n",
" <td>56.000000</td>\n",
" <td>950.000000</td>\n",
" <td>4.710000</td>\n",
" <td>4.720000</td>\n",
" <td>2.910000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>26972.000000</td>\n",
" <td>0.700000</td>\n",
" <td>61.800000</td>\n",
" <td>57.000000</td>\n",
" <td>2401.000000</td>\n",
" <td>5.700000</td>\n",
" <td>5.710000</td>\n",
" <td>3.530000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>40457.500000</td>\n",
" <td>1.040000</td>\n",
" <td>62.500000</td>\n",
" <td>59.000000</td>\n",
" <td>5324.000000</td>\n",
" <td>6.540000</td>\n",
" <td>6.540000</td>\n",
" <td>4.040000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>53943.000000</td>\n",
" <td>5.010000</td>\n",
" <td>79.000000</td>\n",
" <td>95.000000</td>\n",
" <td>18823.000000</td>\n",
" <td>10.740000</td>\n",
" <td>58.900000</td>\n",
" <td>31.800000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 carat depth table price \\\n",
"count 53943.000000 53943.000000 53943.000000 53943.000000 53943.000000 \n",
"mean 26972.000000 0.797935 61.749322 57.457251 3932.734294 \n",
"std 15572.147122 0.473999 1.432626 2.234549 3989.338447 \n",
"min 1.000000 0.200000 43.000000 43.000000 326.000000 \n",
"25% 13486.500000 0.400000 61.000000 56.000000 950.000000 \n",
"50% 26972.000000 0.700000 61.800000 57.000000 2401.000000 \n",
"75% 40457.500000 1.040000 62.500000 59.000000 5324.000000 \n",
"max 53943.000000 5.010000 79.000000 95.000000 18823.000000 \n",
"\n",
" x y z \n",
"count 53943.000000 53943.000000 53943.000000 \n",
"mean 5.731158 5.734526 3.538730 \n",
"std 1.121730 1.142103 0.705679 \n",
"min 0.000000 0.000000 0.000000 \n",
"25% 4.710000 4.720000 2.910000 \n",
"50% 5.700000 5.710000 3.530000 \n",
"75% 6.540000 6.540000 4.040000 \n",
"max 10.740000 58.900000 31.800000 "
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Описание данных (основные статистические показатели)\n",
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Unnamed: 0 0\n",
"carat 0\n",
"cut 0\n",
"color 0\n",
"clarity 0\n",
"depth 0\n",
"table 0\n",
"price 0\n",
"x 0\n",
"y 0\n",
"z 0\n",
"dtype: int64"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Процент пропущенных значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" if null_rate > 0:\n",
" print(f'{i} Процент пустых значений: %{null_rate:.2f}')\n",
"\n",
"# Проверка на пропущенные данные\n",
"df.isnull().sum()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Unnamed: 0 False\n",
"carat False\n",
"cut False\n",
"color False\n",
"clarity False\n",
"depth False\n",
"table False\n",
"price False\n",
"x False\n",
"y False\n",
"z False\n",
"dtype: bool"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.isnull().any()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Пропущенных данных в колонках нет :)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Анализ сведений о наборе данных\n",
"\n",
"**Набор данных:** Набор данных содержит 53 940 наблюдений, каждое из которых представляет собой бриллиант с характеристиками, такими как вес (карат), огранка, цвет, прозрачность, глубина, размеры (x, y, z), а также цена.\n",
"\n",
"**Проблемная область:** Проблемной областью может быть задача оценки стоимости бриллианта на основе его характеристик, что важно для торговли бриллиантами, определения их рыночной стоимости и других бизнес-задач.\n",
"\n",
"Проанализируем содержимое...\n",
"\n",
"*Объекты наблюдения:* Каждый бриллиант будет объектом наблюдения. \n",
"\n",
"*Атрибуты объектов:* Основные атрибуты представляют собой числовые характеристики такие, как carat (вес), depth (глубина в бриллианте - расстояние от площадки до каллеты. Калетта - нижняя часть бриллианта), table (площадка - большая грань бриллианта), x,y,z - размеры. Категориальные характеристики такие, как cut (огранка), color (цвет) и clarity (прозрачность). \n",
"\n",
"*Связи между объектами:* Вес бриллианта влияет на цену (carat -> price), также существует связь между качеством огранки и ценой (cut -> price)\n",
"\n",
"## Бизнес-цель\n",
"1. Автоматизация процесса оценки стоимости бриллианта \n",
"Построить модель для оценки цены бриллианты на основе его характеристик. Эффект для бизнеса от анализа данных заключается в улучшении бизнес-процессов (повышение эффективности операционных процессов), повышении доходов, сокращении затрат и улучшению клиентских отношений. \n",
"2. Оптимизация ассортимента и продаж \n",
"Построить модель для анализа данных, какие характеристики бриллиантов наиболее востребованы и наилучшим образом влияют на рост продаж. Эффект для бизнеса в том, что компании могут оптимизировать ассортимент на более востребованные, что приведёт к увеличению продаж.\n",
"\n",
"### Техническая цель\n",
"1. Разработка модели для оценки стоимости бриллиантов \n",
"Создать модель машинного обучения, которая на вход получает характеристики бриллианта (вес, огранка, цвет и т.д.) и предсказывает его цену. \n",
"На вход поступают характеристики, а целевой признак - цена бриллианта. \n",
"2. Оптимизация ассортимента и прогнозирование спроса \n",
"Создать модель для предсказания спроса (популярности) определённых категорий бриллиаантов в зависимости от их характеристик. НА вход поступают характеристики бриллианта, а целевой признак - показатели продаж или востребованность товара."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB8UAAAMBCAYAAAB2kmVMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACYeElEQVR4nOzdeZxWZcE//s/MAMM6oAgIogi4ppLmVu6ouW+VWl8tce9JzTUrs0R9LFstLZ/UTMjMfDJ79NHSXHJ5SjA3MjOXEFcERNl3Zs7vD39zxzgj68DA4f1+veYF97mv+zrXWe77nOt8zlJVFEURAAAAAAAAACih6rZuAAAAAAAAAACsLEJxAAAAAAAAAEpLKA4AAAAAAAB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U1NZU66+vrc8ABB+SjH/1ovvvd7+aee+7J8OHDs3Dhwlx66aUf2N5//OMf2X333VNXV5cvf/nLad++fa699trstddeefjhh7Pzzjtnjz32yJlnnpmrrroqX/va17LlllsmSeXfJdl2221z3nnnJUnGjRuXiy66aLHlf/nLX1b+f8455zR5b9y4cTn44IPTt2/fXHTRRenVq1eS5HOf+9wS21FfX59DDjkkDzzwQD7zmc/krLPOyowZM3Lffffl2WefzeDBg5MkV155ZQ477LAce+yxmT9/fm655ZYcddRRueuuu3LwwQc3qfNPf/pTfvOb3+SMM87Ieuutl4033nip6/jlL3+Zk08+OTvttFNOPfXUJKm0AQAAgJbpdze3uvS758yZk3322SevvfZazjzzzPTr1y+//OUv86c//alZ2T/96U858MADs/3222f48OGprq7OiBEjsvfee+f//u//stNOOzUpf/TRR2fjjTfO5ZdfntGjR+eqq67KlClTcuONN1amaUl97KOPPjoDBw7M5ZdfnqeeeirXX399evfune985ztLnDYAWOkKAFgDjBgxokjS7K+2trYYOXJkk7K33357kaS47LLLmgw/8sgji6qqquJf//pXZdgFF1xQVFdXF4888khx6623FkmKH/3oR00+N2zYsCJJ8cUvfrEyrKGhoTj44IOLDh06FG+//XZleJJi+PDhlddHHHFE0aFDh2Ls2LGVYePHjy+6detW7LHHHpVhjeN+8MEHl2m+9OvXrzjkkEMqrx9//PEiSTFixIhmZS+88MKiqqqqybABAwYUw4YNq7y+9tpriyTFqFGjmpRLUpx++umLbcsNN9xQJCmuuOKKZu81NDRU/j979uwm782fP7/Yeuuti7333rvZOKurq4t//OMfzepb2jq6dOnSZPoAAABomX53y1anfvePfvSjIknxm9/8pjJs1qxZxSabbNJk2hoaGopNN9202H///Zv1xwcOHFh8/OMfrwwbPnx4kaQ47LDDmozrtNNOK5IUf/vb3yrDPqiP3VjHiSee2GT4Jz7xiaJnz56LnSYAWFXcPh2ANcrVV1+d++67L/fdd19uuummDB06NCeffHJ+97vfVcr84Q9/SE1NTc4888wmnz3vvPNSFEXuvvvuyrCLL744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cMMNkyxfZ/OJJ55IkiZn8C/Oc889l4985CNLLPelL30pL730Um677bbceOON6dChQz7+8Y8v8XODBw/OY489lgULFqR9+/YtlrntttvSsWPH/PGPf2xyS7kRI0Ys1TQsax2uHAcAAFhx+t2rR797wIABefbZZ1MURZPpef/0Dx48OElSV1eXfffdd6na/tJLLzW5W9u//vWvZicE6GMDsCZzpTgAa7QFCxbk3nvvTYcOHSq3aTvooINSX1+fn/zkJ03K/vCHP0xVVVUOPPDAymePP/749OvXL1deeWVGjhy
"text/plain": [
"<Figure size 2000x1500 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Построим графики boxplot для обнаружения выбросов\n",
"plt.figure(figsize=(20, 15))\n",
"\n",
"# Создание boxplot\n",
"for i, column in enumerate(['carat', 'depth', 'table', 'price'], 1):\n",
" plt.subplot(4, 2, i)\n",
" sns.boxplot(x=df[column])\n",
" plt.title(f\"Boxplot для {column}\")\n",
" \n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Проблемы наборов\n",
"*Зашумленность данных:* Может быть обнаружена через большое количество выбросов (аномальных значений). Выбросы могут выходить за нормальные границы. Они наблюдаются во всех графиках, которые мы построили. Если у определённого параметра много выбросов, то данные могут быть зашумлены или содержат необычные значения, которые стоит анализировать и, возможно, удалить или скорректировать. Графики boxplot помогают визуализировать распределение данных и выявить выбросы, которые находятся за пределами \"усов\" боксплота.\n",
"\n",
"Попробуем решить устранить проблему выбросов для table и depth. Используется метод усреднения данных для устранения выбросов. Метод стандартных отклонений."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB8YAAAMBCAYAAACdpd5PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQ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gWndZ07d3ZaPnHihKpUqaKrV6+qZ8+eypkzp6ZPn66mTZtq/vz5at68eZL2SWwJlc+JEydUuXJlqyERHByspUuXqlOnTrp48aJ69eoV7/e6efOmsmTJotdee005c+bUgQMHNHHiRO3YsUM7d+600iWlfHx9fTVt2jSnz/3ll19cgu2SdPXqVdWsWVPHjh1T165dlT9/fv3yyy/q37+//v33X7cB9vutevXq6tKli2JiYrRr1y6NGzdO//zzj9avX5/sbZ45c0bXr1/Xq6++qieffFKvvPKKDhw4oMmTJ2vTpk3atGmTfHx8rPTnzp1To0aNFBERoRdeeEFz587Vq6++Km9vb3Xs2FHSnQ7GWrVq6c8//1SPHj1UsGBBzZs3T+3bt9f58+f12muvWdvr1KmToqKi1LBhQ3Xu3Fm3b9/W+vXrtXHjRuspoM6dO2v69Olq0aKF+vTpo02bNmnEiBH6/fff9c0336T4PoprypQpKlmypJo2bapMmTLpu+++U7du3RQTE6Pu3bsn+N4dO3aoevXqypw5s7p06aICBQrowIED+u677zR8+HCntBERESpQoIBGjBihjRs3asKECTp37pxmzJh
"text/plain": [
"<Figure size 2000x1500 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Вычисление среднего и стандартного отклонения для столбцов\n",
"means = df[['carat', 'depth', 'table']].mean()\n",
"std_devs = df[['carat', 'depth', 'table']].std()\n",
"\n",
"# Определение порога для выбросов (например, 3 стандартных отклонения)\n",
"threshold = 3\n",
"\n",
"# Функция для замены выбросов на среднее значение\n",
"def replace_outliers_with_mean(column):\n",
" mean_value = column.mean()\n",
" upper_limit = mean_value + threshold * column.std()\n",
" lower_limit = mean_value - threshold * column.std()\n",
" \n",
" return column.where((column >= lower_limit) & (column <= upper_limit), mean_value)\n",
"\n",
"# Применение функции к каждому столбцу\n",
"for column in ['depth', 'table', 'carat']:\n",
" df[column] = replace_outliers_with_mean(df[column])\n",
"\n",
"# Графическое отображение после замены выбросов\n",
"plt.figure(figsize=(20, 15))\n",
"for i, column in enumerate(['carat', 'depth', 'table'], 1):\n",
" plt.subplot(4, 2, i)\n",
" sns.boxplot(x=df[column])\n",
" plt.title(f\"Boxplot для {column} после замены выбросов на среднее значение\")\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Этот подход позволяет вам обрабатывать выбросы, не прибегая к квантилям и он наверяка избавит от выбросов. Однако стоит отметить, что использование стандартных отклонений может не всегда быть оптимальным для всех распределений данных, потому что данные могут быть плохо распределены. А использование медианы с квантилями вместо среднего значения помогает лучше справиться с выбросами, особенно если распределение данных имеет сильные отклонения."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB8YAAAMBCAYAAACdpd5PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACrw0lEQVR4nOzdeZxP5f//8ed7jJlhmLENZsIQQiOULClbZBuJQpKdKCSSIh9rSZayREqLIbIXLQhZ8il7fISSrCFr9t3M9fvD732+c+b9npn3jGXG8bjfbnPjnHO9r3Odc51z3u/rvM65LpcxxggAAAAAAAAAAAAAAIfyS+sCAAAAAAAAAAAAAABwKxEYBwAAAAAAAAAAAAA4GoFxAAAAAAAAAAAAAICjERgHAAAAAAAAAAAAADgagXEAAAAAAAAAAAAAgKMRGAcAAAAAAAAAAAAAOBqBcQAAAAAAAAAAAACAoxEYBwAAAAAAAAAAAAA4GoFxAABwV4mLi9Px48e1e/futC4KAAAAAAB3hfPnz+vvv//WyZMn07ooAIC7GIFxAI7icrk0cODAtC4GgHTm8OHD6t69uyIjIxUQEKCwsDDdf//9OnPmTFoXDQAAALhj0Ob2tGLFCrlcLq1YsSJN1j9w4EC5XC4dP348TdYPJGX27NmqUaOGsmbNqixZsqhAgQIaPnx4WhcLAHAXIzA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p8+rZiYGGXIkMHKMzY2VnXq1FHFihU1fPhwLVq0SAMGDNC1a9c0ePDgRMu7bds2Va5cWSEhIXr99deVMWNGffzxx6pWrZpWrlypChUqqEqVKurWrZvGjh2rN998UyVKlJAk69/klClTRj179pQk7dmzR/37908y/RdffGH9v0ePHrZle/bsUXR0tMLDw9W/f3+FhYVJklq2bJlsOWJjY1W/fn39+OOPatasmV555RWdPXtWS5Ys0datW1W4cGFJ0pgxY9SgQQM9//zzunLlimbMmKEmTZrou+++U3R0tC3PZcuWadasWerataty5cplBTh9yeOLL75Qhw4dVL58eXXs2FGSrDIkpVu3bipXrpxtXocOHWzTR44cUaVKlXThwgV169ZNOXPm1OTJk9WgQQPNmTNHjRo1StE+iS+p+jly5IgqVqxo3TQJCwvTwoUL1b59e505c0bdu3dPdLuuXLmirFmz6pVXXlHOnDm1a9cuffDBB9qyZYt+++03K11K6icoKEiTJk2yrfeXX37xCLZL0oULF1S1alUdPHhQnTp1UoECBfTLL7+oT58++ueff7wG2G+3ypUrq2PHjoqLi9PWrVs1evRoHTp0SKtWrUp1nidOnNClS5f00ksv6fHHH9eLL76oXbt2afz48Vq7dq3Wrl2rwMBAK/3JkydVr149NW3aVM8995xmzZqll156SQEBAWrXrp2k6zcZq1Wrpr/++ktdu3ZVoUKFNHv2bLVp00anTp3SK6+8YuXXvn17xcTEqG7duurQoYOuXbumVatWac2aNdabQB06dNDkyZPVuHFj9ezZU2vXrtXQoUP1+++/ewRXb8U+SmjChAmKiopSgwYN5O/vr2+//VadO3dWXFycunTpkuzn/f39tW3bNm3atEkPPvigNT8mJsZrjxNDhgxRv3791LRpU3Xo0EHHjh3TBx98oCpVqmjTpk3Kli2bx2eeeOIJtWrVStL1RvbYsWOTLddPP/2kBQsWeMxfv369fvnlFzVr1kz58uXT3r17NWHCBFWrVk3bt29X5syZk807vmrVqil//vyaNm2adS1ymzZtmgoXLqxHHnkkRXkCAIC7B21uT+mlzX3x4kXVqFFD+/fvV7du3RQREaEvvvhCy5Yt80i7bNky1a1bV2XLltWAAQP
"text/plain": [
"<Figure size 2000x1500 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Вычисление квантилей для каждого столбца\n",
"Q1 = df[['carat', 'depth', 'table']].quantile(0.01)\n",
"Q3 = df[['carat', 'depth', 'table']].quantile(0.99)\n",
"IQR = Q3 - Q1\n",
"\n",
"# Определение границ для выбросов\n",
"lower_bound = Q1 - 1.5 * IQR\n",
"upper_bound = Q3 + 1.5 * IQR\n",
"\n",
"# Функция для замены выбросов на медианное значение\n",
"def replace_outliers_with_median(column):\n",
" median_value = column.median()\n",
" return column.where((column >= lower_bound[column.name]) & (column <= upper_bound[column.name]), median_value)\n",
"\n",
"# Применение функции к каждому столбцу\n",
"for column in ['depth', 'table', 'carat']:\n",
" df[column] = replace_outliers_with_median(df[column])\n",
"\n",
"# Графическое отображение после замены выбросов\n",
"plt.figure(figsize=(20, 15))\n",
"for i, column in enumerate(['carat', 'depth', 'table'], 1):\n",
" plt.subplot(4, 2, i)\n",
" sns.boxplot(x=df[column])\n",
" plt.title(f\"Boxplot для {column} после замены выбросов на медиану\")\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Актуальность данных* — это проблема, которая возникает, когда данные устарели или больше не отражают текущую ситуацию. Это часто встречается в данных о ценах. \n",
"*Просачивание данных* происходит, когда в обучающей выборке присутствует информация, которая не должна быть известна модели на этапе обучения. В данном случае это может происходить, если некоторые переменные, такие как цена, сильно коррелируют с целевым признаком и тем самым искажают результат. Проверка на наличие утечек данных. \n",
"*Смещение в данных* может возникать, если датасет не полностью репрезентативен для реальной популяции бриллиантов. Например, если в датасете больше дешёвых или дорогих бриллиантов, это создаёт смещение в оценке моделей \n",
"Код ниже проверяет данные на распредение признаков и просачивание данных."
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEU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QWrdureDgYDmdznproq9evVqXXXaZoqKiFBISoj59+mjWrFk+Y7Zs2aJf/epXio6OVmBgoM4++2x9+OGHx40bAAAA/sGT6AAAADgjVSe8Y2JiJEk7d+7UwoULde211yolJUXZ2dl6+eWXddFFF+mHH35QUlKSJMntduvyyy/X0qVLdf311+uee+5RQUGBFi9erI0bN6pjx47eY4wZM0aXXXaZz3GnTZtWZzx//OMfZRiGpk6dqgMHDuiFF17QsGHDlJ6erqCgIEnSsmXLNHLkSA0YMECPPvqoLBaLXnvtNV1yySX64osvdO6559aat02bNpoxY4YkqbCwUHfeeWedx3744Yd13XXX6bbbbtPBgwf14osvavDgwVq3bp0iIyNr7TN+/HhdeOGFkqT33ntP77//vk//hAkTNG/ePN1yyy26++67lZGRodmzZ2vdunX66quvFBAQUOf7cDLy8vK851aTx+PRlVdeqS+//FLjx49X9+7d9f333+v555/Xjz/+qIULFx537sOHD+uyyy7TddddpzFjxuidd97RnXfeKbvdrltvvdVn7BNPPCG73a77779fZWVl9ZZwWbx4sS6//HIlJibqnnvuUUJCgjZv3qyPPvpI99xzjyRp06ZNOv/889W6dWv9/ve/V0hIiN555x2NHj1a//nPf/TLX/7y5N8oAAAAnF4mAAAA0Iy99tprpiRzyZIl5sGDB809e/aYCxYsMGNiYsygoCBz7969pmmaZmlpqel2u332zcjIMB0Oh/n4449721599VVTkvncc8/VOpbH4/HuJ8mcOXNmrTE9e/Y0L7roIu/28uXLTUlm69atTafT6W1/5513TEnmrFmzvHN37tzZTE1N9R7HNE2zuLjYTElJMS+99NJaxzrvvPPMXr16ebcPHjxoSjIfffRRb9uuXbtMq9Vq/vGPf/TZ9/vvvzdtNlut9m3btpmSzNdff93b9uijj5o1/+vwxRdfmJLM+fPn++z7ySef1GpPTk42R40aVSv2iRMnmkf/d+To2B944AEzLi7OHDBggM97+s9//tO0WCzmF1984bP/3LlzTUnmV199Vet4NV100UWmJPPZZ5/1tpWVlZl9+/Y14+LizPLyctM0j/zZdejQwSwuLvaZo7pv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AAAaBH+/e9/6+KLL9Y//vEPn/a8vDzFxsZ6tzt27KjVq1eroqKiQX4cs1r1k+bVTNPU9u3b1adPH+9xJSk8PFzDhg077nzr169XRUXFMW8cVM9rmqZSUlK8T1ofyw8//CDDMNS1a9djzrlkyRKdf/75J5Rgjo2NrXVOx/rxz2nTpqlv37769a9/Xe/x169fr6FDh55yiZ39+/erqKjI52n0H3/8UZLUvn37k56v+s9v48aN9f75dejQQVLl0/8n8mcMAACApoGa6AAAAGgRrFarTNP0aXv33Xdr1aC+5pprlJOTo9mzZ9ea4+j9T8Ybb7yhgoIC7/a///1vZWZmauTIkZKkAQMGqGPHjvrzn/+swsLCWvsfPHiwVuxWq1WXX375MY979dVXy2q16rHHHqsVv2maOnTokHfb5XLpP//5j84999xjlnO57rrr5Ha79cQTT9Tqc7lc3pIwpyItLU0ffPCBnnrqqXoT5Nddd5327dunv/3tb7X6SkpKVFRUdNzjuFwuvfzyy97t8vJyvfzyy2rVqpUGDBhw0nH3799fKSkpeuGFF2qdf/X7HhcXpyFDhujll19WZmZmrTmO/jMGAABA08CT6AAAAGgRLr/8cj3++OO65ZZbdN555+n777/X/PnzvU8HV7v55pv1xhtvaPLkyfrmm2904YUXqqioSEu
"text/plain": [
"<Figure size 1500x1000 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1sAAAIjCAYAAAD1OgEdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABPvklEQVR4nO3deVwW5f7/8fcNyiIKKiq44kIqLmliKbmRophYmpYtroVLirmVeuh43FrsaGpWLnk0LVNTs6zUVNz3XdwzM8wtsFzAjUWY3x/9mK+3oIIyEPJ6Ph7348Fcc801n7kZkLczc902wzAMAQAAAACylENOFwAAAAAADyPCFgAAAABYgLAFAAAAABYgbAEAAACABQhbAAAAAGABwhYAAAAAWICwBQAAAAAWIGwBAAAAgAUIWwAAAABgAcIWAADAbfr06aPmzZtn+34vXLggNzc3LV++PNv3DSDrEbYAPBROnDihXr16qWLFinJxcZG7u7saNGigSZMm6caNGzldHoBcJCoqSjNmzNDbb79t2T6WL1+ukSNHpmn39PRU9+7d9Z///MeyfQPIPjbDMIycLgIAHsSyZcv0wgsvyNnZWV26dFGNGjWUmJiozZs3a/HixerWrZumT5+e02UCyCUGDBign376SceOHbNsH3379tXkyZOV3p9hR48eVbVq1bRmzRo1bdrUshoAWC9fThcAAA8iKipKL730knx8fLR27VqVLFnSXBcWFqZff/1Vy5Yty8EKAeQmSUlJmjt3rl5//fUcq8HPz081atTQ7NmzCVtALsdthABytbFjx+rq1auaOXOmXdBK5evrq/79+5vLNptNffv21dy5c1WlShW5uLjI399fGzduTLPt2bNn9dprr8nLy0vOzs6qXr26Pv/883TrGDlypGw2W5pXYGCgXb/AwEDVqFEjzfYffvihbDabTp48abbdvHlT7777ripXrixnZ2e7cXfv3p3pfunp1q2bChYsmKb9m2++kc1m0/r16+3aExISNGLECPn6+srZ2Vlly5bVkCFDlJCQYNcv9X2+XevWrVW+fPk0x/7kk0/K09NTrq6u8vf31zfffHPXulMFBgam+76nvm59PyVpypQpql69upydnVWqVCmFhYXp8uXLd93Hnb63t75S36fAwMA03/Ndu3aZ/W51t/FS3yPDMFS+fHm1adMmTV3x8fHy8PBQr1697lr/zZs39c4776hSpUpydnZW+fLl9fbbb6f5npUvXz7dWrp37y5JOnnypGw2mz788ENNnDhRPj4+cnV1VZMmTXTo0CG7sQ4cOKBu3bqZt/V6e3vrtdde04ULF9J9b//66y+79t27d8tms2n27NlmW7du3dKcO1999ZUcHBz0wQcf3LXf6dOn5erqmu45cbvNmzfrr7/+UlBQUJp18fHxGjlypCpXriwXFxeVLFlS7dq104kTJyRJ69evT/fnJvW9Sz2ebt26afLkyZLsz4NbNW/eXD/++GO6V74A5B5c2QK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nbf99tFRkYakozu3bvbtb/11luGJGPt2rV2xxUSEnLHsaKiogxJhqurq3HmzBmzfceOHYYkY+DAgWbb7d9TwzCM+fPnG5KMjRs3mm0jRowwJBl//vmnXd9du3YZkoxZs2aZbV27djXfl927dxsFCxY0XnjhBbvv5+39DMMwDh06ZDg4OBhPP/10mp+x9HTq1Mnw9PRM0/75558bkowJEyakWZf6PVi3bl2anxvD+L/37tbjCQsLS3NO3Grr1q2GJGPBggV3rRfAPxu3EQLIteLi4iRJhQoVytR2AQEB8vf3N5fLlSunNm3aaOXKlUpOTpZhGFq8eLGeeeYZGYahv/76y3wFBwcrNjZWe/futRsz9X/NXVxc7rn/5ORkuzH/+usvXb9+PU2/K1euqEiRIve8CpDRfg9q0aJF8vPzU9WqVe1qT32mZN26dXb94+Pj0xxnUlJSmnFdXV3Nry9duqTY2Fg1atQozXv8IFavXq3ExEQNGDBADg7/909fjx495O7ubslzfYZhKDw8XO3bt1e9evXue5zKlSurXr16mjt3rtl28eJF/fTTT+rYseNdv++p04cPGjTIrj316tX9HHfbtm1VunRpc/mJJ55QvXr17KYqv/V7mnoe1K9fX5LS/b5evHjR7jyJjY294/5/++03hYSEqHbt2pozZ47d9zM94eHhqlOnjl544YUMHd+FCxdUpEiRNO2LFy9WsWLF9MYbb6RZZ8XPXmoNt99iCSB34TZCALmWu7u7pL/DRmY88sgjadoqV66s69ev688//5SDg4MuX76s6dOn3/FWvPPnz9st//XXX8qfP78KFChwz/3//PPPKl68+D37BQQEaMaMGfrss8/UunVrOTs76+rVq/fd70EdP35cR48evWPtt78nM2fO1MyZM9P08/HxsVteunSp3n33XUVGRto9R5SVf8D+/vvvkqQqVarYtTs5OalixYrm+qw0d+5cHT58WAsXLtS8efMeaKwuXbqob9+++v333+Xj46NFixYpKSlJnTt3vut2v//+uxwcHNLcCujt7a3ChQvf13Hf6edn4cKF5vLFixc1atQoff3112nOi/SC1O3flzu5du2agoODFRMTI09Pz3ueI5s3b9aPP/6oNWvW6NSpUxnah6R0n5M6ceKEqlSponz5sudPp9QarP5PFADWImwByLXc3d1VqlSpNA/nP6iUlBRJUqdOndS1a9d0+zz66KN2yydPnlS5cuUy9IdR+fLl9b///c+ubdGiRWmC3ZgxY3T27Nl7zoqW0X4PKiUlRTVr1tSECRPSXV+2bFm75TZt2qSZJGPYsGGKjo42lzdt2qRnn31WjRs31pQpU1SyZEnlz59fs2bNeuCAkpMSExP1n//8R6GhoapcufIDj/fSSy9p4MCBmjt3rt5++2199dVXqlu3boZDSnb/wd6hQwdt3bpVgwcPVu3atVWwYEG
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Проверка распределения признаков\n",
"plt.figure(figsize=(15, 10))\n",
"for i, column in enumerate(['price', 'cut'], 1):\n",
" plt.subplot(3, 1, i)\n",
" sns.histplot(df[column], bins=20, kde=True)\n",
" plt.title(f\"Распределение {column}\")\n",
"plt.tight_layout()\n",
"plt.show()\n",
"\n",
"# Средняя цена по типу огранки (cut)\n",
"cut_price_mean = df.groupby('cut')['price'].mean().sort_values()\n",
"plt.figure(figsize=(10, 6))\n",
"sns.barplot(x=cut_price_mean.index, y=cut_price_mean.values)\n",
"plt.title(\"Средняя цена по типу огранки (cut)\")\n",
"plt.xlabel(\"Огранка\")\n",
"plt.ylabel(\"Средняя цена\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Для решения проблем с просачиваниям, проведём корелляционый анализ между признаками и целевым признаком. "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Корреляция признаков с ценой (price):\n",
"price 1.000000\n",
"carat 0.921591\n",
"x 0.884433\n",
"y 0.865419\n",
"z 0.861249\n",
"clarity_SI2 0.128427\n",
"table 0.127118\n",
"color_I 0.097130\n",
"cut_Premium 0.095685\n",
"color_J 0.081714\n",
"color_H 0.059229\n",
"clarity_SI1 0.008940\n",
"color_G 0.008564\n",
"cut_Very Good 0.006589\n",
"cut_Good -0.000307\n",
"clarity_VS2 -0.001066\n",
"clarity_VS1 -0.009879\n",
"depth -0.010630\n",
"color_F -0.024166\n",
"clarity_IF -0.049593\n",
"clarity_VVS2 -0.052375\n",
"clarity_VVS1 -0.095261\n",
"cut_Ideal -0.097160\n",
"color_E -0.101101\n",
"Unnamed: 0 -0.306875\n",
"Name: price, dtype: float64\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA2QAAAIjCAYAAABswtioAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB6/ElEQVR4nO3dd3wUdf7H8ffsbnbTE5KQhECA0HuLgoiiAoKKhVPPhmdDUQ9UDk89fhY4PUWxF07Pu1P0xH6KngVFEEFBlNAhIGDopJHek935/RGysiS0sGES8no+3Ed2Z777nc9MVtg3M9/vGKZpmgIAAAAAnHA2qwsAAAAAgOaKQAYAAAAAFiGQAQAAAIBFCGQAAAAAYBECGQAAAABYhEAGAAAAABYhkAEAAACARQhkAAAAAGARAhkAAAAAWIRABgAAThiPx6NevXrp0Ucf9XvfhmFo2rRpfu9Xkvbt26eQkBB98cUXDdI/gOaLQAYAJ9CsWbNkGIb3ERgYqC5dumjixInKyMiwujygwb3zzjvauXOnJk6caHUpxyQ6Olo333yzHnzwQatLAXCSMUzTNK0uAgCai1mzZunGG2/Uww8/rKSkJJWVlen777/Xf/7zH7Vr107r1q1TcHCw1WUCDaZfv34aNGiQ/vGPf/i977KyMjkcDjkcDr/3LUmpqanq0aOH5s+fr2HDhjXINgA0P5whAwALnH/++br22mt18803a9asWZo0aZLS0tL0ySefWF0a0GBWrlyp1atX64orrvBbnx6PR2VlZZKkwMDABgtjktS9e3f16tVLs2bNarBtAGh+CGQA0AjU/Gt7WlqaJCknJ0d//vOf1bt3b4WGhio8PFznn3++Vq9eXeu9ZWVlmjZtmrp06aLAwEC1atVKl156qbZu3SpJ2rZtm89lkgc/zj77bG9fCxculGEYeu+99/R///d/io+PV0hIiC6++GLt3Lmz1raXLVum8847TxEREQoODtZZZ52lH374oc59PPvss+vcfl1jft566y0lJycrKChIUVFRuuqqq+rc/uH27UAej0fPPfecevbsqcDAQMXFxenWW29Vbm6uT7v27dvrwgsvrLWdiRMn1uqzrtqffPLJWsdUksrLyzV16lR16tRJLpdLiYmJuvfee1VeXl7nsTrQ2WefrV69etVa/tRTT8kwDG3bts1neV5eniZNmqTExES5XC516tRJTzzxhDwej7dNzXF76qmnavXbq1evOj8TH3744SFrvOGGG9S+ffsj7sucOXPkdDo1dOhQn+XTpk2TYRjauHGjrrjiCoWHhys6Olp33XWXN2zVMAxDEydO1OzZs9WzZ0+5XC7NnTvXu+7g38nu3bs1btw4JSQkyOVyKSkpSbfffrsqKiq8bY7mmNU499xz9b///U9cYATAXxrun5EAAEetJjxFR0dLkn799VfNmTNHv//975WUlKSMjAz94x//0FlnnaUNGzYoISFBkuR2u3XhhRdq/vz5uuqqq3TXXXepsLBQ8+bN07p169SxY0fvNq6++mpdcMEFPtudMmVKnfU8+uijMgxD9913nzIzM/Xcc89pxIgRWrVqlYKCgiRJCxYs0Pnnn6/k5GRNnTpVNptNr7/+uoYNG6bFixdr4MCBtfpt06aNpk+fLkkqKirS7bffXue2H3zwQV1xxRW6+eablZWVpRdffFFDhw7VypUrFRkZWes948eP15lnnilJ+uijj/Txxx/7rL/11lu9l4veeeedSktL00svvaSVK1fqhx9+UEBAQJ3H4Vjk5eV59+1AHo9HF198sb7//nuNHz9e3bt319q1a/Xss8/ql19+0Zw5c4572zVKSkp01llnaffu3br11lvVtm1bLVmyRFOmTNHevXv13HPP+W1b9bFkyRL16tXrkMf7iiuuUPv27TV9+nT9+OOPeuGFF5Sbm6s333zTp92CBQv0/vvva+LEiYqJiTlkGNyzZ48GDhyovLw8jR8/Xt26ddPu3bv14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A0eKSRQCwwMyZM9WlSxc5HA7FxcWpa9eu3gAmVX+ZfP755/X3v/9daWlpPl+Say5rlKovdezatavfJzLo3Lmzz2vDMNSpUyfveKXNmzdLkq6//vpD9pGfn+/z5Ts7O7tWvwfbvHmzTNM8ZLuDL3WrCQcHh6CD+8zPz1dsbGyd6zMzM31ef/3112rZsuVh6zzY1KlTlZCQoFtvvbXWWKvNmzcrNTX1kH0evP3jsXnzZq1Zs+aotzV16lRNnTq1Vru4uLhay2666Sbv89DQUF100UV69tln62x7OOZhxl4d/Hvv2LGjbDZbrXFySUlJR9xOVlaWCgoKjnhZ4bEes5r6j+cfPADgQAQyALDAwIED6/xX+xqPPfaYHnzwQd1000165JFHFBUVJZvNpkmTJtU50cCJVlPDk08+qX79+tXZ5sCQVFFRob179+rcc889Yr+GYejLL7+U3W4/bJ+SlJ6eLkmKj48/bJ+xsbGaPXt2nesP/iI+aNAg/e1vf/NZ9tJLLx1yBszU1FTNmjVLb731Vp1jozwej3r37q1nnnmmzvcnJiYesvZj5fF4dO655+ree++tc32XLl18Xo8fP16///3vfZbdcsstdb73oYce0plnnqnKykqlpKTo4YcfVl5e3jHdKDk6OrrWRCqHc6jQUzOO0R+O9ZjV1B8TE+O3GgA0bwQyAGiEPvzwQ51zzjn697//7bM8Ly/P54tgx44dtWzZMlVWVvplYooaNWfAapimqS1btqhPnz7e7UpSeHi4RowYccT+Vq9ercrKysOG0Jp+TdNUUlJSrS/CddmwYYMMw1DXrl0P2+c333yjIUOGHNUX+ZiYmFr7dLiJN6ZMmaJ+/frpyiuvPOT2V69ereHDhzf4WZWOHTuqqKjoqH4nUvUZqYPbhoSE1Nm2d+/e3rbnn3++duzYoTfeeENVVVVHXV+3bt28M4nWZfP
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from sklearn.model_selection import train_test_split\n",
"\n",
"# Преобразуем все категориальные данные в числовые\n",
"# Проверим, какие столбцы являются категориальными\n",
"categorical_columns = df.select_dtypes(include=['object']).columns\n",
"\n",
"# Применяем one-hot encoding к категориальным столбцам\n",
"df_encoded = pd.get_dummies(df, columns=categorical_columns, drop_first=True)\n",
"\n",
"# Вычисляем корреляцию для преобразованных данных\n",
"correlations = df_encoded.corr()['price'].sort_values(ascending=False)\n",
"print(\"Корреляция признаков с ценой (price):\")\n",
"print(correlations)\n",
"\n",
"# Визуализация распределения цены (price)\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(df['price'], bins=30, kde=True)\n",
"plt.title('Распределение цены (price)')\n",
"plt.xlabel('Цена')\n",
"plt.ylabel('Количество')\n",
"plt.show()\n",
"\n",
"# Разделение данных на обучающую и тестовую выборки\n",
"X = df_encoded.drop('price', axis=1)\n",
"y = df_encoded['price']\n",
"\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=df['cut'])\n"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество дубликатов: 0\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/YAAAIjCAYAAACpnIB8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACj7ElEQVR4nOzdd3gUdf4H8Pf23fTeIAkBQgepIkWKhF4sePwQVEROEEVE7izcCSIWBBuKiu3OineKKJZTpCq9g7SAgAmhpPdssn1+f0xmk002IQmb3Wzyfj3P99nZ2dmZz25mN/uZb5MJgiCAiIiIiIiIiLyS3NMBEBEREREREVHDMbEnIiIiIiIi8mJM7ImIiIiIiIi8GBN7IiIiIiIiIi/GxJ6IiIiIiIjIizGxJyIiIiIiIvJiTOyJiIiIiIiIvBgTeyIiIiIiIiIvxsSeiIiI3Eav1+PSpUvIz8/3dChEzV5BQQHOnz8P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8PPzw7Zt27BkyRIUFRXh5ZdfBiCeV8899xwef/xx3HnnnZg0aRL0ej3uu+8+dOrUCcuWLWvQe0TU7AlERDX46KOPBADCli1bhOzsbOHSpUvCf//7XyE0NFTQ6XTC5cuXBUEQBIPBIFitVofnpqSkCBqNRli2bJl93b///W8BgPDaa69VO5bNZrM/D4Dw8ssvV9uma9euwtChQ+33t2/fLgAQWrVqJRQVFdnXf/XVVwIA4Y033rDvOzExURg9erT9OIIgCKWlpUJCQoIwcuTIasc
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/YAAAIjCAYAAACpnIB8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADZIklEQVR4nOzdeVxU9f7H8dewIwiIoOCC4gqappIpWVrmbptL3UxzLdO0Utuu92Zq3bJsMc20XS1b1EorNdfUMpdcc8MlxaAUBRdwAxTO74/zm1EEFRA4DLyfj8dpzpw58/1+zjAz+ZnvZjMMw0BEREREREREnJKL1QGIiIiIiIiISP4psRcRERERERFxYkrsRURERERERJyYEnsRERERERERJ6bEXkRERERERMSJKbEXERERERERcWJK7EVEREREREScmBJ7ERERERERESemxF5ERKQUOnXqFAcPHuTMmTNWhyJSohmGwfHjx9m3b5/VoYhICabEXkREpBQwDIMPP/yQ5s2bU6ZMGfz8/AgPD2fmzJlWh+YU/v77b6ZPn+64f/DgQb744gvrAhJ27NjBvHnzHPe3bt3KggULrAvoEqdOneKFF16gbt26eHh4UL58eerUqcOePXusDk1ESigl9iJSrEyfPh2bzebYvLy8qFOnDkOHDuXIkSNWhydyTWvWrGHMmDGcPHnS6lCyeOihhxg0aBCRkZF8/vnnLF26lGXLltG1a1erQ3MKNpuNIUOGsHjxYg4ePMhzzz3Hr7/+anVYpdqpU6d47LHHWLduHfv27eOpp55i+/btVofFsWPHiI6OZtKkSXTv3p3vv/+epUuXsnLlSqpXr251eCJSQrlZHYCISE5eeuklwsPDSU1NZfXq1UydOpWFCxeyY8cOypQpY3V4Ile0Zs0axo4dS9++fQkICLA6HAA+++wzZs2axcyZM3nooYesDscpVa5cmUcffZQOHToAEBoaysqVK60NqpSLjo52bAB16tTh0UcftTgqePbZZzl8+DBr166lfv36VocjIqWEEnsRKZY6duzITTfdBMAjjzxC+fLlefvtt/n+++/p0aOHxdFJaXLmzBl8fHysDuO6vPHGG/To0UNJ/XV65513eOKJJ0hKSuKGG25w+vdFSTBv3jx27drFuXPnaNCgAR4eHpbGc/ToUWbMmMH777+vpF5EipS64ouIU2jdujUAsbGxABw/fpxnnnmGBg0a4Ovri5+fHx07duSPP/7I9tzU1FTGjBlDnTp18PLyIjQ0lK5du7J//37AHCt7aff/y7fbb7/dUdbKlSux2WzMmjWL//znP4SEhODj48M999xDfHx8trrXr19Phw4d8Pf3p0yZMrRq1Yrffvstx2u8/fbbc6x/zJgx2c6dOXMmUVFReHt7ExgYyIMPPphj/Ve7tktlZmbyzjvvUL9+fby8vKhYsSKPPfYYJ06cyHJe9erVueuuu7LVM3To0Gxl5hT7G2+8ke01BUhLS2P06NHUqlULT09PqlatynPPPUdaWlqOr9Xl1q9fT6dOnShXrhw+Pj40bNiQiRMnOh7ftm0bffv2pUaNGnh5eRESEkL//v05duxYlnLGjBmDzWZj165dPPTQQ5QrV45bb70112WMGTOGZ599FoDw8HDHa33w4MErxn753z0oKIjOnTuzY8eOXF37nDlzHO+FoKAgevXqxT///ON4/MyZM+zYsYOqVavSuXNn/Pz88PHx4fbbb8/SlfzAgQPYbDYmTJiQrY41a9Zgs9n46quvHDFf/je0v9cuHYee29fdPgTn0tdp8eLF3HLLLZQpUwZ/f3/uuuuubK+J/e+VlJTkOLZx48ZscQDccMMN2WIG+Omnn7jtttvw8fGhbNmydO7cmZ07d2Y5p2/fvo4u1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9uxZpk6dyq233sqWLVuuOh76xRdfzJZU5UVun//YY4/Rpk0bx/2HH36YLl26ZJkbwf7+yu31bNu2jdtuuw13d3cGDhxI9erV2b9/Pz/++COvvPIKXbt2pVatWo7yhw8fTmRkJAMHDnQci4yMBHL3HrQLCgpy/HD0999/M3HiRDp16kR8fLzjvDFjxjB27FjatGnD4MGD2bNnD1OnTmXDhg3X/C56/vnnr/l6Xiq/n7ursX/ehg4dSlRUFK+99hqJiYlMmjSJ1atXs2XLFsf3wrJly+jYsSM1atRgzJgxnDt3jnfffZcWLVqwefPmbO+/Bx54gOrVqzNu3DjWrVvHpEmTOHHiBJ999tkV43nkkUdYuXIlS5cupV69eo7jU6dOpX79+txzzz24ubnx448/8vjjj5OZmcmQIUMA8wf1xx9/nHHjxnHffffRpEkTDh8+zBNPPEGbNm0YNGhQvl8nESkEhohIMTJt2jQDMJYtW2YkJiYa8fHxxtdff22UL1/e8Pb2Nv7++2/DMAwjNTXVyMjIyPLc2NhYw9PT03jppZccxz799FMDMN5+++1sdWVmZjqeBxhvvPFGtnPq169vtGrVynF/xYoVBmBUrlzZSElJcRyfPXu2ARgTJ050lF27dm2jffv2jnoMwzDOnj1rhIeHG23bts1W1y233GLccMMNjvuJiYkGYIwePdpx7ODBg4arq6vxyiuvZHnu9u3bDTc3t2zH9+3bZwDGjBkzHMdGjx5tXPr1/+uvvxqA8cUXX2R57qJFi7Idr1atmtG5c+dssQ8ZMsS4/H8pl8f+3HPPGRUqVDCioqKyvKaff/654eLiYvz6669Znv/+++8bgPHbb79lq8/uwoULRnh4uFGtWjXjxIkTWR67/HW/3FdffWUAxi+//OI4Zn9tevToke383JbxxhtvGIARGxt7xbgv1apVqyyvh2EYxn/+8x8DMI4ePXrF56WnpxsVKlQwbrjhBuPcuXOO4/PnzzcA48UXXzQM4+L728PDw9i7d6/jvMTERKN8+fJGVFSU49gHH3xgAEZMTEyWeoKCgow
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/YAAAIjCAYAAACpnIB8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADEcklEQVR4nOzdd3RU1d7G8e+kJ4QkhIQklEDooQlESgQRkI6glIsoCCi2K6iI5dXrVQELdmyo1wZ6QVEQbPQqXYp0QieEHgKEkN7O+8e5GQgJENJOyvNZK2v2zJw555lhMuQ3e5+9bYZhGIiIiIiIiIhIqeRgdQARERERERERyT8V9iIiIiIiIiKlmAp7ERERERERkVJMhb2IiIiIiIhIKabCXkRERERERKQUU2EvIiIiIiIiUoqpsBcREREREREpxVTYi4iIiIiIiJRiKuxFRETKsfT0dKKjo4mKirI6ikiZl5yczIkTJ4iOjrY6ioiUMSrsRUSkzOjYsSMdO3a07Pg2m43Ro0dbdvy82r9/Pw899BBBQUG4uLgQEBBAeHg4hmFYHa1UmDZtGpGRkfbrU6dO5fjx49YFEj755BNiY2Pt1z/44AMSEhKsC3SZJUuW0LdvX3x8fHB3d6datWo8+eSTVscSkTJGhb2IWG7q1KnYbDb7j5ubG/Xr12f06NGcPn3a6ngi2axdu5Zx48ZlKyJKk/Xr19O6dWuWLVvG888/z8KFC1m8eDG//PILNpvN6nilwqpVq3juueeIjIxk4cKFjBo1CgcH/Ullpd9//51x48Zx9OhRpk+fzksvvYS7u7vVsfj000/p3r07Fy5c4MMPP2Tx4sUsXryYCRMmWB1NRMoYJ6sDiIhkmTBhAiEhISQnJ7N69Wo+++wz5s2bx86dO/Hw8LA6nghgFvbjx49nxIgR+Pj4WB3nhqSmpnL//fdTv359Fi1ahLe3t9WRSqWnnnqKjh07EhISAsDYsWMJCgqyOFX59q9//Yu+ffvy4Ycf4uDgwHvvvWf5ly379+9n7NixPPzww3z66af64kxEipQKexEpMXr27MnNN98MwIMP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SZNmvDll1/meGxCQgJPP/20/d+rQYMGvPvuuzl+9/PyOXV53sstX74cV1dXHn30UfttR44c4bHHHqNBgwa4u7tTuXJl/vGPf2T7TDMMg06dOuHv759t0r/U1FSaNm1KnTp1Ssx8BiLlmXrsRaTEyirCK1euDJh/5P3yyy/84x//ICQkhNOnT/Of//yH2267jd27d1O1alUAMjIyuOOOO1i6dCmDBw/mySef5OLFiyxevJidO3dm612755576NWrV7bjvvDCC7nmef3117HZbPzf//0f0dHRfPDBB3Tp0oWtW7faz+VctmwZPXv2JCwsjFdeeQUHBwemTJlC586dWbVqFa1bt86x3+rVqzNx4kQA4uPj+ec//5nrsV966SUGDRrEgw8+yJkzZ/j444/p0KEDW7ZsyXVI+MMPP8ytt94KwOzZs5kzZ062+x955BGmTp3K/fffzxNPPMHhw4f55JNP2LJlC2vWrMHZ2TnX1+FGxMbG2p/b5TIzM+nbty+rV6/m4YcfJjQ0lB07djBp0iT27dvHL7/8cs39fv311zzyyCPccsstjBkzhkOHDtG3b198fX2pUaNGvo/z559/8uOPP/LEE0/g6urKp59+So8ePdiwYQNNmjShf//+7Nu3jx9++IFJkybh5+cHgL+/v30fq1evZvbs2Tz22GNUrFiRjz76iAEDBhAVFWV/L1/Lv/71L0JDQ0lKSrJ/mVSlShVGjhx51cckJSXRsWNHDhw4wOjRowkJCWHmzJmMGDGC2NhY+0RdZ8+e5dChQ/zrX/+if//+PP3002zatIl33nmHnTt3MnfuXGw2G/fddx/fffcdCxcuzPalzqlTp1i2bBmvvPLKdZ/HlT788EP69u3LkCFDSE1NZcaMGfzjH//gjz/+oHfv3ld93IABA1i8eDHDhg2jdevWLF++nBdeeIHIyEg+//zzG86Rm8TERG677TaOHz/OI488QnBwMGvXruWFF17g5MmTfPDBB1d97IEDB3It1PIqr4/39/fnv//9r/161u/05bdlfbbdyPMZOXIkU6dOpWfPnjz44IOkp6ezatUq1q9fz80335xt/6tWreKLL77I9t4PCAgA8v4ezJL1+ZSSksLChQt59913cXNz49VXXwXg9OnT3HLLLSQmJvLEE09QuXJlvv32W/r27cusWbPo16/fVV+rlStXMm/evOu+ppfLz+/d9Zw9e5ZNmzbh5OTEqFGjqFOnDr/88gsPP/wwZ8+e5fnnnwfMwrlv374sX76ckSNH0rx5cxYuXMizzz7L8ePHmTRpUrb9Xu9zKjfbtm3jrrvuolevXkyePNl++8aNG1m7di2DBw+mevXqREZG8tlnn9GxY0d2796Nh4cHNpuNb775hmbNmvHoo48ye/ZsAF555RV27drFihUrqFChQr5fJxEpJIaIiMWmTJliAMaSJUuMM2fOGEePHjVmzJhhVK5c2XB3dzeOHTtmGIZhJCcnGxkZGdkee/jwYcPV1dWYMGGC/bZvvvnGAIz3338/x7EyMzPtjwOMd955J8c2jRs3Nm677Tb79eXLlxuAUa1aNSMuLs5++08//WQAxocffmjfd7169Yzu3bvbj2MYhpGYmGiEhIQYXbt2zXGsW265xWjSpIn9+pkzZwzAeOWVV+y3RUZGGo6Ojsbrr7+e7bE7duwwnJyccty+f/9+AzC+/fZb+22vvPKKcflH/qpVqwzAmD59erbHLliwIMftNWvWNHr37p0j+6hRo4wr/xu5Mvtzzz1nVKlSxQgLC8v2mv73v/81HBwcjFWrVmV7/Oeff24Axpo1a3IcL0tqaqpRpUoVo3nz5kZKSor99i+++MIA8n0cwACMTZs22W87cuSI4ebmZvTr189+2zvvvGMAxuHDh3NkAwwXFxfjwIED9tu2bdt
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/YAAAIjCAYAAACpnIB8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADpxUlEQVR4nOzdeXwT1d4G8Cfd0r2le1laSgu0IIiAQkEREalYFQH1qiggKIqgAipe7quAqOCGCMridgEFroKyqCCyKArKJptAKYsUytItLd33dt4/jpM0dE+TzEx5vp9PSZpMZk7SpPSZ8zvn6CRJkkBEREREREREmuSgdAOIiIiIiIiIyHIM9kREREREREQaxmBPREREREREpGEM9kREREREREQaxmBPREREREREpGEM9kREREREREQaxmBPREREREREpGEM9kREREREREQaxmBPRER0DSouLsbly5eRnp6udFOImr28vDycO3cOBQUFSjeFiJopBnsiIrrmnTt3DjqdDu+99169286cORM6nc4OrbK+bdu24d5774Wvry/c3NzQqlUrPP/880o3SzNmz56NyspKAEBlZSXmzJmjcIuubfn5+fjggw+M32dnZ2PhwoXKNagKSZLwySefoHfv3nB3d4e3tzciIiKwYsUKpZtGRM0Ugz0Rqc6yZcug0+mMX66urujQoQMmTpyItLQ0pZtHKrRq1SqzP/CpukWLFiEuLg45OTmYP38+tm7diq1bt2LWrFlKN00zli9fjvfeew8XL17E3LlzsXz5cqWbdE1zc3PDK6+8gpUrV+LChQuYOXMmvv/+e6WbBQB45JFH8PTTTyMmJgZffvkltm7dim3btmHYsGFKN42ImiknpRtARFSbWbNmISIiAsXFxdi1axcWL16MTZs24dixY3B3d1e6eaQiq1atwrFjxzBp0iSlm6JKp0+fxpQpUzBu3DgsWrRIsxUHSps1axZGjhyJl19+GXq9nr2vCnN0dMRrr72GkSNHorKyEt7e3ti4caPSzcIXX3yBr7/+GitWrMAjjzyidHOI6BrBYE9EqjV48GD07NkTAPDEE0/A398f77//PjZs2ICHH35Y4dYRaceCBQsQEhKCBQsWMNQ3wb/+9S/cdtttOHPmDNq3b4/AwEClm3TNe+GFF/Cvf/0LFy5cQExMDHx9fZVuEt599108/PDDDPVEZFcsxScizRgwYAAAICkpCQCQlZWFF198EV26dIGnpye8vb0xePBgHDlypNpji4uLMXPmTHTo0AGurq4IDQ3FsGHD8PfffwMwjbGu7at///7Gfe3YsQM6nQ5ff/01/vOf/yAkJAQeHh649957ceHChWrH3rt3L+688074+PjA3d0dt956K37//fcan2P//v1rPP7MmTOrbbtixQr06NEDbm5u8PPz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VKys3NNd6+evVqCYA0f/58477bt28vxcXFGY8jSZJUWFgoRURESHfccUe1Y/Xp00e67rrrjN9nZGRIAKQZM2YYbzt37pzk6Ogovfnmm2aPPXr0qOTk5FTt9tOnT0sApOXLlxtvmzFjhlT1v4CdO3dKAKSVK1eaPXbz5s3Vbg8PD5fi4+OrtX3ChAnS1f+tXN32qVOnSkFBQVKPHj3MXtMvv/xScnBwkHbu3Gn2+CVLlkgApN9//73a8aqKj4+XwsPDq91eXl4ulZSUmN125coVKTg4WBozZozxNvnnX/X9JUmStHfvXgmANHnyZONtV792jf15XO3q/UmSJG3ZskUCIK1evbrOx953332Si4uL9Pfffxtvu3z5suTl5SX169fPeFt4eLgEQFq2bJnxtvLycun222+X9Hq9ZDAYJEmSpJM
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/YAAAIjCAYAAACpnIB8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC+3klEQVR4nOzdd3xT9f4G8Cfdu6W7UFoKLbRlL6GAbChQUJaKggwHiigCV/Fyf4IIV1EUEZXhBBS4Cipb9h5lbyi7UKAzdNG9zu+Pw0kbOmizTtI879ernjQ545OatDz5LoUgCAKIiIiIiIiIyCRZyF0AEREREREREWmOwZ6IiIiIiIjIhDHYExEREREREZkwBnsiIiIiIiIiE8ZgT0RERERERGTCGOyJiIiIiIiITBiDPREREREREZEJY7AnIiIiIiIiMmEM9kRERCYoOzsbd+/eRVpamtylENV66enpuHHjBoqKiuQuhYioQgz2REREJmLt2rXo1asXnJ2d4eTkhICAAMybN0/uskxCVlYWvv76a9X36enpWLRokXwFEe7du4fly5ervr99+zZWrVolX0FlFBYWYt68eWjZsiVsbW1Rp04dhISEYPfu3XKXR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hzJgx5e6vyfMZPXq0YGFhUeHrs+yxkm7duqn9/y+ruq/Bx38GgiAIO3bsEAAIa9asEQRBEAoKCgRvb2+hWbNmQm5urmq/zZs3CwCEmTNnqu57/H1
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACTOElEQVR4nOzdd3hUZfrG8Xsy6Z0QUpAWASlSFFSMKEWQgIiiqAsWEFHUBRVw0WV/igi7i4KorA1dCxZcFQWsiwSkiAIiRaQuYCAIBBJaSG/n98cwk0wyCSmTmWTy/VxXrmTOeeecd+KE3Xue57zHZBiGIQAAAAAA4LG83D0BAAAAAABQuwj/AAAAAAB4OMI/AAAAAAAejvAPAAAAAICHI/wDAAAAAODhCP8AAAAAAHg4wj8AAAAAAB6O8A8AAAAAgIcj/AMA4IEyMzN16NAhnTp1yt1TATze6dOntW/fPhUUFLh7KgBQLsI/AAAeYuHCherXr59CQkIUHBysFi1aaNasWe6eVr2QkZGhl156yfb49OnTevXVV903IeiPP/7Q/PnzbY8PHDigBQsWuG9CJeTn52vWrFnq2rWr/Pz81KhRI7Vt21YrVqxw99QAoFwmwzAMd08CAFxp/vz5Gj16tO2xn5+fWrRooQEDBuipp55SdHS0G2cHVM9f//pXPffcc7rppps0fPhwRUZGymQy6aKLLlLz5s3dPb06r7CwUGFhYXrjjTfUq1cvzZkzR7t379bSpUvdPbUG6/Dhw7rooou0aNEitWvXTo8//rgiIiI0b948t84rNzdXAwYM0Pr16/Xggw+qX79+CgwMlNlsVvfu3RUaGurW+QFAebzdPQEAcJfp06crLi5OOTk5Wrt2rV5//XV9++232r59uwIDA909PaDSVq9ereeee04zZ87U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aGqrg4GD169dP69evtxtj/e+xZs0aPfDAA2rcuLFCQ0M1cuRIh/8+3nPPPXbbxo4dK39/f7v3yRdffKHBgwfb/vu3bt1aM2bMUGFhoW3Mrl27FBAQoJEjR9odb+3atTKbzXriiSfK/b0AqJ9o+weAc6xBvXHjxpKk33//XUuWLNFtt92muLg4HTt2TG+88YZ69+6tnTt3qmnTppIs1wrfcMMNWrFihYYPH65HH31UZ8+eVWJiorZv367WrVvbzjFixAhdf/31duedMmWKw/n84x//kMlk0hNPPKHjx4/rpZdeUv/+/bV161YFBARIsvyf8kGDBql79+56+umn5eXlpXfffVfXXnutfvjhB11xxRVljtusWTNbyMvIyNBDDz3k8NxPPfWUbr/9dt13331KTU3Vyy+/rF69emnLli0OK6Jjx47VNddcI0latGiRFi9ebLf/gQcesHVdPPLII0pKStIrr7yiLVu26Mcff5SPj4/D30NVnD592vbaSioqKtKNN96otWvXauzYserQoYN+++03vfjii/rf//7nMKBY3X333Zo+fbo++eQTjR8/3rY9Ly9Pn332mYYNGyZ/f/8K5xUZGakXX3xRkiVoz507V9dff70OHTpUYXV5+fLlGjRokC688EJNmzZN2dnZevnll9WzZ09t3rzZFo5OnDihN998U8HBwXrkkUfUpEkTffjhh7rlllu0YMECjRgxQsHBwbr55pv1ySef6IUXXpDZbLad5z//+Y8Mw9Cdd95Z4esobePGjfrpp580fPhwNWvWTAcOHNDrr7+uPn36aOfOneVePrNv3z716dNHgYGBmjx5sgIDA/Xvf/9b/fv3V2Jionr16lWleZSnOn8fVnPmzNGxY8eqfe7KPv+WW25RmzZtbI8nTpyoDh06aOzYsbZtHTp0qNLrOXLkiK644gqdPn1aY8eOVfv27XX48GF99tlnysrKUq9evfTBBx/Yjm+tYP/f//2fbdtVV10lqfLvQSvrcdPS0vTaa6/ptttu0/bt29WuXTtJxZ1Xl19+uWbOnKljx45p7ty5+vHHH8v9t8Vq6tSpFX7QVlp1/+4qcuLECUmWf7fbtm2rZ555Rjk5OXr11VfVs2dPbdy4URdddJEkaceOHbrmmmsUGhqqxx9/XD4+PnrjjTfUp08frV69Wj169LA79vjx4xUeHq5p06Zpz549ev3113Xw4EHbBxCOPP3003r77bf1ySef2H3gOX/+fAUHB2vSpEkKDg7W999/r6lTpyo9PV2zZ8+WZHlfzZgxQ5MnT9att96qG2+8UZmZmbrnnnvUvn17TZ8+vVq/IwB1mAEADcy7775rSDKWL19upKamGocOHTI+/vhjo3HjxkZAQIDxxx9/GIZhGDk5OUZhYaHdc5OSkgw/Pz9j+vTptm3vvPOOIcl44YUXypyrqKjI9jxJxuzZs8uMufjii43evXvbHq9cudKQZFxwwQVGenq6bfunn35qSDLmzp1rO3bbtm2NhIQE23kMwzCysrKMuLg447rrritzrquuusro1KmT7XFqaqohyXj66adt2w4cOGCYzWbjH//4h91zf/vtN8Pb27vM9r179xqSjPfee8+27emnnzZK/k/MDz/8YEgyFixYYPfcpUuXltnesmVLY/DgwWXmPm7cOKP0/2yVnvvjjz9uREVFGd27d7f7nX7wwQeGl5eX8cMPP9g9f968eYYk48cffyxzvpLi4+ONHj162G1btGiRIclYuXJlhc8dNWqU0bJlS7ttb775piHJ+Pnnnyt87iWXXGJERUUZJ06csG379ddfDS8vL2PkyJG2bZIMScaqVats27KysowOHToYMTExRl5enmEYhvHdd98Zkoz//ve/dufp0qWL3e9r9OjRRosWLcrMp/TvOysrq8yYdevWGZKM999/37bN+p62/q6GDRtmmM1mY/v27bYxaWlpRuPGjY3u3bvbtln/Vjdu3Gjb5ug9axiGMXjwYLvfc1X+Pkq/X48fP26EhIQYgwYNqtR/45o+v6SWLVsao0a
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hA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fuGFF3TPPffokUce0bFjx/T222+rc+fO2rx5swIDA/M9Z+jQobrhhhskSV9//bUWLlxo8/ijjz5qHXXx5JNPKjExUdOnT9fmzZv166+/ysPDo8D3oSROnz5tfW255eTk6LbbbtOaNWs0dOhQtWjRQlu3btVbb72lP//802Zhsbw6d+6sTz75xGbb33//reeff14hISGXral58+b697//LcMwtG/fPr355pvq1atXgWEhN8t7dfXVV2vSpElKTk7W1KlT9euvv1r/DSxB+7XXXlNYWJjGjBkjb29v/e9//1NMTIyWLVumzp07q1GjRurUqZPmzp2rUaNG2Rxn7ty5qlGjhm6//fbLvpbcli1bpr/++kuDBg1SWFiYtm/frvfee0/bt2/XunXrCg1pv/zyi3r16qUGDRpowoQJysrK0jvvvKNOnTrp999/15VXXlmiOgrzySefaMCAAYqNjdVrr72mc+fOaebMmbr++uu1efPmIudnjx8/Pl/wKoniPv/RRx9VTEyM9f6DDz6oPn36qG/fvtZttWvXLtHr2bJli2644QZ5eHho6NChatiwofbt26fvv/9er7zyivr27asmTZpY9z9q1Ci1aNFCQ4cOtW5r0aKFpOJ9Bi2Cg4OtPy4dOnRIU6dOVa9evXTw4EFru4kTJ+rFF19UTEyMhg0bpt27d2vmzJn6/fffL/sdMHbs2Mu+n7mV9u+uKJa/txEjRigqKkqvvvqqjh07pmnTpmnNmjXavHmzgoODJUnLly9Xz5491ahRI02cOFHnz5/X22+/rU6dOmnTpk35Pn/33HOPGjZsqEmTJmndunWaNm2aTp06pY8//rjQeh555BGtXLlSy5YtU8uWLa3bZ86cqVatWum2225TtWrV9P333+vxxx9XTk6Ohg8fLsn8Y/fjjz+uSZMm6Y477lD79u115MgRPfHEE4qJidFjjz1W6vcJQCVlAIALmj17tiHJWL58uXHs2DHj4MGDxueff27UqlXL8PHxMQ4dOmQYhmGkp6cb2dnZNs9NTEw0vLy8jJdeesm67cMPPzQkGW+++Wa+Y+Xk5FifJ8l4/fXX87Vp1aqVceONN1rv//zzz4Yk44orrjBSU1Ot2xcsWGBIMqZOnWrdd9OmTY3Y2FjrcQzDMM6dO2dEREQY3bp1y3es6667zmjdurX1/rFjxwxJxoQJE6zb9u/fb7i7uxuvvPKKzXO3bt1qVKtWLd/2PXv2GJKMjz76yLptwoQJRu7/m/nll18MScbcuXNtnrtkyZJ82xs0aGD07t07X+3Dhw838v5fV97an332WSMkJMSIioqyeU8/+eQTw83Nzfjll19snj9r1ixDkvHrr7/mO15hzp8/b0RFRRl16tQxjhw5UmTbG2+80aYOwzCMf/3rX4Yk4+jRo4U+LzMz0wgJCTFat25tnD9/3rr9hx9+MCQZ48ePNwzj0ufK09PT+PPPP63tjh07ZtSqVcuIioqybnv33XcNScbOnTttjhMcHGwMGDDAuu2mm24yOnfubFOP5TizZ8+2bjt37ly+uj/77DNDkrF69WrrNsvfW2JiomEYhhEVFWUEBAQYSUlJ1jZ//vmn4eHhYdx5553WbZbP0LFjx6zbfv/993x1GEb+v6EzZ84YgYGBxpAhQ2zaJSUlGQEBATbbBwwYYDRo0MB6f9u2bYabm5vRs2dPm7oLU9b
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACFZ0lEQVR4nOzdeXwN9/7H8fdJIptIIkSWCmLftxRNtboIQbS1tOhqVxptSVvq3hbVRasbt5SrG7dolZa2KCKKqqANWhRX22goicSSSJB1fn+cm/NzJIhsJzlez8djHpnlO/P9zGRy+Jz5fr9jMgzDEAAAAAAAsFsOtg4AAAAAAACULZJ/AAAAAADsHMk/AAAAAAB2juQfAAAAAAA7R/IPAAAAAICdI/kHAAAAAMDOkfwDAAAAAGDnSP4BAAAAALBzTrYOAAAA2K+srCydPn1aeXl5Cgw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Zx8eJFIzc312rf+Ph4w8XFxZg2bZpl3ccff2xIMt55550CdeXl5Vn2k2S8+eabBcq0aNHCuOOOOyzL33//vSHJuOmmm4y0tDTL+i+++MKQZMyaNcty7EaNGhnh4eGWegzDMM6fP28EBwcb3bp1K1DXrbfearRs2dKynJycbEgypkyZYll35MgRw9HR0Xj11Vet9t27d6/h5ORUYP3hw4cNScbChQst66ZMmWJc+tH+ww8/GJKMxYsXW+27du3aAuvr1q1
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB80klEQVR4nOzde3yP9f/H8edn5/NmttkwzPnMzxxCIcYcSk7JoRwiJZIU8q0cUolOhOhIBxKFinI+JYdqyCGEaMQwzGzsfP3++LRP+9gcNts+8/G4327XbZ/Pdb2v63pdH9c+9rwO78tkGIYhAAAAAABgtxxsXQAAAAAAAChYhH8AAAAAAOwc4R8AAAAAADtH+AcAAAAAwM4R/gEAAAAAsHOEfwAAAAAA7BzhHwAAAAAAO0f4BwAAAADAzhH+AQBAgUhMTNTx48d14cIFW5cC2L24uDgdPnxYaWlpti4FQBFF+AcAoADMnTtXJpNJx44du63XkVuLFi1Sq1at5O3tLS8vL5UpU0ZTpkyxdVm3hYSEBE2dOtXyPi4uTjNnzrRdQdCJEyc0d+5cy/tjx45p3rx5tisoi9TUVE2ZMkV16tSRq6urihUrpkqVKmnt2rW2Lg1AEUX4B1DoMgNL5uDm5qbKlStr6NChOn36tK3Lg527fPmyxo8frw0bNuR63mPHjslkMunNN9/M/8LswPPPP6/u3bvL29tbH374oVavXq01a9boySeftHVptwV3d3e9+OKLmjdvno4fP67x48fr+++/t3VZdz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KEuXbpo3rx56tmzp7y8vNS5c2d99dVXevvtt+Xo6GhZz5dffinDMNS7d+9cbdevv/6qLVu2qEePHipdurSOHTumWbNmqUWLFvrjjz+ueQvR4cOH1aJFC3l4eGjkyJHy8PDQhx9+qIiICK1evVrNmjXLVR3XkpfviExvvfXWLfWDcrPzd+nSRRUrVrS8f+aZZ1StWjUNGjTIMq5atWq52p6TJ0+qYcOGiouL06BBg1S1alX9888/+vrrr3X58mU1a9ZMn3/+uWX5r776qiTphRdesIxr0qSJpJvfBzNlLjc2NlbvvfeeHnzwQe3du1dVqlSRJMv3YIMGDTRp0iSdPn1a06ZN088//3zN79dMY8eOVVJS0g0/00x5/b27nsyDgGPGjFGlSpU0YcIEJSUlaebMmWratKl+/fVXVa5cWZL5wOQ999wjHx8fjRo1Ss7Oznr//ffVokULbdy4UY0aNbJa9tChQ+Xn56fx48fr4MGDmjVrlv7++2/LAYicjBs3Th9//LG++uorqwOwc+fOlZeXl0aMGCEvLy+tW7dOY8eOVXx8vN544w1J5v1q4sSJGjlypLp166aOHTsqMTFR/fr1U9WqVfXyyy/n6TMCcA0GABSyOXPmGJKMNWvWGGfPnjWOHz9uLFiwwChevLjh7u5unDhxwjAMw0hKSjLS09Ot5j169Kjh6upqvPzyy5Zxn3zyiSHJePvtt7OtKyMjwzKfJOONN97I1qZGjRpG8+bNLe/Xr19vSDJKlSplxMfHW8YvXLjQkGRMmzbNsuxKlSoZkZGRlvUYhmFcvnzZCAsLM1q3bp1tXU2aNDFq1qxpeX/27FlDkjFu3DjLuGPHjhmOjo7Gq6++ajXvnj17DCcnp2zjDx06ZEgyPv30U8u4cePGGVm/4n/66SdDkjFv3jyreVesWJFtfNmyZY0OHTpkq33IkCHG1f9tXF37qFGjjKCgICM8PNzqM/38888NBwcH46effrKaf/bs2YYk4+eff862vkxpaWlGWFiYUbZsWePChQtW07J+7s2bN7daZ6a+ffs
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACAi0lEQVR4nOzde3zO9f/H8ee183kzswOGOZ/JRKOQxpwSKiXlkChN39BRB6d+pVRCREc6UKjoQOSQUkiGnCVNI8aGbYydP78/rna1y4Zttl1z7XG/3T63Xdfnen8+n9fn2ue6tufn8P6YDMMwBAAAAAAA7JaDrQsAAAAAAACli/APAAAAAICdI/wDAAAAAGDnCP8AAAAAANg5wj8AAAAAAHaO8A8AAAAAgJ0j/AMAAAAAYOcI/wAAAAAA2DnCPwAAKLfOnj2rw4cPKzU11dalAHbNMAydPn1aBw8etHUpAEoJ4R8AgHJm/fr1MplMWr9+va1LKXOGYeidd97RDTfcIA8PD/n4+CgsLEyffPKJrUu7Jhw9elTz58+3PD98+LAWLFhgu4Kg3bt3a9myZZbnO3bs0PLly21XUB5nz57Vc889pwYNGsjFxUWVK1dW/fr1deDAAVuXBqAUEP4BFMn8+fNlMpksg5ubm+rXr69Ro0bpxIkTti4Pdu78+fOaOHFisULx4cOHrbZdR0dH1ahRQ3379tWOHTtKvFYUzz333KOHHnpIjRo10scff6zVq1drzZo16tevn61LuyaYTCZFR0dr1apVOnz4sJ588klt2LDB1mVVaGfPntWDDz6ozZs36+DBg3r00Ue1a9cuW5elU6dOKSIiQjNnztQdd9yhr776SqtXr9b69etVq1YtW5cHoBQ42boAANemyZMnKywsTGlpafr55581Z84crVixQrt375aHh4ety4OdOn/+vCZNmiRJ6tSpU7HmMWDAAPXo0UPZ2dnat2+f5syZo++++06bN29Wy5YtS67Yq9ChQwdduHBBLi4uti6lTH300UdatGiRPvnkE91zzz22LueaVK1aNQ0fPlzdunWTJIWEhFTIM0jKk4iICMsgSfXr19fw4cNtXJX0xBNP6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/pi6cvzPpI0v79+9W/f39VqVJF7u7uatCggZ599llJ/72vlxvyfoautA0WtB6VKlXKtw3meuutt9SkSRO5urqqatWqio6OVlJSklWbvNtg48aNFR4ert9//73A7/mCFPZzZzKZNGrUqEvO5+Jt97ffflNOTo4yMjLUunVrubm5qXLlyhowYIDi4uLyTb9u3TrL78vPz0+33Xab9u3bZ9Um9/eR+zvz8fFR5cqV9eijjyotLS1fvXm/u7OystSjRw/5+/tr7969lvHz5s1T586dFRgYKFdXVzVu3Fhz5szJV5uDg4PGjx9vNX7hwoUymUz52gMVGUf+AZSI3KBeuXJlSeZ/0JctW6Y777xTYWFhOnHihN5++2117NhRe/fuVdWqVSVJ2dnZ6tWrl9auXau7775bjz76qM6ePavVq1dr9+7dqlOnjmUZuadr5zVu3LgC63nxxRdlMpn01FNP6eTJk5o+fboiIyO1Y8cOubu7SzL/w9C9e3eFh4drwoQJcnBwsPyjsWHDBrVp0ybffKtXr64pU6ZIks6dO6eRI0cWuOznn39e/fv31wMPPKCEhAS9+eab6tChg7Zv3y4/P79804wYMUI33XSTJOnLL7/U0qVLrV5/8MEHNX/+fA0dOlT/+9//FBsbq1mzZmn79u365Zdf5OzsXOD7UBRJSUmWdcsrJydHvXv31s8//6wRI0aoUaNG2rVrl9544w398ccfVh1ZFWT16tXq1auXQkJC9Oijjyo4OFj79u3Tt99+q0cffbTQ9VWpUkVz5szRyJEj1bdvX8s14M2bNy/Sel7s4m0318MPP6wqVapo/Pjxlp7mP/74Yw0ePFhRUVF65ZVXdP78ec2ZM0c33nijtm/fbhWcsrOz1b17d3Xo0EFTp07VggULNGrUKHl6eurZZ5/VwIED1a9fP82dO1eDBg1SRESEwsLCrmpd8poyZYrc3d319NNP688//9Sbb74pZ2dnOTg46MyZM5o4caI2b96s+fPnKywsLN8/zgVp2LChnn32WRmGoUOHDmnatGnq0aNHgWEhr9xt9/rrr9eUKVN04sQJzZgxQ7/88ovlM5EbtF955RUFBwfriSeekJubm959911FRkZq9erV6tChg2rXrq327dtrwYIFGjNmjNVyFixYIG9vb912221Feq9Wr16tv/76S0OHDlVwcLD27Nmjd955R3v27NHmzZsvGdI2bNigHj16qGbNmpowYYIyMzP11ltvqX379vrtt99Uv379ItVxKUXZ7i42fvz4fMGrKAo7/YMPPqjIyEjL8/vuu8/qcyrJsvOusOuzc+dO3XTTTXJ2dtaIESNUq1YtHTp0SN98841efPFF9evXT3Xr1rXMf8yYMWrUqJFGjBhhGdeoUSNJhdsGcwUEBFh2Lh09elQzZsxQjx49dOTIEUu7iRMnatKkSYqMjNTIkSN14MABzZkzR7/99tsVv5OfeuqpK76feRX3c3c5uZ+3UaNGKTw8XC+//LISEhI0c+ZM/fzzz9q+fbsCAgIkSWvWrFH37t1Vu3ZtTZw4URcuXNCbb76p9u3ba9u2bfm2v/79+6tWrVqaMmWKNm/erJkzZ+rMmTP66KOPLlnPAw88oPXr12v16tVq3LixZfycOXPUpEkT9e7dW05OTvrmm2/08MMPKycnR9HR0ZLMO3AffvhhTZkyRX369FGrVq10/PhxPfLII4qMjNRDDz1U7PcJsDsGABTBvHnzDEnGmjVrjISEBOPIkSPGZ599ZlSuXNlwd3c3jh49ahiGYaSlpRnZ2dlW08bGxhqurq7G5MmTLeM++OADQ5Ixbdq0fMvKycmxTCfJePXVV/O1adKkidGxY0fL8x9
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACIb0lEQVR4nOzdfXxP9f/H8edns302Y5thVxnm+ppMNErUmIuUkIsuXOQqXxKrSOWyvhQRRSSFvshFRUWR6y6MMhTCT5kohsUujF2f3x+f9snHZraZfebjcb/dzm2fc877nPM6Z+dz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rUrW42Ugiro9SI9PV0vv/xygbebn+VnzpxpTdoOHTqkyZMn66WXXrI+5S5VqlS+92fRokV66qmnVLduXY0ZM0be3t7au3ev1q9fr8cee0wvv/yyBgwYIMly42TkyJE2194r5fX7JEn33nuvBg0apMzMTB04cEAzZ87UqVOnrDfLDMPQQw89pK1bt6p///5q1KiRNmzYoBdeeEF//fWX3nrrrWsep2tdl3NT0O9dbv7++28dO3ZML730krp06aLnnntOu3fv1rRp03TgwAGtW7fOevMkr9cYSbpw4YI6dOig7t27q1evXlq5cqWGDBkiV1dXPfXUUznGEh8fr/bt28vFxUVfffWV9VxJSEjQggUL1KtXLw0cOFCJiYn64IMPFB4erh9//FGNGjWSJL3yyiv68ssv1b9/f+3fv1+lS5fWhg0b9P777+vVV1+95o1bwKE
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB/JklEQVR4nOzdeXwN9/7H8ffJnpAFkUUFse9bqIYWJcRSreqCqq1aS2lLuqguti5aWqWlXF3o75ZrK26LUnurQtuQ2tUSVSWILUT2zO+P05zrSJDESU4cr+fjMQ/nzHxn5jPHzOF9ZuY7JsMwDAEAAAAAAIflZO8CAAAAAABA4SL8AwAAAADg4Aj/AAAAAAA4OMI/AAAAAAAOjvAPAAAAAICDI/wDAAAAAODgCP8AAAAAADg4wj8AAAAAAA6O8A8AAArkwoULOnTokDIyMuxdCuDQsrKylJCQoCNHjti7FAC3McI/AAD/mDNnjkwmk44ePWrvUoql9PR0TZw4UQ0aNJC7u7tKlSqlatWqad26dfYu7bawe/duLVu2zPI+NjZWK1assF9B0ObNm7Vx40bL+40bN+rnn3+2X0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5SVfX1898MADltAkSRs2bJDJZNLSpUtzrGPevHkymUyKjo621NyvXz+rNtnH19X3YP/000967LHHVKFCBcu+MWLECCUnJ1vNO3bs2Bz74Ny5c9WwYUN5eHioTJky6tmzZ47PpF+/fipZsqTVuMWLF+eoQ5JKliyZo2Ypb8dj69atLft97dq1FRYWpt9//z3X4zE3V8+f7ddff83T/Nf7brne90Fev19udNz169fvpuu8um+NvB5jV8/v7++vzp07W+2DkvnHqrfeektVqlSRu7u7KlWqpNdeey3H90n2Pujs7KwGDRqoQYMGWrJkiUwmkypVqnTDzzR7/psdd9nfwR988MF1l3Ptvrt161Z5eHjo8OHDls8kKChIgwYN0rlz53LMv2jRIsvfl7+/v5588kn9/fffVm2y9/MjR44oMjJSJUqUULly5TR+/HgZhpGj3jlz5ljGXbp0SWFhYQoNDdXJkyct4z/44AM1b95cZcqUkaenp8LCwrR48WKr9c6ePVsmk0lffvml1fh3331XJpNJK1euvO7nAsD2OPMP4LaQHdTLlCkjSTpy5IiWLVumxx57TKGhoTp16pT+9a9/qVWrVtq7d6/KlSsnScrMzNQDDzygdevWqUePHnrhhRd06dIlrVmzRrt371aVKlUs6+jZs6c6depktd5Ro0blWs8777wjk8mkkSNH6vTp05oyZYoiIiIUGxsrT09PSeaw2bFjR4WFhWnMmDFycnLS7Nmz1aZNG/3000+6++67cyy3fPnymjBhgiTp8uXLGjJkSK7rfvPNN/X444/r6aef1pkzZ/TJJ5+oZcuW2rFjh/z8/HLMM3DgQN13332SpCVLluQIZ4MGDdKcOXPUv39/Pf/884qLi9O0adO0Y8cO/fzzz3J1dc31c8iPCxcuWLbtallZWXrwwQe1efNmDRw4ULVq1dKuXbv00Ucf6Y8//rDqIC03a9as0QMPPKDg4GC98MILCgoK0r59+7R8+XK98MILkqS1a9eqY8eOqly5ssaOHavk5GR98sknatGihbZv337D/+iPHTtW48aNU0REhIYMGaIDBw5oxowZ+vXXX3N8NmfPnlXHjh3Vo0cPPfnkkwoMDMzXZ3Tx4kUlJCR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OH36tOHm5ma0b9/ean+bNm2aIcn48ssvLeNatWplSDJmzpx53XqvJ3u9uQ3u7u43nb9ixYpG3759rcY98cQThpeX1w3ny+v2Ze/3/v7+RkJCgqXdH3/8Ybi
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB+zUlEQVR4nOzde3yP9f/H8edn59nRzGwY5nwmEy2FGHOIUIkkp1BRoVK+FdJBqUQRP510oByKDjQxhw5GGXKWmEY2zGGbYcfr98enffKxYZttn+3jcb/drts+n+t6X9f1uj67Pp/t+bne13WZDMMwBAAAAAAA7JaDrQsAAAAAAADFi/APAAAAAICdI/wDAAAAAGDnCP8AAAAAANg5wj8AAAAAAHaO8A8AAAAAgJ0j/AMAAAAAYOcI/wAAAAAA2DnCPwAAKJSUlBQdPnxYqampti4FsGuGYej06dM6cOCArUsBUIYR/gEAuMT8+fNlMpl0+PBhW5dS6hiGoXnz5umWW25RuXLl5O3trZCQEH3++ee2Lq1MOHr0qObPn295fvjwYS1YsMB2BUG7du3S8uXLLc+3b9+uFStW2K6gS6SkpOj5559XvXr15OLiogoVKqhu3brav3+/rUsDUEYR/gGUOjnhK2dwc3NT3bp1NXr0aB0/ftzW5QHF4vL9/tLh2WeftXV5kqT7779fDz/8sBo0aKDPPvtMq1ev1po1a9SnTx9bl1YmmEwmjRo1SqtWrdLhw4c1fvx4/fzzz7Yu64aWkpKikSNHatOmTTpw4ICeeOIJ7dy509Zl6dSpUwoLC9M777yje+65R998841Wr16t9evXq0aNGrYuD0AZ5WTrAgDgSqZMmaKQkBBdvHhRv/zyi+bMmaOVK1dq165dKleunK3LA4pFzn5/qcaNG9uomv98+umnWrRokT7//HPdf//9ti6nTKpSpYqGDx+uLl26SJKCgoK0fv162xZ1gwsLC7MMklS3bl0NHz7cxlVJTz/9tOLj4xUdHa1GjRrZuhwAdoLwD6DU6tq1q1q2bClJeuihh1ShQgVNnz5d33zzjfr372/j6oD8OX/+fIG+rLp0vy9N3njjDfXv35/gf51mzJihxx57TImJiWrcuLE8PDxsXdINb/ny5dqzZ48uXLigJk2ayMXFxab1nDhxQp988onmzp1L8AdQpOj2D6DM6NChgyQpNjZWknT69Gk99dRTatKkiTw9PeXt7a2uXbvqjz/+yDXvxYsXNXnyZNWtW1dubm4KCgpSnz59dPDgQUnmc2+v1OXaZDKpffv2lmWtX79eJpNJixYt0v/+9z8FBgbKw8NDPXv21JEjR3Kte/PmzerSpYt8fHxUrlw5tWvXTr/++mue29i+ffs81z958uRcbT///HOFhobK3d1dfn5+6tevX57rv9q2XSo7O1szZsxQo0aN5ObmpkqVKmnkyJE6c+aMVbsaNWrozjvvzLWe0aNH51pmXrW/8cYbuV5TSUpLS9OkSZNUu3Ztubq6Kjg4WOPHj1daWlqer9XlNm/erG7duql8+fLy8PBQ06ZNNXPmTKs2a9eu1e233y4PDw/5+vrqrrvu0t69e/O1/Pfee0+NGjWSq6urKleurFGjRuns2bNWbdq3b6/GjRsrJiZGbdu2Vbly5fS///0vX8u/HpfvN/7+/urevbt27dqVr/mXLFli2Zf8/f31wAMP6J9//rFMT01N1a5duxQcHKzu3bvL29tbHh4eat++vVW39UOHDslkMuntt9/OtY6NGzfKZDLpiy++sNR8+T6Qs69eel78jh07NHjwYNWsWVNubm4KDAzU0KFDderUKat587pWw6pVq3TrrbeqXLly8vHx0Z133pnrNZk8ebJMJpMSExMt47Zs2ZKrDsncA+PymiXphx9+sOxXXl5e6t69u3bv3m3VZvDgwZbu2rVq1VLr1q11+vRpubu75+saE5fOn+PIkSP5mn/w4MFX/Xy7fP78bI8k7du3T3379lXFihXl7u6uevXq6bnnnpP03+t6teHSXg/X2gfz2o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cqfDwcMvzgQMHqnfv3lbXaqhYsWKBtmfHjh26/fbb5ezsrBEjRqhGjRo6ePCgvvvuO73yyivq06ePateubVn+2LFj1aBBA40YMcIyrkGDBpLytw/m8Pf3t3y5dPToUc2cOVPdunXTkSNHLO0K8n693DPPPHPN1/NShX3fXU3O+2306NEKDQ3Va6+9ppMnT+qdd97RL7/8om3btlk+Ewr6uda3b1/VqFFDU6dO1aZNm/TOO+/ozJkz+vTTT69Yz0MPPaT169dr9erVatiwoWX8nDlz1KhRI/Xs2VNOTk767rvv9Oijjyo7O1ujRo2SZP7S/tFHH9XUqVPVq1cvtWjRQvHx8XrssccUHh6uhx9+uNCvE4BCMACglPn4448NScaaNWuMkydPGkeOHDG+/PJLo0KFCoa7u7tx9OhRwzAM4+LFi0ZWVpbVvLGxsYarq6sxZcoUy7iPPvrIkGRMnz4917qys7Mt80ky3njjjVxtGjVqZLRr187yfN26dYYko0qVKkZycrJl/OLFiw1JxsyZMy3LrlOnjhEREWFZj2EYxvnz542QkBCjU6dOudZ16623Go0bN7Y8P3nypCHJmDRpkmXc4cOHDUdHR+OVV16xmnfnzp2Gk5NTrvEHDhwwJBmffPKJZdykSZOMS/8E/Pzzz4YkY8GCBVbzRkZG5hpfvXp1o3v37rlqHzVqlHH5n5XLax8/frwREBBghIaGWr2mn332meHg4GD8/PPPVvPPnTvXkGT8+uuvudaXIzMz0wgJCTGqV69unDlzxmrapa978+bNjYCAAOPUqVOWcX/88Yfh4OBgPPjgg5ZxOftfbGysYRiGceLECcPFxcXo3Lmz1f42a9YsQ5Lx0UcfWca1a9fOkGTMnTv3ivVeSc568xqupV27dlavp2EYxv/+9z9DknHixIkrzpe
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR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Pn0/wL4a7775bR48e1f79+xUcHKwqVarYuqSb3iOPPKJ27drpjz/+UO3atVWxYkVbl6Q33nhDd9xxB8EfQImx/X8SAHAF99xzjyTzadGS+ejjs88+q8aNG8vT01Pe3t7q3Lmzfv311wLzZmRkaOLEiapTp47c3NwUGBioBx98UH/++ack6ciRI1aXGlw8tG3b1rKsjRs3ymQyacmSJXrhhRcUEBCgcuXK6b777tOxY8cKrHv79u3q1KmTfHx85OHhobvvvls//vhjodvYtm3bQtc/ceLEAm0XLlyo0NBQubu7y9fXV7169Sp0/Zfbtgvl5eVpxowZatiwodzc3OTv768nnnhCZ8+etWpXvXp13XvvvQXWM2LEiALLLKz2adOmFXhNJSkzM1MTJkxQrVq15OrqquDgYI0ZM0aZmZmFvlYX2759u7p06aJbbrlF5cqVU5MmTTRz5kyrNhs2bNBdd92lcuXKqXz58rr//vu1f//+q1r+u+++q4YNG8rV1VVBQUGKjIy0ul5bMv/+GjVqpJiYGLVp00YeHh564YUXrmr5U6dOVVpamj7++OMCwV+SnJycNHLkSAUHB192ORdfNuPh4aHGjRvrgw8+uKo6Dh8+rIcffli+vr7y8PDQ7bffrpUrV1q12bZtm5o1a6ZXX31VwcHBcnV1Ve3atfXaa69ZrpeWzOG2adOmha6nbt26ioiIsKr54n4W2rZta7WfZGVlafz48QoNDZWPj4/KlSunu+66S999912B5V+878XHx+vxxx9XxYoV5erqqkaNGun999+3mif/vfLGG29YjW/UqFGB/fWNN94otOa///5bAwcOlL+/v1xdXdWwYUN99NFHVm3yP0M2btyo8uXLKywsTFWqVFHXrl0v+X6/1PwXupr58+e93HDh/FezPdLlP2Ov9PlqMpnUv39/y7KuZh+8eDtcXV1Vp04dTZkyRYZhWLXduXOnOnfuLG9vb3l6eqp9+/batm2bVZsL98FKlSrpjjvuUIUKFdSkSROZTCbNnz//sr+Tq33f9e/fX56enpdd1sW/g23btqlRo0bq1auXfH195e7urpYtW2r58uUF5j158qQGDRokf39/ubm5qWnTpgUuXbhwP3/rrbdUrVo1ubu76+6779bevXsL1Fu9enWrcQsXLpSDg4Nee+01y7jdu3erf//+qlGjhtzc3BQQEKCBAwfq9OnTljbp6emqV6+e6tWrp/T0dMv4M2fOKDAwUHfccYdyc3Mv+9oAKBkc+QdQ5uUH9QoVKkgy/4O4fPlyPfzwwwoJCVFCQoLee+893X333frtt98sPY7n5ubq3nvvVXR0tHr16qWnn35a586d07p167R3717VrFnTso7evXurS5cuVusdN25cofW88sorMplMGjt2rE6ePKkZM2YoPDxcu3btsly3u2HDBnXu3FmhoaGaMGGCHBwc9PHHH+uee+7R999/r9tuu63AcqtUqWLpZCo1NVXDhw8vdN0vvfSSevbsqcGDB+vUqVN655131KZNG+3cuVPly5cvMM/QoUN11113SZK+/PJLLVu2zGr6E088ofnz52vAgAEaOXKkYmNjNWvWLO3cuVM//vijnJ2dC30drkVSUlKhHWjl5eXpvvvu0w8//KChQ4eqfv362rNnj9566y39/vvvhf6Te6F169bp3nvvVWBgoJ5++mkFBARo//79WrFihZ5++mlJ0vr169W5c2fVqFFDEydOVHp6ut555x21bt1aO3bsKPAP7oUmTpyoSZMmKTw8XMOHD9fBgwc1Z84c/fzzzwVem9OnT6tz587q1auXHn30Ufn7+1/Va7NixQrVqlVLrVq1uqr2V/LWW2/Jz89PKSkp+uijjzRkyBBVr15d4eHhl5wnISFBd9xxh86fP6+RI0eqQoUKWrBgge677z59/vnneuCBByzb+MMPP+iHH37QwIEDFRoaqujoaI0bN05HjhzR3LlzJUmPPfaYhgwZor1796pRo0aW9fz888/6/fff9eKLL17TNqWkpOiDDz5Q7969NWTIEJ07d04ffvihIiIi9NNPP6lZs2aFzpeVlaXw8HAdOHBAw4cPV926dbV8+XINHTpUp0+fLrEjqgkJCbr99ttlMpk0YsQIVaxYUd9++60GDRqklJQUjRo16pLzbt68WatWrSryuq92/vr16+uTTz6xPJ83b57279+vt956yzKuSZMm17Q9V/qMDQ8Pt1pn/ufPhePyP4evdh/M98ILL6h+/fpKT0+3fCFbqVIlDRo0SJK0b98+3XXXXfL29taYMWPk7Oys9957T23bttWmTZsu+3775JNPtGfPniu+phcqyvvuSk6fPq158+bJ09NTI0eOVMWKFbVw4UI9+OCDWrRokeVMuPT0dLVt21Z//PGHRowYoZCQEC1dulT9+/dXUlKS5bMw33//+1+dO3dOkZGRysjI0MyZM3XPPfdoz549l/zcWrt2rQYOHKgRI0ZYvW/WrVunw4cPa8CAAQoICNC+ffs0b9487du3T9u2bZPJZJK7u7sWLFig1q1b6z//+Y/efPNNSVJkZKSSk5M1f/58OTo6Fvl1AnANDAAoIz7++GNDkrF+/Xrj1KlTxrFjx4xPP/3UqFChguHu7m789ddfhmEYRkZGhpGbm2s1b2xsrOHq6mpMnjzZMu6jjz4yJBlvvvlmgXXl5eVZ5pNkTJs2rUCbhg0bGnfffbfl+XfffWdIMipXrmykpKRYxn/22WeGJGPmzJmWZdeuXduIiIiwrMcwDOP8+fNGSEiI0aFDhwLruuOOO4xGjRpZnp86dcqQZEyYMMEy7siRI4ajo6PxyiuvWM27Z88ew8nJqcD4Q4cOGZKMBQsWWMZNmDD
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB/K0lEQVR4nOzdeXwN9/7H8ffJvsiCJBIEse9blKZatA2xlKpuVFtUUaUtaVG/26Lt7dVqayvldtWFli50oZTYqqIIqV0t0VBCYktEZJ3fH6c515EgiSQnTl7Px2MeOWfmOzOfOZkT3rN8x2QYhiEAAAAAAGC3HGxdAAAAAAAAKFmEfwAAAAAA7BzhHwAAAAAAO0f4BwAAAADAzhH+AQAAAACwc4R/AAAAAADsHOEfAAAAAAA7R/gHAAAAAMDOEf4BA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r78akoz58+dbzbt8+fI842vWrGn06NEjT+0jRowwrvzn5Mrax44dawQEBBihoaFWn+nnn39uODg4GL/++qvV/HPnzjUkGb/99lue9eXKysoyQkJCjJo1axpnz561mnb5596yZUsjICDAOH36tGXcH3/8YTg4OBiPP/64ZVzu/hcXF2cYhmGcOnXKcHFxMbp06WK1v82aNcuQZHz88ceWcR07djQkGXPnzr1qvVeTu95rDU2aNLnucjp27Gj12RqGYfzf//2fIck4derUVefLyMgwAgICjKZNmxp
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACCn0lEQVR4nOzdeVwV9f7H8fdhO2wCIbKYqLjvmrhEmmaiqLSYlpkt7qZhpdzS7JaaLZZlammZbXqvVmql3dQsxaVFXELNJfVaYWgKigoICgjM749zOT+PoCnbwePr+XjMg3NmvjPzmWE4+j4z8x2TYRiGAAAAAACAw3KydwEAAAAAAKB8Ef4BAAAAAHBwhH8AAAAAABwc4R8AAAAAAAdH+AcAAAAAwMER/gEAAAAAcHCEfwAAAAAAHBzhHwAAAAAAB+di7wIAAMC1Izc3V6dOnVJBQYGqV69u73IAh5aVlaVTp07J29tbN9xwg73LAXCN48w/AADFmD9/vkwmkw4dOmTvUuzu559/1oABAxQQECCz2ayQkBD17dvX3mVdM2bPnq20tDTr+5kzZyorK8t+BUGvvPKKCgoKJEkFBQWaOnWqnSv6f0uXLlXXrl1VpUoVeXt7q2bNmpo2bZq9ywLgAAj/ACqtwvBVOLi7u6tBgwYaPXq0UlJS7F0eUC4Kj/uff/7Z3qVIkr766it17NhRv/76q15++WWtWbNGa9as0XvvvWfv0q4ZX3/9tSZPnqzD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JkiMLDwxUXF6cJEybo0KFDmjt3riTp4Ycf1vDhw7Vnzx41a9bMup5t27bpv//9r5577rmr2qaMjAx98MEHeuCBBzR8+HCdOXNGH374oaKiorR161a1atWq2Plyc3MVGRmp/fv3a9SoUWrYsKGWL1+uESNG6OTJk2V2RjUlJUU333yzTCaTRo8erWrVqumbb77R0KFDlZGRoTFjxlxy3u+//16rVq0q8bqvdP7GjRvr3//+t/X9vHnztG/fPs2YMcM6rkWLFle1PX/3GRoZGWmzzsLPlwvHFX7OXukxWOjZZ59V48aNde7cOesXroGBgRo6dKgkae/evbr11lvl4+OjcePGydXVVe+9955uu+02bdy4Ue3bt7/kvvr3v/+t3bt3/+0+vVBJ/u7+zsmTJzVv3jx5e3vriSeeULVq1bRw4UL16dNHixYtsl7pdu7cOd1222367bffNHr0aIWFhWnp0qUaNGiQ0tLSrJ91hf71r3/pzJkziomJUXZ2tmbNmqXbb79du3fvvuTn0nfffachQ4Zo9OjRNn83a9as0R9//KHBgwcrODhYe/fu1bx587R3715t3rxZJpNJHh4eWrBggTp06KB//vOfevPNNyVJMTExSk9P1/z58+Xs7Fzi/QSgFAwAqKQ+/vhjQ5Kxdu1a48SJE8bhw4eNzz77zKhatarh4eFhHDlyxDAMw8jOzjby8/Nt5k1MTDTMZrMxZcoU67iPPvrIkGS8+eabRdZVUFBgnU+S8frrrxdp07RpU6Nz587W9+vXrzckGTfeeKORkZFhHb9kyRJDkjFr1izrsuvXr29ERUVZ12MYhnH27FkjLCzM6NatW5F13XLLLUazZs2s70+cOGFIMiZNmmQdd+jQIcPZ2dl4+eWXbebdvXu34eLiUmT8wYMHDUnGggULrOMmTZpkXPhPwQ8//GBIMhYtWmQz7+rVq4uMr1WrlhEdHV2k9piYGOPif14urn3cuHFGYGCgER4ebrNP//3vfxtOTk7GDz/8YDP/3LlzDUnGTz/9VGR9hfLy8oywsDCjVq1axunTp22mXbjfW7VqZQQGBhonT560jvvll18MJycn45FHHrGOKzz
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACBNklEQVR4nOzdeVxU9f7H8fewgwioyGKiUprinqRGli2iqFiZltnivpRhpdyy7JZbi2WZWppe2/R31ZtpaoumIqZl4hJK7raIoSkoLqAo+/n9wWWuI2iAAwPj6/l4TMyc8z3f8znjGeg955zvMRmGYQgAAAAAANgtB1sXAAAAAAAAyhfhHwAAAAAAO0f4BwAAAADAzhH+AQAAAACwc4R/AAAAAADsHOEfAAAAAAA7R/gHAAAAAMDOEf4BAAAAALBzTrYuAAAAVB3Z2dk6ffq08vPzVadOHVuXA9i1jIwMnT59Wp6enqpRo4atywFQxXHkHwCAYsybN08mk0mHDx+2dSk29/PPP+uxxx6Tr6+vXF1dFRgYqN69e9u6rCpj5syZOnv2rPn19OnTlZGRYbuCoDfffFP5+fmSpPz8fE2ePNnGFf3PkiVL1KlTJ1WvXl2enp6qV6+epkyZYuuyANgBwj+ASqswfBU+3NzcdPPNN2vkyJFKSUmxdXlAuSjc73/++WdblyJJ+uqrr3THHXdo3759euONNxQTE6OYmBj961//snVpVcY333yjCRMm6MiRI1q4cKFeffVVubu727qs69r8+fP17rvv6ujRo5o6darmz59v65IkSS+99JL69Omj6tWr66OPPlJMTIzWrVunp59+2talAbADnPYPoNKbNGmSgoODlZmZqU2bNmn27NlatWqV9uzZIw8PD1uXB9it06dPa+jQoYqIiNCSJUvk4uJi65KqpJdffln333+/ZsyYIQcHB02dOlUODhx/saVJkyapf//+evHFF+Xq6qoFCxbYuiRt3LhRb7/9tiZPnqyXXnrJ1uUAsEOEfwCVXrdu3XTrrbdKkoYOHapatWrpvffe01dffaVHH33UxtUBJXPhwoUq92XVZ599pszMTM2bN4/gfw3uuusu/fnnn9q/f7+CgoJUt25dW5d03XvkkUd0zz336Pfff1ejRo1Uu3ZtW5ekd999V7fffjvBH0C54WtnAFXOvffeK0lKTEyUVHB08vnnn1eLFi3k6ekpLy8vdevWTb/88kuRZTMzMzVhwgTdfPPNcnNzU2BgoHr16qU//vhDknT48GGLSw0uf9x9993mvjZs2CCTyaTFixfr5ZdfVkBAgKpVq6b7779fR44cKbLurVu3qmvXrvL29paHh4fuuusu/fTTT8Vu4913313s+idMmFCk7YIFCxQaGip3d3fVrFlTffv2LXb9V9u2S+Xn52v69Olq1qyZ3Nzc5O/vryeffFJnzpyxaNegQQP16NGjyHpGjhxZpM/ian/nnXeKvKeSlJWVpfHjx6thw4ZydXVVUFCQxowZo6ysrGLfq8tt3bpV3bt3V40aNVStWjW1bNlSM2bMsGizfv163XnnnapWrZp8fHz0wAMPaP/+/SXq/8MPP1SzZs3k6uqqOnXqKCoqyuJ6bqng36958+aKj49Xx44d5eHhoZdffrlE/ZfU5ZfFeHh4qEWLFvr4449LtPyhQ4f08MMPq2bNmvLw8NBtt92mlStXWrTZsmWLWrdurTfffFNBQUFydXVVo0aN9NZbb5mvl5YKwm2rVq2KXU/jxo0VERFhUfPl4yjcfffdFvtBdna2xo0bp9DQUHl7e6tatWq688479f333xfp//J9Kzk5Wf3791ft2rXl6uqq5s2b66OPPrJYpvCz8O6771pMb968eZH98d133y225r/++kuDBw+Wv7+/XF1d1axZM3366acWbQp/R2zYsEE+Pj4KCwtT3bp1FRkZecXP85WWv1RJli9c9mqPS5cvyfZIV/8d+ne/P00mkwYOHGjuqyT74OXb4erqqptvvlmTJ0+WYRgWbXfu3Klu3brJy8tLnp6e6tSpk7Zs2WLR5tJ90M/PT7fffrtq1aqlli1bymQyad68eVf9Nynp527gwIHy9PS8al+X/xts2bJFzZs3V9++fVWzZk25u7urbdu2WrFiRZFlT5w4oSFDhsjf319ubm5q1apVkUsXLt3Pp02bpvr168vd3V133XWX9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WlMWPGyNnZWf/617909913a+PGjWrfvv0V36t///vf2r1799++p5cqy+fu75w6dUpz586Vp6ennn32WdWuXVsLFixQr169tHDhQvOZbhcvXtTdd9+t33//XSNHjlRwcLCWLFmigQMH6uzZs+bfdYX+7//+T+fOnVNUVJQyMzM1Y8YM3Xvvvdq9e/cVfy+tXbtWgwcP1siRIy0+NzExMTp06JAGDRqkgIAA7d27V3PnztXevXu1ZcsWmUwmubu7a/78+erQoYP++c9/6r333pMkRUVFKS0tTfPmzZOjo2OZ3ycA18AAgErqs88+MyQZ69atM06ePGkcOXLE+Pzzz41atWoZ7u7uxtGjRw3DMIzMzEwjLy/PYtnExETD1dXVmDRpknnap59+akgy3nvvvSLrys/PNy8nyXjnnXeKtGnWrJlx1113mV9///33hiTjhhtuMNLT083Tv/jiC0OSMWPGDHPfjRo1MiIiIszrMQzDuHDhghEcHGx07ty5yLpuv/12o3nz5ubXJ0+eNCQZ48ePN087fPiw4ejoaLzxxhsWy+7evdtwcnIqMv23334zJBnz5883Txs/frxx6Z+CH3/80ZBkLFy40GLZ1atXF5lev359IzIyskjtUVFRxuV/Xi6vfcyYMYafn58RGhpq8Z7++9//NhwcHIwff/zRYvk5c+YYkoyffvqpyPoK5ebmGsHBwUb9+vWNM2fOWMy79H1v3bq14efnZ5w6dco87ZdffjEcHByM/v37m6c
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACCLklEQVR4nOzdeVxU9f7H8fewgwKubIqK+5JLYhm2aaG4ZJlappVLbhVWSmnZoqaVZWVaWv5s0652TSut1DTEtEW0Qsmda4ppCSIp4MLO+f3BnbmOIAICA8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uvfVW7d+/XwEBAZKk3Nxc3XHHHYqKitJ9992nJ554QmfPnlVkZKT27t2rZs2aWdYxdOhQ9e3b12q9U6dOLbSel19+WSaTSU8//bSSkpI0b948hYaGKjY2Vu7u7pKkzZs3q0+fPgoODrb8J8YcOH/88Uddf/31Bfpt2LChZs+eLUk6d+6cHnnkkULX/cILL+jee+/VmDFjdOrUKb3zzju65ZZbtGvXLtWqVavAMuPGjdPNN98sSfryyy+1evVqq/njx4/XkiVLNGrUKD3++OOKj4/XggULtGvXLv38889ydnYu9HUoiZSUFMu2XSwvL0933nmnfvrpJ40bN05t2rTRnj179NZbb+k///mP1qxZU2S/kZGRuuOOO+Tv768nnnhCfn5+OnDggNauXasnnnjissu99957ateune688045OTnpm2++0aOPPqq8vDyFh4dbtY2Li9PQoUM1fvx4jR07ttCwfsstt+jxxx/X22+/rWeffdZyFLBNmzZ68MEH9cknn2jjxo1WX54kJiZq8+bNmj59epHbWFwXjwMgSc7OzsU6+nf33Xdr4MCBysnJUXR0tBYvXqz09HT961//KnK5MWPGaOnSpRo8eLCefPJJ7dixQ7Nnz9aBAwcs+9g///wjKf8LouDgYL366qs6deqU3n77bf3000/atWuX6tWrp8GDBys8PFzLly/Xtddea7We5cuXq3v37mrQoEFJXg4tWbJENWvWVEREhGrWrKnNmzdr2rRpSktL0+uvv37Z5V555RU999xzuuWWWxQeHm55P+zYsUM7duwoszM+Svu+y8nJ0XPPPVfq9ZZk+Xnz5llC24EDB/TKK69Y7d81a9Ys8fYsWbJEDz30kNq1a6epU6eqVq1a2rVrlzZs2KBhw4bpueee05gxYyTl79OTJk2y+gy7WHH2QbObb75Z48aNU15envbu3at58+bpxIkT+vHHHyXln9Vz55136vvvv9fo0aPVqVMnbdy4UZMnT9bff/+tt95667Kv0+U+34pS2vddUf755x8dOXJEzz77rAYOHKgnn3xSv/32m15//XXt3btX69ats3x5MmPGDL344osKDQ3VI488ori4OL333nv69ddfC+x/Z86cUd++fXXvvfdq6NChWrlypR555BG5uLjooYceKrSW1NRU9enTR87Ozlq/fr1lX0lLS9MHH3ygoUOHauzYsTp79qw+/PBDhYWF6ZdfflGnTp0kSc8//7y++eYbjR49Wnv27JGnp6c2btyo999/X7NmzaoUlzQBdsUAgAr28ccfG5KMTZs2GadOnTKOHz9urFixwqhbt67h7u5u/PXXX4ZhGEZGRoaRm5trtWx8fLzh6upqzJw50zLto48+MiQZc+fOLbCuvLw8y3KSjNdff71Am3bt2hm33nqr5fn3339vSDIaNGhgpKWlWaavXLnSkGTMnz/f0neLFi2MsLAwy3oMwzAuXLhgBAUFGT179iywrm7duhnXXHON5fmpU6cMScb06dMt044ePWo4OjoaL7/8stWye/bsMZycnApMP3TokCHJWLp0qWXa9OnTjYs/4n/88UdDkrF
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACA/klEQVR4nOzdeXxM9/7H8fdkmySyiZBEBbHvVCxNFVUhVKlu6Gap0hY/RW8XXSzVlupGS6kuuEUXbWmLUrsqSoPaXSWKkpCShJB1zu+PaYaRCIkkE5PX8/E4DzPnfM85nzM5GXmf5XtMhmEYAgAAAAAATsvF0QUAAAAAAICiRfgHAAAAAMDJEf4BAAAAAHByhH8AAAAAAJwc4R8AAAAAACdH+AcAAAAAwMkR/gEAAAAAcHKEfwAAAAAAnJybowsAAAClR3p6uk6fPi2LxaKKFSs6uhzAqaWkpOj06dPy8fFR2bJlHV0OAAfjzD8A4IYyZswYmUymQl9u1apV1bdv30JfLqTff/9dDz30kIKCgmQ2mxUaGqr77rvP0WXdMKZMmaLExETb+0mTJiklJcVxBUFvvPGGLBaLJMlisWj8+PEOruii+fPnq3379v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pvNCgsL03PPPae0tLRcP6vL/fbbb7rzzjtVtmxZlSlTRo0aNdLkyZPznGfmzJm64447VKFCBZnNZtWrV0/Tpk3L0S57m5ctW6ZmzZrJy8vLdvn5pff8z5o1Sw888IAkqV27drbPec2aNerTp4+CgoKUkZGRY/kdO3ZU7dq1r2k7JengwYNq3rx5rsG4QoUKV52/SpUqBe7/4PLbcry9vdWwYUN98skn1zT/oUOH9MADDygwMFDe3t665ZZbtHjxYrs2mzZtUpMmTfTGG28oLCxMZrNZNWvW1IQJE2z3S0vWcNu4ceNc11O7dm1FR0fb1Xz5rRi333673X6Ynp6uUaNGKSIiQv7+/ipTpoxat26t1atX51j+5ft2XFycevfurfLly8tsNqtBgwb6+OOP7ebJ/l18++237cY3aNAgx+/D22+/nWvNf//9tx577DEFBwfLbDarfv36+uyzz+zaZH9HrVmzRgEBAYqMjFSlSpXUpUuXK36fXGn+S13L/Nnz5jVcOv+1bI+U93f41b6/L7+15Vr2wcu3w2w2q1atWho/frwMw7Bru23bNnXu3Fl+fn7y8fFR+/bttWnTJrs2l+6DFSpU0K233qpy5cqpUaNGMplMmjVrVp4/k2v9vevbt+9VD+hd/jPYtGmTGjRooF69eikwMFBeXl5q3ry5Fi5cmGPekydPqn///goODpanp6caN26c49aFS/fz9957T1WqVJGXl5fatm2rXbt25aj38iuk5syZIxcXF02YMME2bseOHerbt6+qVasmT09PhYSE6LHHHtM///xja3PhwgXVqVNHderU0YULF2zjT58+rdDQUN16663KysrK87MBkDvO/AModtlBvVy5cpKsf8AtXLhQDzzwgMLDwxUfH6+PPvpIbdu21Z49e2w9gmdlZemuu+7SypUr1atXLz399NM6e/asli9frl27dql69eq2dTz44IO688477dY7cuTIXOt5/fXXZTKZ9Pzzz+vkyZOaNGmSoqKitH37dtt9tatWrVLnzp0VERGh0aNHy8XFxRY4f/nlF7Vo0SLHcitVqmTrBOrcuXN66qmncl33K6+8oh49eujxxx/XqVOn9MEHH6hNmzbatm2bAgICcswzcOBAtW7dWpL03XffacGCBXbTn3jiCc2aNUv9+vXT0KFDFRsbqylTpmjbtm369ddf5e7unuvnkB+JiYm5dnBlsVjUrVs3rV+/XgMHDlTdunW1c+dOvffee/rf//6X6x+hl1q+fLnuuusuhYaG6umnn1ZISIj27t2rRYsW6emnn77ifNOmTVP9+vXVrVs3ubm56ccff9SgQYNksVg0ePBgu7b79+/Xgw8+qCeeeEIDBgzINay3adNGQ4cO1fvvv68XX3xRdevWlSTVrVtXjz76qP773/9q2bJldgdP4uLitGrVKo0ePTrPbbxUlSpVtHLlSh07dsxhZ3Pfe+89BQUFKTk5WZ999pkGDBigqlWrKioq6orzxMfH69Zbb9X58+c1dOhQlStXTrNnz1a3bt30zTff6J577pEk/fPPP1q/fr3Wr1+vxx57TBEREVq5cqVGjhypw4cPa/r06ZKkRx99VAMGDNCuXbvUoEED23q2bNmi//3vf3r55ZfztU3Jycn65JNP9OCDD2rAgAE6e/asPv30U0VHR2vz5s1q0qRJrvOlp6crKipK+/bt01NPPaXatWtr4cKFGjhwoP75559CO6MaHx+vW265xdaPQ/ny5fXTTz+pf//+Sk5O1rBhw64477p167RkyZICr/ta569bt64+//xz2/sZM2Zo7969eu+992zjGjVqlK/tudp3eFRUlN06s7/fLh2X/T1/rftgtuzf4wsXLtgO+FaoUEH9+/eXJO3evVutW7eWn5+fnnvuObm7u+ujjz7S7bffrrVr16ply5ZX/Kw+//xz7dy586qf6aUK8nt3Nf/8849mzJghHx8fDR06VOXLl9ecOXN07733au7cubYr7S5cuKDbb79df/75p4YMGaLw8HDNnz9fffv2VWJiYo7v2v/+9786e/asBg8erNTUVE2ePFl33HGHdu7cqeDg4Fxr+fnnn/XYY49pyJAhdr83y5cv16FDh9SvXz+FhIRo9+7dmjFjhnbv3q1NmzbJZDLJy8tLs2fPVqtWrfTSSy/p3XfflSQNHjxYSUlJmjVrllxdXQv8OQGlmgEARWTmzJmGJGPFihXGqVOnjKNHjxpffvmlUa5cOcPLy8s4duyYYRiGkZqaamRlZdnNGxsba5jNZuPVV1+1jfvss88MSca7776bY10Wi8U2nyTjrbfeytGmfv36Rtu2bW3vV69ebUgybrrpJiM
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACFMUlEQVR4nOzde3zO9f/H8ee1zc62YXbAMOc5s9ByzphDSieHyjlSVKxSOqD6lhLFNyKd6IdvUlEici4ZashZYkJsNofNDnb8/P642pXLZpht11we99vtc9t1fT7vz+fzuq59dvG8Pp/3+2MyDMMQAAAAAACwWw62LgAAAAAAABQvwj8AAAAAAHaO8A8AAAAAgJ0j/AMAAAAAYOcI/wAAAAAA2DnCPwAAAAAAdo7wDwAAAACAnSP8AwAAAABg55xsXQAAALh1ZGRk6OzZs8rJyVGlSpVsXQ5g11JSUnT27Fl5enqqXLlyti4HgI1x5h8AcFOZOHGiTCZTkW+3evXqGjRoUJFvF9Jvv/2mhx56SL6+vnJxcVFgYKDuv/9+W5d105gxY4bOnz9veT5t2jSlpKTYriDozTffVE5OjiQpJydHkyZNsnFF/1q8eLE6deqksmXLytPTU1WrVtXkyZNtXRaAUoDwD6DYzJ07VyaTyTK5urqqTp06GjVqlOLi4mxdHlCgffv2aeLEiTp69Gix7mfTpk3q1q2bKleuLFdXV1WtWlU9e/bUwoULrdqZTCaNGjXK8vz48eN69dVX1bJlS5UrV06+vr7q0KGD1qxZU6z1Xq9vv/1Wbdq00b59+/TGG29o9erVWr16tT788ENbl3bTWLZsmSZOnKjjx49rwYIFeuWVV+Tm5mbrsm5p8+bN05QpU3TixAlNnTpV8+bNs3VJkqQXXnhBvXv3VtmyZfXRRx9p9erVWrNmjZ544glblwagFOCyfwDF7rXXXlNwcLAuXryoTZs2adasWVqxYoX27Nkjd3d3W5cHSJIOHjwoB4d/vxPft2+fXn31VXXo0EHVq1cvln0uXrxYffr0UdOmTfX000+rXLlyiomJ0U8//aSPPvpIDz300BXX/fbbb/X222+rV69eGjhwoLKysvT555+rc+fO+vTTTzV48OBiqfl6nD17Vo8++qgiIiK0ePFiOTs727qkm9KLL76ou+++W9OnT5eDg4OmTp1qdayi5L322msaMGCAnn/+ebm4uGj+/Pm2LkkbN27U22+/rUmTJumFF16wdTkASiHCP4Bi161bN912222SpEcffVQVKlTQu+++q2+//Vb9+vWzcXW4lRmGoYsXL8rNzU0uLi4lvv+JEyeqfv362rJlS55gfPr06QLX7dixo44dOyZfX1/LvBEjRqhp06YaP358qQj/n332mS5evKi5c+cS/G9A+/bt9ddff2n//v0KCgpSlSpVbF3SLa9Pnz7q2LGj/vzzT9WuXVsVK1a0dUmaMmWK7rjjDoI/gCvia2MAJe7OO++UJMXExEgynx189tln1ahRI3l6esrLy0vdunXT77//nmfdixcvauLEiapTp45cXV0VGBio++67T4cPH5YkHT161KqrweVThw4dLNvasGGDTCaTFi1apBdffFEBAQHy8PDQ3XffrePHj+fZ99atW9W1a1d5e3vL3d1d7du31y+//JLva+zQoUO++584cWKetvPnz1doaKjc3NxUvnx59e3bN9/9F/TaLpWTk6Np06apQYMGcnV1lb+/vx577DGdO3fOql316tV111135dnPqFGj8mwzv9rfeeedPO+pJKWnp2vChAmqVauWXFxcFBQUpLFjxyo9PT3f9+pyW7duVffu3VWuXDl5eHiocePGmj59eoHrfPbZZ7rzzjvl5+cnFxcX1a9fX7NmzcrTLvc1r1q1Srfddpvc3Nwsl59f2ud/7ty5evDBByWZQ3bu+7xhwwYNHDhQvr6+yszMzLP9Ll26qG7dutf0OiXp8OHDatGiRb7B2M/Pr8B1GzRoYBX8JcnFxUXdu3fXiRMndOHChQLXv7xbjru7uxo1aqSPP/74mmo/cuSIHnzwQZUvX17u7u66/fbbtXz5cqs2W7ZsUdOmTfXmm28qKChILi4uql27tt566y1Lf2nJHG6bNGmS737q1q2riIgIq5ov74rRoUMHq+MwIyND48ePV2hoqLy9veXh4aG2bdtq/fr1ebZ/+bEdGxurAQMGqGLFinJxcVHDhg310UcfWa2T+7c4ZcoUq/kNGzbM8/cwZcqUfGv++++/NWTIEPn7+8vFxUUNGjTQp59+atUm9zNqw4YN8vHxUVhYmKpUqaIePXpc8fPkSutf6lrWz123oOnS9a/l9UgFf4Zf7fPbZDJZjctxLcfg5a/DxcVFderU0aRJk2QYhlXbHTt2qFu3bvLy8pKnp6c6deqkLVu2WLW59Bj08/PTHXfcoQoVKqhx48YymUyaO3dugb+Ta/27GzRokDw9PQvc1uW/gy1btqhhw4bq27evypcvLzc3N7Vo0UJLly7Ns+7p06c1dOhQ+fv7y9XVVU2aNMnTdeHS4/y9995TtWrV5Obmpvbt22vPnj156r38Cqn58+fLwcFBb731lmXerl27NGjQINWoUUOurq4KCAjQkCFDdObMGUubtLQ01atXT/Xq1VNaWppl/tmzZxUYGKg77rhD2dnZBb43APLHmX8AJS43qFeoUEGS+T9wS5cu1YMPPqjg4GDFxcXpww8/VPv27bVv3z7LiODZ2dm66667tHbtWvXt21dPP/20Lly4oNWrV2vPnj2qWbOmZR/9+vVT9+7drfY7bty4fOt54403ZDKZ9Pzzz+v06dOaNm2awsPDtXPnTku/2nXr1qlbt24KDQ3VhAkT5ODgYAmcP//8s1q2bJlnu1WqVLEMApWcnKzHH388332/8sor6t27tx599FHFx8fr/fffV7t27bRjxw75+PjkWWf48OFq27atJOmbb77RkiVLrJY/9thjmjt3rgYPHqynnnpKMTExmjFjhnbs2KFffvlFZcqUyfd9uB7nz5/Pd4CrnJwc3X333dq0aZOGDx+ukJAQ7d69W++9957++OOPfP8TeqnVq1frrrvuUmBgoJ5++mkFBARo//79+v777/X0009fcb1Zs2apQYMGuvvuu+Xk5KRly5bpiSeeUE5OjkaOHGnV9uDBg+rXr58ee+wxDRs2LN+w3q5dOz311FP673//qxdffFEhISGSpJCQEPXv31+ff/65Vq1aZfXlSWxsrNatW6cJEyYU+BovVa1aNa1du1YnTpwosrO5sbGxcnd3v+YuNe+99558fX2VlJSkTz/9VMOGDVP16tUVHh5+xXXi4uJ0xx13KDU1VU899ZQqVKigefPm6e6779ZXX32le++9V5J05swZbdq0SZs2bdKQIUMUGhqqtWvXaty4cTp69Khmz54tSerfv7+GDRumPXv2qGHDhpb9/Prrr/rjjz/08ssvX9d7kJSUpI8//lj9+vXTsGHDdOHCBX3yySeKiIjQtm3b1LRp03zXy8jIUHh4uA4cOKDHH39cdevW1dKlSzV8+HCdOXOmyM6oxsXF6fbbb7eM41CxYkX98MMPGjp0qJKSkjR69OgrrvvTTz9pxYoVhd73ta4fEhKi//u//7M8nzNnjvbv36/33nvPMq9x48bX9Xqu9hkeHh5utc/cz7dL5+V+zl/rMZgr9+84LS3N8oWvn5+fhg4dKknau3ev2rZtKy8vL40dO1ZlypTRhx9+qA4dOmjjxo1q1arVFd+r//u//9Pu3buv+p5eqjB/d1dz5swZzZkzR56ennrqqadUsWJFzZ8/X/fdd58WLFhgudIuLS1NHTp00J9//qlRo0YpODhYixcv1qBBg3T+/Pk8n7Wff/65Lly4oJEjR+rixYuaPn267rzzTu3evVv+/v751vLjjz9qyJAhGjVqlNXfzerVq3XkyBENHjxYAQEB2rt3r+bMmaO9e/dqy5YtMplMcnNz07x589S6dWu99NJLevfddyVJI0eOVGJioubOnStHR8dCv0/ALc0AgGLy2WefGZKMNWvWGPHx8cbx48eNL774wqhQoYL
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACFBklEQVR4nOzdeVxU9f7H8fewD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f2My+u937dv3+uu88pLW663D+a2Hf7+/oqOjrbZByXLl1VvvvmmqlSpIrPZrMqVK+uVV17J8ZmWvQ86OzurQYMGatCggb755huZTKZ8nT2Un/dd9t+BDz744JrLuXrf3bBhg9zd3bVv3z7raxIUFKRBgwbp9OnTOeafP3++9ffl7++vxx57TH/99ZdNm+z9fP/+/YqKipKXl5dCQkI0duxYm0uZsuudMWOGdVxKSorCw8MVFhamY8eOWcd/8MEHatasmcqWLSsPDw+Fh4fr66+/tlnv9OnTZTKZ9OWXX9qMf/vtt2UymbRkyZJrvi4AbHHkH0CxyA7qZcuWlSTt379fCxcu1COPPKKwsDAdP35c//73v9WiRQvt2rVLISEhkqTMzEzdf//9Wrlypbp3765nn31WKSkpWr58uXbs2KEqVapY19GjRw917NjRZr0jR47MtZ633npLJpNJL730kk6cOKGJEycqMjJS8fHx8vDwkCStWrVKHTp0UHh4uEaPHi0nJydr4Pzpp5/UpEmTHMutUKGCxo0bJ0k6f/68hgwZkuu6X3/9dT366KN68skndfLkSX388ce67777tHXrVvn6+uaYZ+DAgbr33nslSd98802OYDRo0CDNmDFD/fr10zPPPKMDBw5o8uTJ2rp1q3755Re5urrm+jrciLNnz1q37UpZWVl64IEH9PPPP2vgwIGqVauWtm/frg8//FC///67TedkuVm+fLnuv/9+BQcH69lnn1VQUJB2796tRYsW6dlnn73mfFOnTlWdOnX0wAMPyMXFRd9//72eeuopZWVlaejQoTZtExIS1KNHDw0aNEgDBgzINazfd999euaZZ/TRRx/plVdeUa1atSRJtWrV0uOPP67//Oc/WrZsmc2XJ4mJiVq1apVGjx6d5zZeqVevXho4cGCOZW3fvl07duzQqFGjrOMqVaqkzMxM/d///Z/69OmT73UU1L333quBAwcqKytLO3bs0MSJE3X06FH99NNPec43ZswYvfHGG4qMjNSQIUOUkJCgqVOnavPmzdb979SpU5Is78lq1arpjTfe0OXLlzVlyhQ1b95cmzdvVvXq1dWyZUuFhoZq9uzZeuihh2zWM3v2bFWpUuWG+weYP3++Ll68qCFDhqhs2bLatGmTPv74Yx05ckTz58+/5nxz5szRY489pgYNGmjcuHE6deqUPvroI/3888/aunWr/P39b6iOaynIZ0K2l1566abWnd/5X331VT355JOSpKSkJI0YMcLmc+lK+d2e6733Bw0apMjISOtyH3/8cT300EM2p9QHBARIyt8+mK1mzZp69dVXZRiG9u3bpwkTJqhjx442gfvJJ5/UzJkz1bVrVz333HPauHGjxo0bp927d+f6xVS2jIwMvfrqq/l6TbMV9H2Xl1OnTuny5csaMmSIWrdurcGDB2vfvn2aMmWKNm7cqI0bN1rPfMr+23HXXXdp3LhxOn78uCZNmqRffvklx/6XmZmp9u3b6+6779Z7772npUuXavTo0crIyNDYsWNzrSU9PV0PP/yw9Sym4OBg67RJkybpgQceUK9evZSWlqa5c+fqkUce0aJFixQdHS1J6tevn7755hvFxMSobdu2Cg0N1fbt2/XGG2+of//+Of7uA8iDAQCFaPr06YYkY8WKFcbJkyeNw4cPG3PnzjX
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACHdklEQVR4nOzdeXwN9/7H8ffJvkhCZFVB7DsVS0NrawhNq0pbVGup2kqLdNXF1tur1VulpXTF/ZVLuaUtStFSKmiD2nPVUpRIgiRCZJ3fH6c5dSSISHLieD0fj3nknJnvzHzmZM5J3nNmvmMyDMMQAAAAAACwWw62LgAAAAAAAJQswj8AAAAAAHaO8A8AAAAAgJ0j/AMAAAAAYOcI/wAAAAAA2DnCPwAAAAAAdo7wDwAAAACAnSP8AwAAAABg5wj/AADAZpKTk/X7778rOzvb1qUAdi03N1dJSUk6fPiwrUsBYCOEfwBAmTdhwgSZTKZiX261atU0YMCAYl8uri4rK0tTpkxRkyZN5OrqqgoVKqhWrVpat26drUu7JezZs0fLli2zPN+5c6dWrFhhu4KgTZs2af369Zbn69ev188//2y7gi4THx+v0aNHq2rVqnJxcZG/v7/q16+v1NRUW5cGwAYI/wCK1dy5c2UymSyDm5ubateurZEjR+r06dO2Lg+4pn379mnChAk6evRoiSy/cePGqlKligzDuGqbNm3aKDAw0PJNeGJiokaNGqW6devK3d1dAQEBatmypV566SWlpaVZ5vvqq6/Uq1cvVa9eXR4eHqpTp46ee+45JScnl8i2FEVGRoYiIiL0+uuvq3379lq8eLHWrFmjH374QeHh4bYu75Zw/vx5DR06VFu2bNHBgwc1atQo7d6929Zl3daOHz+up59+Wrt379bu3bv19NNP6/jx47YuS7///rtatGihhQsXaujQoVq+fLnWrFmjdevWydPT09blAbABJ1sXAMA+TZo0SaGhobp06ZI2bdqkWbNmaeXKldqzZ488PDxsXR4gSYqLi5ODw9/Hwfft26eJEyeqffv2qlatWrGvr2/fvnr55Ze1ceNGtW3bNt/0o0ePKiYmRiNHjpSTk5POnj2r5s2bKzU1VU8++aTq1q2rM2fOaNeuXZo1a5aGDx+ucuXKSZKGDBmiSpUq6fHHH1eVKlW0e/duzZgxQytXrtT27dvl7u5e7Ntzo95++21t3bpVq1evVvv27W1dzi0pPDzcMkhS7dq1NXjwYBtXdXvr0aOHpk2bpsaNG0sy/4569Ohh46qkoUOHysXFRVu2bNEdd9xh63IAlAGEfwAlomvXrmrevLkk6amnnlLFihU1depUff311+rTp4+Nq8PtzDAMXbp0Se7u7nJ1dS3VdT/22GMaO3asFixYUGD4/89//iPDMNS3b19J0meffaZjx47p559/VuvWra3apqamysXFxfJ8yZIl+QJ1WFiY+vfvr/nz5+upp54q/g26AdnZ2Zo2bZqee+45gv9NWrZsmfbt26f09HQ1atTIaj9A6XN1ddXmzZu1Z88eSVLDhg3l6Oho05piY2P1ww8/6Pvvvyf4A7DgtH8ApaJjx46SpCNHjkiSzp49q+eff16NGjVSuXLl5O3tra5du+q3337LN++lS5c0YcIE1a5dW25ubgoODlaPHj106NAhSeZvSy+/1ODK4fKgsX79eplMJi1atEivvPKKgoKC5OnpqW7duhV4mubWrVvVpUsX+fj4yMPDQ+3atbvqtZzt27cvcP0TJkzI1/aLL75QWFiY3N3d5evrq969exe4/mtt2+Vyc3M1bdo0NWjQQG5ubgoMDNTQoUN17tw5q3bVqlXT/fffn289I0eOzLfMgmp/55138r2mkvl07vHjx6tmzZpydXVVSEiIXnzxRWVkZBT4Wl1p69atuu+++1ShQgV5enqqcePGmj59+jXnmTNnjjp27KiAgAC5urqqfv36mjVrVr52edu8evVqNW/eXO7u7vroo48s0/Ku+Z87d64eeeQRSVKHDh0sr/P69evVv39/+fn5KSsrK9/yO3furDp16hRqO0NCQtS2bVstWbKkwGUtWLBANWrUUKtWrSRJhw4dkqOjo+666658bb29veXm5mZ5XlCgfuihhyRJ+/fvv25t1apVs2yzg4ODgoKC1KtXLx07dqxQ2/bhhx+qQYMGcnV1VaVKlTRixAirSw7i4uJ07tw5eXl5qV27dvLw8JCPj4/uv/9+S2iSpB9//FEmk0lLly7Nt44FCxbIZDIpJibGUvOVfTbkvccvvwZ748aNeuSRR1SlShXL/jlmzBilp6dbzVtQ3xLz589X06ZN5ebmpooVK6pPnz75XpMBAwZYzsDIs2TJknx1SFK5cuUK7GeiMJ8J7du3t/ye69evr7CwMP32228FfiYU5PL58/zyyy+Fmv9qn29X+0wq7Gfctd77AwYMuO46L79E53r7YEHb4efnp6ioKKt9UDIfrHrjjTdUo0YNubq6qlq1anrllVfyfabl7YOOjo5q0qSJmjRpoq+++komk6lQZw8V5n2X93fgX//611WXc+W+u2XLFrm5uenQoUOW1yQoKEhDhw7V2bNn882/ePFiy+/Lz89Pjz/+uP7880+rNnn7+eHDhxUZGSlPT09VqlRJkyZNsrqUKa/euXPnWsadP39eYWFhCg0N1alTpyzj//Wvf6l169aqWLGi3N3dFRYWpiVLllitd86cOTKZTPr888+txv/zn/+UyWTSypUrr/q6ALDGN/8ASkVeUK9YsaIk6fDhw1q2bJkeeeQRhYaG6vTp0/roo4/Url077du3T5UqVZIk5eTk6P7779e6devUu3dvjRo1SufPn9eaNWu0Z88e1ahRw7KOPn366L777rNa79ixYwus580335TJZNJLL72khIQETZs2TREREdq5c6fl9OgffvhBXbt2VVhYmMaPHy8HBwdL4Ny4caNatmyZb7mVK1fW5MmTJUlpaWkaPnx4get+/fXX9eijj+qpp55SYmKiPvjgA7Vt21Y7duxQ+fLl880zZMgQ3XPPPZLM13ZfGYyGDh2quXPnauDAgXr22Wd15MgRzZgxQzt27NDPP/8sZ2fnAl+HG5GcnGzZtsvl5uaqW7du2rRpk4YMGaJ69epp9+7deu+99/S///3PqnOygqxZs0b333+/goODNWrUKAUFBWn//v1avny5Ro0addX5Zs2apQYNGqhbt25ycnLSt99+q6efflq5ubkaMWKEVdu4uDj16dNHQ4cO1eDBgwsM623bttWzzz6r999/X6+88orq1asnSapXr56eeOIJ/fvf/9bq1autDp7Ex8frhx9+0Pjx46+5jZfr27evhgwZkm9Zu3fv1p49ezRu3DjLuKpVqyonJ0f/93//p/79+xd6HZfXJ0l+fn6Fan/PPfdoyJAhys3N1Z49ezRt2jSdPHlSGzduvOZ8EyZM0MSJExUREaHhw4crLi5Os2bN0i+//GLZ/86cOSPJ/J6sVauWJk6cqEuXLmnmzJlq06aNfvnlF9WuXVvt27dXSEiI5s+fbzl4kWf+/PmqUaPGDfcPsHjxYl28eFHDhw9XxYoVtW3bNn3wwQc6ceKEFi9efNX5FixYoMcff1xNmjTR5MmTdebMGb3//vvatGmTduzYUejX9XqK8pmQ56WXXrqpdRd2/ldffdVy9khSUpLGjBlj9bl0ucJuz/Xe+0OHDlVERIRluU888YQeeughq1Pq/f39JRVuH8xTt25dvfrqqzIMQ4cOHdLUqVN13333WQXup556SvPmzdPDDz+s5557Tlu3btXkyZO1f//+Ag9M5cnOztarr75aqNc0T1Hfd9dy5swZXbp0ScOHD1fHjh01bNgwHTp0SDNnztTWrVu1detWy5lPeX87WrRoocmTJ+v06dOaPn26fv7553z7X05Ojrp06aK77rpLU6ZM0apVqzR+/HhlZ2dr0qRJBdaSlZWlnj17Ws5iCg4OtkybPn26unXrpr59+yozM1MLFy7UI488ouXLlysqKkqSNHDgQH311VeKjo5Wp06dFBISot27d2vixIkaNGhQvr/7AK7
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACJX0lEQVR4nOzdfXzN9f/H8efZ7PrSzC4wNtebXGSiUXKxDJNEiZSLRETFivL9lov6lm/6ykVE6Vf0RbkoVMrVJJV1NeRaaBoxzMXGsLF9fn+c706OzTBnO3M87rfbue2cz3mfz/v1OTvnbM/z+bzfH5NhGIYAAAAAAIDDcrJ3AQAAAAAAoGQR/gEAAAAAcHCEfwAAAAAAHBzhHwAAAAAAB0f4BwAAAADAwRH+AQAAAABwcIR/AAAAAAAcHOEfAAAAAAAHR/gHAABlyvnz53Xo0CEdPXrU3qUADu/06dPav3+/srKy7F0KgBJG+AcAlBljx46VyWSy+XrDw8PVt29fm68XtrNmzRp17txZ/v7+8vDwUOXKlfXss8/au6ybxuuvv668vDxJUl5ensaPH2/nim5tZ86c0eTJky23T506penTp9uvoEsYhqH33ntPd955pzw9PeXr66uIiAjNnTvX3qUBKGGEfwDFMnv2bJlMJsvF3d1dtWvX1tChQ3XkyBF7lwcUaceOHRo7dqz2799fIutv0KCBqlatKsMwrtimRYsWCg4O1oQJE2QymbRmzZortp01a5ZMJpM+//xzSeZw99FHH6lZs2YKCAiQj4+Pateurd69e+vHH3+0euxrr72mzp07Kzg4WCaTSWPHjrXJNtrSO++8o7i4OGVkZGjKlClavXq1Vq9erVdeecXepd005syZo//85z86ePCgJk6cqDlz5ti7pFuah4eHXnrpJc2bN08HDhzQ2LFj9cUXX9i7LEnSI488okGDBikyMlL//e9/tXr1aq1Zs0Zdu3a1d2kASlg5excA4Ob2yiuvKCIiQufPn9f333+vGTNm6KuvvtK2bdvk6elp7/IASdLu3bvl5PT39907duzQuHHj1KpVK4WHh9u8v169eunFF1/Ud999p5YtWxa4f//+/UpKStLQoUP16KOPatSoUZo/f75iY2MLXd/8+fNVoUIFdejQQZL0zDPPaPr06br//vvVq1cvlStXTrt379bXX3+t6tWr684777Q89qWXXlJISIhuv/12rVy50ubbeqP27NmjhIQEDRw4UO+8806JHPlxK3jllVfUu3dvvfDCC3Jzc2Mvrp05Oztr3Lhx6t27t/Ly8uTr66vly5fbuyx99NFHWrBggebOnatHHnnE3uUAKGWEfwA3pEOHDmrSpIkk6YknnlCFChX01ltvadmyZerZs6edq8OtzDAMnT9/Xh4eHnJzcyvVvh955BFLoC8s/H/88ccyDEO9evVSpUqV1Lp1a3322WeaMWNGgVr/+usvrV+/XgMHDpSLi4uOHDmid955RwMGDNB7771n1Xby5Mk6duyY1bKUlBSFh4crPT1dFStWtP3G3qCpU6cqJCREU6dOJfjfgIcfflitW7fW3r17VatWrTL5u77VPPfcc3r44Yd14MABRUZGyt/f394l6c0331TPnj0J/sAtisP+AdhUmzZtJJkDhySdOHFCzz//vOrXry9vb2/5+vqqQ4cO+u233wo89vz58xo7dqxq164td3d3hYaGqmvXrtq3b58k897SS4caXH5p1aqVZV3r1q2TyWTSggUL9I9//EMhISHy8vJS586ddeDAgQJ9//TTT2rfvr38/Pzk6empe+65Rz/88EOh29iqVatC+y/scOq5c+cqOjpaHh4eCggIUI8ePQrtv6htu1ReXp4mT56sevXqyd3dXcHBwXryySd18uRJq3bh4eHq1KlTgX6GDh1aYJ2F1f7mm28WeE4lKTs7W2PGjFHNmjXl5uamsLAwjRw5UtnZ2YU+V5f76aef1LFjR5UvX15eXl5q0KCBpky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vvsMy1ZssTq/ieffFKzZ89Wv3799MwzzyglJUXTpk3Tpk2b9MMPP8jFxaXQ5+F6nDp1qtDJwvLy8tS5c2d9//33GjhwoCIjI7V161ZNmjRJv//++1UD4erVq9WpUyeFhobq2WefVUhIiHbu3Kkvv/yyyIndZsyYoXr16qlz584qV66cvvjiCz311FPKy8vTkCFDrNru3r1bPXv21JNPPqkBAwYUGtZbtmypZ555RlOnTtU//vEPRUZGSpIiIyP12GOP6aOPPtLKlSutvjxJS0vT2rVrNWbMmCK38VK9evXSwIEDC6xr69at2rZtm0aPHm1Z1rVrVw0ePFjz588vMO52/vz5qlatmiXsV6tWTZK0aNEiPfTQQ6UyvOa///2vJCk9PV3vvPOOHnroIW3btq3IL0O2b9+uu+++W76+vho5cqRcXFz07rvvqlWrVvr2228tX3wcP35cv/76q8qVK6chQ4aoRo0aWrp0qQYOHKjjx4/rxRdflMlk0qOPPqoJEyboxIkTCggIsPTzxRdfKDMzU48++uh1bdO1fjZd7sSJE2rZsqVOnz6tZ555RiEhIZo7d666du2qefPm2eyIp+3bt6tFixaqXLmyXnzxRXl5eWnhwoXq0qWLPv30Uz3wwANXfOx///tfbd26tdh9X+vjW7ZsaXltSObPPEn65z//aVnWvHlzSde+PWfOnNHdd9+tnTt36vHHH1fjxo2Vnp6uzz//XAcPHrSMU8/33nvvaefOnZo0aZJlWYMGDSx9XstrMN+kSZMUGBiozMxMffDBBxowYIDCw8Mtw3HWrFmjDh06qHr16ho7dqzOnTunt99+Wy1atNDGjRuL/KJt4sSJ1z0fTnHed0U5fvy4JOmNN95QSEiIRowYIXd3d82aNUuxsbFavXq15UilI0eOqHnz5jp79qyeeeYZVahQQXPmzFHnzp21ePHiAq+/a/lbe7k
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/8AAAIjCAYAAABViau2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90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r58+XVfK0lbt25V586d5eXlpfLly6t9+/ZWwxIk6ZdfflFYWJieffZZVa5cWS4uLmrQoIE+/PBDSxnDMFSzZk09+OCD+drIzMyUt7e3nn76aauYr3TlvA83+t2U99mcO3euZd3vv/+uhx56SBUqVJCbm5vuvvvufMck7zto6dKlVuvLly+fb/6Jgj6XknnYRs+ePeXr6ytXV1c1a9bMMvQjT94QrEOHDsnf31/33HOPKlasqEaNGuWLuyCXvz5Pbm7uDb3+yuFfBS2Xv/5G9kcyj48fNWqUatasKRcXF1WrVk39+vVTcnKy5bhea7n8++xG3oNX7oe7u7saNmyojz76KF9s69at03333ScPDw/5+PjowQcfzPdZuvw9WK1aNYWHh6tcuXIKCAiwfNdcy41+7tq2basGDRpctZ4r37sZGRnatWuXgoKCFBUVJS8vL3l4eKht27b68ccf873+zz//1COPPCJfX1+5u7urZcuW+b6jbuZvbdu2bfP9TXnjjTfk4OCghQsXWtb9+OOPeuSRR1S9enXL35lRo0bpwoULljInT55UpUqV1LZtW6vhVX/88Yc8PDz06KOPXvW4ALczuv0DKFZ5iXrFihUlmf95WL58uR555BEFBwfrxIkTev/999WmTRvt2bNHVapUkSTl5OSoa9euio2NVe/evfX888/r3LlziomJ0a5du1S7dm1LG4899pi6dOli1e7YsWMLjOeNN96QyWTSmDFjdPLkSU2fPl0RERHatm2b3NzcJJn/mevcubPCwsI0fvx4OTg4WBLOH3/8Uc2bN89Xb7Vq1SwTaqWnp+uZZ54psO1XX31VvXr10lNPPaVTp07p3XffVevWrbV161b5+Pjke82QIUN03333SZK+/PJLLVu2zGr7008/rblz52rgwIEaMWKEEhISNHPmTG3dulU///yznJycCjwONyMlJaXAycJyc3PVrVs3/fTTTxoyZIhCQkK0c+dOTZs2Tb///vt1E8KYmBh17dpVgYGBev755xUQEKC9e/dq5cqV15zYbfbs2brzzjvVrVs3lStXTl9//bWeffZZ5ebmatiwYVZl9+/fr8cee0xPP/20Bg8eXGCy3rp1a40YMULvvPOO/vGPfygkJESSFBISor59++rTTz/VmjVrrE6eJCUlad26dRo/fvw19/Fyffr00ZAhQ/LVtXPnTu3atUvjxo2zrHv44Yf1zDPPaOHChfnG3S5cuFA1atSwJPs1atSQJC1ZskSPPPJIoYbXJCUlyc/P74bL//e//5UkJScn67333tMjjzyiXbt2XfNkyO7du3XffffJy8tLo0ePlpOTk95//321bdtWGzZssJz4OH36tH777TeVK1dOw4YNU+3atbV8+XINGTJEp0+f1ssvvyyTyaQnnnhCkydP1pkzZ+Tr62tp5+uvv1ZaWpqeeOKJmzoGN/rddKUzZ86odevWOnfunEaMGKGAgADNnz9fDz/8sBYsWKDHHnvspuK4mt27d6tVq1aqWrWqXn75ZXl4eGjx4sXq3r27vvjiCz300ENXfe1///tf7dy5s9Bt3+jrW7dubXlvSObvPEn65z//aVl3zz33SLrx/UlPT7ecnHryySfVtGlTJScn66uvvtKRI0cs49TzfPDBB9q7d6+mTZtmWdeoUSNLmzfyHswzbdo0+fn5KS0tTR9//LEGDx6smjVrWobHrF27Vp07d1atWrU0YcIEXbhwQe+++65atWqlLVu2XHMI0dSpU296PpzCfO6u5fTp05Kkt95
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Корреляция признаков в обучающей выборке:\n",
" Unnamed: 0 carat depth table x y \\\n",
"Unnamed: 0 1.000000 -0.397135 -0.038173 -0.109717 -0.406396 -0.404400 \n",
"carat -0.397135 1.000000 0.012244 0.184243 0.951931 0.945835 \n",
"depth -0.038173 0.012244 1.000000 -0.274986 -0.030762 -0.032418 \n",
"table -0.109717 0.184243 -0.274986 1.000000 0.195246 0.188413 \n",
"x -0.406396 0.951931 -0.030762 0.195246 1.000000 0.991915 \n",
"y -0.404400 0.945835 -0.032418 0.188413 0.991915 1.000000 \n",
"z -0.399257 0.928342 0.076986 0.152752 0.967789 0.962323 \n",
"cut_Good -0.042108 0.034264 0.192864 0.163059 0.027477 0.030305 \n",
"cut_Ideal 0.114386 -0.163612 -0.020022 -0.560157 -0.162808 -0.155536 \n",
"cut_Premium -0.052857 0.111731 -0.225003 0.373514 0.125573 0.107317 \n",
"cut_Very Good -0.035069 0.017264 0.034832 0.137452 0.007004 0.019726 \n",
"color_E 0.052187 -0.132396 -0.023732 0.007044 -0.132446 -0.130469 \n",
"color_F 0.016246 -0.048969 -0.016200 -0.007303 -0.046116 -0.045376 \n",
"color_G 0.027986 -0.024513 -0.003837 -0.038404 -0.026801 -0.026822 \n",
"color_H -0.062449 0.100708 0.022672 0.017285 0.095782 0.093429 \n",
"color_I -0.045077 0.153477 0.021523 0.014445 0.149141 0.148534 \n",
"color_J -0.050254 0.152898 0.021672 0.040373 0.162742 0.162404 \n",
"clarity_IF 0.077743 -0.119400 -0.033011 -0.078131 -0.130391 -0.127557 \n",
"clarity_SI1 -0.053072 0.073320 0.050914 0.055756 0.080001 0.078622 \n",
"clarity_SI2 -0.160840 0.255131 0.006453 0.097077 0.272073 0.267797 \n",
"clarity_VS1 0.025491 -0.056952 -0.022840 -0.030577 -0.058078 -0.055083 \n",
"clarity_VS2 0.032349 -0.033837 -0.006613 -0.010324 -0.036775 -0.037425 \n",
"clarity_VVS1 0.095239 -0.171270 -0.020592 -0.069129 -0.188238 -0.185525 \n",
"clarity_VVS2 0.091095 -0.131283 -0.017795 -0.062135 -0.143086 -0.140215 \n",
"\n",
" z cut_Good cut_Ideal cut_Premium ... color_H \\\n",
"Unnamed: 0 -0.399257 -0.042108 0.114386 -0.052857 ... -0.062449 \n",
"carat 0.928342 0.034264 -0.163612 0.111731 ... 0.100708 \n",
"depth 0.076986 0.192864 -0.020022 -0.225003 ... 0.022672 \n",
"table 0.152752 0.163059 -0.560157 0.373514 ... 0.017285 \n",
"x 0.967789 0.027477 -0.162808 0.125573 ... 0.095782 \n",
"y 0.962323 0.030305 -0.155536 0.107317 ... 0.093429 \n",
"z 1.000000 0.042419 -0.158216 0.087557 ... 0.094510 \n",
"cut_Good 0.042419 1.000000 -0.258011 -0.185394 ... -0.007642 \n",
"cut_Ideal -0.158216 -0.258011 1.000000 -0.478081 ... -0.024151 \n",
"cut_Premium 0.087557 -0.185394 -0.478081 1.000000 ... 0.029929 \n",
"cut_Very Good 0.018725 -0.169940 -0.438229 -0.314889 ... -0.005621 \n",
"color_E -0.129694 0.007180 0.001097 -0.017061 ... -0.201856 \n",
"color_F -0.046366 0.005680 0.002736 -0.014361 ... -0.197792 \n",
"color_G -0.026922 -0.024765 0.035195 0.002625 ... -0.220750 \n",
"color_H 0.094510 -0.007642 -0.024151 0.029929 ... 1.000000 \n",
"color_I 0.146920 0.006280 -0.011736 0.007090 ... -0.142441 \n",
"color_J 0.161595 0.016478 -0.039704 0.019348 ... -0.100320 \n",
"clarity_IF -0.129263 -0.032327 0.104625 -0.053332 ... 0.008773 \n",
"clarity_SI1 0.081263 0.056069 -0.081767 0.023309 ... 0.034336 \n",
"clarity_SI2 0.263557 0.043577 -0.108704 0.065610 ... 0.024856 \n",
"clarity_VS1 -0.055805 -0.020710 0.034568 -0.013400 ... -0.015491 \n",
"clarity_VS2 -0.037401 -0.021250 0.014164 0.024069 ... -0.033375 \n",
"clarity_VVS1 -0.184765 -0.035799 0.088938 -0.052519 ... 0.001434 \n",
"clarity_VVS2 -0.140629 -0.037519 0.075342 -0.060646 ... -0.030919 \n",
"\n",
" color_I color_J clarity_IF clarity_SI1 clarity_SI2 \\\n",
"Unnamed: 0 -0.045077 -0.050254 0.077743 -0.053072 -0.160840 \n",
"carat 0.153477 0.152898 -0.119400 0.073320 0.255131 \n",
"depth 0.021523 0.021672 -0.033011 0.050914 0.006453 \n",
"table 0.014445 0.040373 -0.078131 0.055756 0.097077 \n",
"x 0.149141 0.162742 -0.130391 0.080001 0.272073 \n",
"y 0.148534 0.162404 -0.127557 0.078622 0.267797 \n",
"z 0.146920 0.161595 -0.129263 0.081263 0.263557 \n",
"cut_Good 0.006280 0.016478 -0.032327 0.056069 0.043577 \n",
"cut_Ideal -0.011736 -0.039704 0.104625 -0.081767 -0.108704 \n",
"cut_Premium 0.007090 0.019348 -0.053332 0.023309 0.065610 \n",
"cut_Very Good 0.000094 0.008815 -0.033901 0.031762 0.005171 \n",
"color_E -0.157077 -0.110628 -0.043930 0.000156 0.005365 \n",
"color_F -0.153915 -0.108401 0.015369 -0.017832 -0.003781 \n",
"color_G -0.171780 -0.120983 0.078387 -0.083663 -0.045632 \n",
"color_H -0.142441 -0.100320 0.008773 0.034336 0.024856 \n",
"color_I 1.000000 -0.078066 -0.013824 0.019822 -0.001150 \n",
"color_J -0.078066 1.000000 -0.018986 0.016113 -0.000187 \n",
"clarity_IF -0.013824 -0.018986 1.000000 -0.105528 -0.084748 \n",
"clarity_SI1 0.019822 0.016113 -0.105528 1.000000 -0.256125 \n",
"clarity_SI2 -0.001150 -0.000187 -0.084748 -0.256125 1.000000 \n",
"clarity_VS1 0.019454 0.024517 -0.078583 -0.237493 -0.190726 \n",
"clarity_VS2 -0.007408 0.018553 -0.101376 -0.306378 -0.246046 \n",
"clarity_VVS1 -0.003091 -0.038902 -0.050966 -0.154031 -0.123699 \n",
"clarity_VVS2 -0.032959 -0.036901 -0.059965 -0.181225 -0.145538 \n",
"\n",
" clarity_VS1 clarity_VS2 clarity_VVS1 clarity_VVS2 \n",
"Unnamed: 0 0.025491 0.032349 0.095239 0.091095 \n",
"carat -0.056952 -0.033837 -0.171270 -0.131283 \n",
"depth -0.022840 -0.006613 -0.020592 -0.017795 \n",
"table -0.030577 -0.010324 -0.069129 -0.062135 \n",
"x -0.058078 -0.036775 -0.188238 -0.143086 \n",
"y -0.055083 -0.037425 -0.185525 -0.140215 \n",
"z -0.055805 -0.037401 -0.184765 -0.140629 \n",
"cut_Good -0.020710 -0.021250 -0.035799 -0.037519 \n",
"cut_Ideal 0.034568 0.014164 0.088938 0.075342 \n",
"cut_Premium -0.013400 0.024069 -0.052519 -0.060646 \n",
"cut_Very Good -0.003510 -0.015913 -0.008381 0.014051 \n",
"color_E -0.023478 0.031569 -0.004026 0.011237 \n",
"color_F -0.012930 0.004648 0.018415 0.012658 \n",
"color_G 0.059925 -0.028513 0.046097 0.061750 \n",
"color_H -0.015491 -0.033375 0.001434 -0.030919 \n",
"color_I 0.019454 -0.007408 -0.003091 -0.032959 \n",
"color_J 0.024517 0.018553 -0.038902 -0.036901 \n",
"clarity_IF -0.078583 -0.101376 -0.050966 -0.059965 \n",
"clarity_SI1 -0.237493 -0.306378 -0.154031 -0.181225 \n",
"clarity_SI2 -0.190726 -0.246046 -0.123699 -0.145538 \n",
"clarity_VS1 1.000000 -0.228148 -0.114701 -0.134951 \n",
"clarity_VS2 -0.228148 1.000000 -0.147970 -0.174094 \n",
"clarity_VVS1 -0.114701 -0.147970 1.000000 -0.087525 \n",
"clarity_VVS2 -0.134951 -0.174094 -0.087525 1.000000 \n",
"\n",
"[24 rows x 24 columns]\n"
]
}
],
"source": [
"# Проверка на наличие дубликатов\n",
"duplicates = df.duplicated().sum()\n",
"print(f\"Количество дубликатов: {duplicates}\")\n",
"\n",
"\n",
"# Проверим, какие столбцы являются категориальными\n",
"categorical_columns = X.select_dtypes(include=['object']).columns\n",
"\n",
"# Применяем one-hot encoding к категориальным столбцам\n",
"X_encoded = pd.get_dummies(X, columns=categorical_columns, drop_first=True)\n",
"\n",
"# Разделение на обучающую и тестовую выборки\n",
"X_train, X_test, y_train, y_test = train_test_split(X_encoded, y, test_size=0.2, random_state=42, stratify=df['cut'])\n",
"\n",
"# Визуализация распределений признаков\n",
"def visualize_distribution(X_train, X_test, feature):\n",
" plt.figure(figsize=(12, 6))\n",
" sns.histplot(X_train[feature], bins=30, color='blue', label='Train', kde=True)\n",
" sns.histplot(X_test[feature], bins=30, color='red', label='Test', kde=True)\n",
" plt.title(f'Распределение {feature} в обучающей и тестовой выборках')\n",
" plt.xlabel(feature)\n",
" plt.ylabel('Количество')\n",
" plt.legend()\n",
" plt.show()\n",
"\n",
"# Распределение для каждого из признаков\n",
"for feature in X_encoded.columns:\n",
" visualize_distribution(X_train, X_test, feature)\n",
"\n",
"# Проверка корреляции\n",
"correlations = X_train.corr()\n",
"print(\"Корреляция признаков в обучающей выборке:\")\n",
"print(correlations)\n",
"\n",
"\n",
"# Преобразование категориальных данных в числовые\n",
"df_encoded = pd.get_dummies(df, columns=['cut'], drop_first=True)\n",
"\n",
"# Разделение данных на обучающую и тестовую выборки\n",
"X = df_encoded.drop('price', axis=1)\n",
"y = df_encoded['price']\n",
"\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Оценка выборок и Аугментация данных"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Сбалансированность в обучающей выборке:\n",
"price\n",
"605 109\n",
"789 106\n",
"828 102\n",
"625 101\n",
"544 98\n",
" ... \n",
"8952 1\n",
"13769 1\n",
"10719 1\n",
"6064 1\n",
"3169 1\n",
"Name: count, Length: 10680, dtype: int64\n",
"\n",
"Сбалансированность в тестовой выборке:\n",
"price\n",
"802 33\n",
"776 29\n",
"844 29\n",
"675 26\n",
"645 25\n",
" ..\n",
"7976 1\n",
"7022 1\n",
"8969 1\n",
"5074 1\n",
"4968 1\n",
"Name: count, Length: 5338, dtype: int64\n"
]
}
],
"source": [
"# Проверка сбалансированности целевой переменной в обучающей выборке\n",
"cut_counts_train = y_train.value_counts()\n",
"cut_counts_test = y_test.value_counts()\n",
"\n",
"print(\"Сбалансированность в обучающей выборке:\")\n",
"print(cut_counts_train)\n",
"print(\"\\nСбалансированность в тестовой выборке:\")\n",
"print(cut_counts_test)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"После того как мы оценили сбалансированность, можем решить, нужно ли использовать методы аугментации данных. Например, если одна из категорий в 'cut' значительно меньше других, это может потребовать применения oversampling или undersampling."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество дубликатов: 0\n",
"Распределение классов в обучающей выборке:\n",
"price\n",
"605 106\n",
"802 105\n",
"789 103\n",
"544 99\n",
"828 99\n",
" ... \n",
"12690 1\n",
"12304 1\n",
"8972 1\n",
"18018 1\n",
"5634 1\n",
"Name: count, Length: 10695, dtype: int64\n",
"\n",
"Сбалансированность после oversampling:\n",
"price\n",
"12592 106\n",
"6750 106\n",
"3750 106\n",
"506 106\n",
"2583 106\n",
" ... \n",
"1189 106\n",
"1013 106\n",
"956 106\n",
"4637 106\n",
"3601 106\n",
"Name: count, Length: 6622, dtype: int64\n"
]
}
],
"source": [
"# Проверка на наличие дубликатов\n",
"duplicates = df.duplicated().sum()\n",
"print(f\"Количество дубликатов: {duplicates}\")\n",
"\n",
"# Преобразуем все категориальные данные в числовые\n",
"categorical_columns = df.select_dtypes(include=['object']).columns\n",
"df_encoded = pd.get_dummies(df, columns=categorical_columns, drop_first=True)\n",
"\n",
"# Разделение данных на обучающую и тестовую выборки\n",
"X = df_encoded.drop('price', axis=1)\n",
"y = df_encoded['price']\n",
"\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=df['cut'])\n",
"\n",
"# Проверка сбалансированности целевой переменной\n",
"class_counts = y_train.value_counts()\n",
"print(\"Распределение классов в обучающей выборке:\")\n",
"print(class_counts)\n",
"\n",
"# Фильтрация классов с недостаточным количеством образцов\n",
"# Установим минимальное количество образцов, чтобы сохранить класс\n",
"min_samples = 2\n",
"classes_to_keep = class_counts[class_counts >= min_samples].index\n",
"\n",
"X_train_filtered = X_train[y_train.isin(classes_to_keep)]\n",
"y_train_filtered = y_train[y_train.isin(classes_to_keep)]\n",
"\n",
"# Применение SMOTE или RandomOverSampler\n",
"from imblearn.over_sampling import SMOTE, RandomOverSampler\n",
"\n",
"# Используем SMOTE, если классов достаточно\n",
"if y_train_filtered.value_counts().min() > 1:\n",
" smote = SMOTE(random_state=42, k_neighbors=1)\n",
" X_resampled, y_resampled = smote.fit_resample(X_train_filtered, y_train_filtered)\n",
"else:\n",
" # Или RandomOverSampler\n",
" ros = RandomOverSampler(random_state=42)\n",
" X_resampled, y_resampled = ros.fit_resample(X_train_filtered, y_train_filtered)\n",
"\n",
"# Проверка сбалансированности после oversampling\n",
"resampled_counts = y_resampled.value_counts()\n",
"print(\"\\nСбалансированность после oversampling:\")\n",
"print(resampled_counts)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Итог произвели балансировку данных. Использовались методы oversampling (увеличение данных недопредставленных категорий) и\n",
"методы SMOTE. Произвелась аугментация данных (создавались дополительные данные из имеющихся). Использование методов, таких как SMOTE или RandomOverSampler, помогло увеличить количество экземпляров редких классов в обучающей выборке, что повысило шансы модели правильно классифицировать их. \n",
"\n",
"\n",
"### 2 Датасет: Цены на ноутбуки \n",
"Выгрузили второй датасет! (цены ноутбуки)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['Company', 'Product', 'TypeName', 'Inches', 'Ram', 'OS', 'Weight',\n",
" 'Price_euros', 'Screen', 'ScreenW', 'ScreenH', 'Touchscreen',\n",
" 'IPSpanel', 'RetinaDisplay', 'CPU_company', 'CPU_freq', 'CPU_model',\n",
" 'PrimaryStorage', 'SecondaryStorage', 'PrimaryStorageType',\n",
" 'SecondaryStorageType', 'GPU_company', 'GPU_model'],\n",
" dtype='object')\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 1275 entries, 0 to 1274\n",
"Data columns (total 23 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Company 1275 non-null object \n",
" 1 Product 1275 non-null object \n",
" 2 TypeName 1275 non-null object \n",
" 3 Inches 1275 non-null float64\n",
" 4 Ram 1275 non-null int64 \n",
" 5 OS 1275 non-null object \n",
" 6 Weight 1275 non-null float64\n",
" 7 Price_euros 1275 non-null float64\n",
" 8 Screen 1275 non-null object \n",
" 9 ScreenW 1275 non-null int64 \n",
" 10 ScreenH 1275 non-null int64 \n",
" 11 Touchscreen 1275 non-null object \n",
" 12 IPSpanel 1275 non-null object \n",
" 13 RetinaDisplay 1275 non-null object \n",
" 14 CPU_company 1275 non-null object \n",
" 15 CPU_freq 1275 non-null float64\n",
" 16 CPU_model 1275 non-null object \n",
" 17 PrimaryStorage 1275 non-null int64 \n",
" 18 SecondaryStorage 1275 non-null int64 \n",
" 19 PrimaryStorageType 1275 non-null object \n",
" 20 SecondaryStorageType 1275 non-null object \n",
" 21 GPU_company 1275 non-null object \n",
" 22 GPU_model 1275 non-null object \n",
"dtypes: float64(4), int64(5), object(14)\n",
"memory usage: 229.2+ KB\n"
]
}
],
"source": [
"df = pd.read_csv(\".//static//csv//laptop_prices.csv\")\n",
"print(df.columns)\n",
"\n",
"print()\n",
"\n",
"df.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Датасет:* Цена ноутбука. Прайс-лист компании-производителя ноутбуков для регрессии \n",
"\n",
"Kaggle предоставляет следующие данные о датасете: Компания — производитель ноутбуков, Продукт — бренд и модель, Название типа — тип (ноутбук,ультрабук, игровой и т. д.), Дюймы — размер экрана, Разрешение экрана — разрешение экрана, Процессор — центральный процессор (ЦП), Оперативная память — оперативная память ноутбука, Память — жёсткий диск / SSD-накопитель, GPU — графические процессоры (GPU), OpSys — операционная система, Вес — вес ноутбука, Цена_в_евро — цена (в евро)\n",
"\n",
"*Объекты наблюдения:* Каждый объект наблюдения в наборе данных — это конкретная модель ноутбука, представленная в прайс-листе производителя.\n",
"*Атрибуты объектов:* компания, продукт, тип, диагональ экрана ОЗУ (оперативная память), Операционная система, вес, цена, разрешение экрана, IPS-панель, модель GPU, модель процессора (CPU_model), частота процессора, производитель CPU.\n",
"\n",
"*Связи между объектами:* Взаимосвязь между характеристиками ноутбуков и их ценой. Например, цена может зависеть от типа процессора, объема памяти, разрешения экрана, а также от производителя."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"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>Company</th>\n",
" <th>Product</th>\n",
" <th>TypeName</th>\n",
" <th>Inches</th>\n",
" <th>Ram</th>\n",
" <th>OS</th>\n",
" <th>Weight</th>\n",
" <th>Price_euros</th>\n",
" <th>Screen</th>\n",
" <th>ScreenW</th>\n",
" <th>...</th>\n",
" <th>RetinaDisplay</th>\n",
" <th>CPU_company</th>\n",
" <th>CPU_freq</th>\n",
" <th>CPU_model</th>\n",
" <th>PrimaryStorage</th>\n",
" <th>SecondaryStorage</th>\n",
" <th>PrimaryStorageType</th>\n",
" <th>SecondaryStorageType</th>\n",
" <th>GPU_company</th>\n",
" <th>GPU_model</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Apple</td>\n",
" <td>MacBook Pro</td>\n",
" <td>Ultrabook</td>\n",
" <td>13.3</td>\n",
" <td>8</td>\n",
" <td>macOS</td>\n",
" <td>1.37</td>\n",
" <td>1339.69</td>\n",
" <td>Standard</td>\n",
" <td>2560</td>\n",
" <td>...</td>\n",
" <td>Yes</td>\n",
" <td>Intel</td>\n",
" <td>2.3</td>\n",
" <td>Core i5</td>\n",
" <td>128</td>\n",
" <td>0</td>\n",
" <td>SSD</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>Iris Plus Graphics 640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Apple</td>\n",
" <td>Macbook Air</td>\n",
" <td>Ultrabook</td>\n",
" <td>13.3</td>\n",
" <td>8</td>\n",
" <td>macOS</td>\n",
" <td>1.34</td>\n",
" <td>898.94</td>\n",
" <td>Standard</td>\n",
" <td>1440</td>\n",
" <td>...</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>1.8</td>\n",
" <td>Core i5</td>\n",
" <td>128</td>\n",
" <td>0</td>\n",
" <td>Flash Storage</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>HD Graphics 6000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>HP</td>\n",
" <td>250 G6</td>\n",
" <td>Notebook</td>\n",
" <td>15.6</td>\n",
" <td>8</td>\n",
" <td>No OS</td>\n",
" <td>1.86</td>\n",
" <td>575.00</td>\n",
" <td>Full HD</td>\n",
" <td>1920</td>\n",
" <td>...</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>2.5</td>\n",
" <td>Core i5 7200U</td>\n",
" <td>256</td>\n",
" <td>0</td>\n",
" <td>SSD</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>HD Graphics 620</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Apple</td>\n",
" <td>MacBook Pro</td>\n",
" <td>Ultrabook</td>\n",
" <td>15.4</td>\n",
" <td>16</td>\n",
" <td>macOS</td>\n",
" <td>1.83</td>\n",
" <td>2537.45</td>\n",
" <td>Standard</td>\n",
" <td>2880</td>\n",
" <td>...</td>\n",
" <td>Yes</td>\n",
" <td>Intel</td>\n",
" <td>2.7</td>\n",
" <td>Core i7</td>\n",
" <td>512</td>\n",
" <td>0</td>\n",
" <td>SSD</td>\n",
" <td>No</td>\n",
" <td>AMD</td>\n",
" <td>Radeon Pro 455</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Apple</td>\n",
" <td>MacBook Pro</td>\n",
" <td>Ultrabook</td>\n",
" <td>13.3</td>\n",
" <td>8</td>\n",
" <td>macOS</td>\n",
" <td>1.37</td>\n",
" <td>1803.60</td>\n",
" <td>Standard</td>\n",
" <td>2560</td>\n",
" <td>...</td>\n",
" <td>Yes</td>\n",
" <td>Intel</td>\n",
" <td>3.1</td>\n",
" <td>Core i5</td>\n",
" <td>256</td>\n",
" <td>0</td>\n",
" <td>SSD</td>\n",
" <td>No</td>\n",
" <td>Intel</td>\n",
" <td>Iris Plus Graphics 650</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 23 columns</p>\n",
"</div>"
],
"text/plain": [
" Company Product TypeName Inches Ram OS Weight Price_euros \\\n",
"0 Apple MacBook Pro Ultrabook 13.3 8 macOS 1.37 1339.69 \n",
"1 Apple Macbook Air Ultrabook 13.3 8 macOS 1.34 898.94 \n",
"2 HP 250 G6 Notebook 15.6 8 No OS 1.86 575.00 \n",
"3 Apple MacBook Pro Ultrabook 15.4 16 macOS 1.83 2537.45 \n",
"4 Apple MacBook Pro Ultrabook 13.3 8 macOS 1.37 1803.60 \n",
"\n",
" Screen ScreenW ... RetinaDisplay CPU_company CPU_freq CPU_model \\\n",
"0 Standard 2560 ... Yes Intel 2.3 Core i5 \n",
"1 Standard 1440 ... No Intel 1.8 Core i5 \n",
"2 Full HD 1920 ... No Intel 2.5 Core i5 7200U \n",
"3 Standard 2880 ... Yes Intel 2.7 Core i7 \n",
"4 Standard 2560 ... Yes Intel 3.1 Core i5 \n",
"\n",
" PrimaryStorage SecondaryStorage PrimaryStorageType SecondaryStorageType \\\n",
"0 128 0 SSD No \n",
"1 128 0 Flash Storage No \n",
"2 256 0 SSD No \n",
"3 512 0 SSD No \n",
"4 256 0 SSD No \n",
"\n",
" GPU_company GPU_model \n",
"0 Intel Iris Plus Graphics 640 \n",
"1 Intel HD Graphics 6000 \n",
"2 Intel HD Graphics 620 \n",
"3 AMD Radeon Pro 455 \n",
"4 Intel Iris Plus Graphics 650 \n",
"\n",
"[5 rows x 23 columns]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Для наглядности\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"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>Inches</th>\n",
" <th>Ram</th>\n",
" <th>Weight</th>\n",
" <th>Price_euros</th>\n",
" <th>ScreenW</th>\n",
" <th>ScreenH</th>\n",
" <th>CPU_freq</th>\n",
" <th>PrimaryStorage</th>\n",
" <th>SecondaryStorage</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" <td>1275.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>15.022902</td>\n",
" <td>8.440784</td>\n",
" <td>2.040525</td>\n",
" <td>1134.969059</td>\n",
" <td>1900.043922</td>\n",
" <td>1073.904314</td>\n",
" <td>2.302980</td>\n",
" <td>444.517647</td>\n",
" <td>176.069020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>1.429470</td>\n",
" <td>5.097809</td>\n",
" <td>0.669196</td>\n",
" <td>700.752504</td>\n",
" <td>493.346186</td>\n",
" <td>283.883940</td>\n",
" <td>0.503846</td>\n",
" <td>365.537726</td>\n",
" <td>415.960655</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>10.100000</td>\n",
" <td>2.000000</td>\n",
" <td>0.690000</td>\n",
" <td>174.000000</td>\n",
" <td>1366.000000</td>\n",
" <td>768.000000</td>\n",
" <td>0.900000</td>\n",
" <td>8.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>14.000000</td>\n",
" <td>4.000000</td>\n",
" <td>1.500000</td>\n",
" <td>609.000000</td>\n",
" <td>1920.000000</td>\n",
" <td>1080.000000</td>\n",
" <td>2.000000</td>\n",
" <td>256.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>15.600000</td>\n",
" <td>8.000000</td>\n",
" <td>2.040000</td>\n",
" <td>989.000000</td>\n",
" <td>1920.000000</td>\n",
" <td>1080.000000</td>\n",
" <td>2.500000</td>\n",
" <td>256.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>15.600000</td>\n",
" <td>8.000000</td>\n",
" <td>2.310000</td>\n",
" <td>1496.500000</td>\n",
" <td>1920.000000</td>\n",
" <td>1080.000000</td>\n",
" <td>2.700000</td>\n",
" <td>512.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>18.400000</td>\n",
" <td>64.000000</td>\n",
" <td>4.700000</td>\n",
" <td>6099.000000</td>\n",
" <td>3840.000000</td>\n",
" <td>2160.000000</td>\n",
" <td>3.600000</td>\n",
" <td>2048.000000</td>\n",
" <td>2048.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Inches Ram Weight Price_euros ScreenW \\\n",
"count 1275.000000 1275.000000 1275.000000 1275.000000 1275.000000 \n",
"mean 15.022902 8.440784 2.040525 1134.969059 1900.043922 \n",
"std 1.429470 5.097809 0.669196 700.752504 493.346186 \n",
"min 10.100000 2.000000 0.690000 174.000000 1366.000000 \n",
"25% 14.000000 4.000000 1.500000 609.000000 1920.000000 \n",
"50% 15.600000 8.000000 2.040000 989.000000 1920.000000 \n",
"75% 15.600000 8.000000 2.310000 1496.500000 1920.000000 \n",
"max 18.400000 64.000000 4.700000 6099.000000 3840.000000 \n",
"\n",
" ScreenH CPU_freq PrimaryStorage SecondaryStorage \n",
"count 1275.000000 1275.000000 1275.000000 1275.000000 \n",
"mean 1073.904314 2.302980 444.517647 176.069020 \n",
"std 283.883940 0.503846 365.537726 415.960655 \n",
"min 768.000000 0.900000 8.000000 0.000000 \n",
"25% 1080.000000 2.000000 256.000000 0.000000 \n",
"50% 1080.000000 2.500000 256.000000 0.000000 \n",
"75% 1080.000000 2.700000 512.000000 0.000000 \n",
"max 2160.000000 3.600000 2048.000000 2048.000000 "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Описание данных (основные статистические показатели)\n",
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Company 0\n",
"Product 0\n",
"TypeName 0\n",
"Inches 0\n",
"Ram 0\n",
"OS 0\n",
"Weight 0\n",
"Price_euros 0\n",
"Screen 0\n",
"ScreenW 0\n",
"ScreenH 0\n",
"Touchscreen 0\n",
"IPSpanel 0\n",
"RetinaDisplay 0\n",
"CPU_company 0\n",
"CPU_freq 0\n",
"CPU_model 0\n",
"PrimaryStorage 0\n",
"SecondaryStorage 0\n",
"PrimaryStorageType 0\n",
"SecondaryStorageType 0\n",
"GPU_company 0\n",
"GPU_model 0\n",
"dtype: int64"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Процент пропущенных значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" if null_rate > 0:\n",
" print(f'{i} Процент пустых значений: %{null_rate:.2f}')\n",
"\n",
"# Проверка на пропущенные данные\n",
"df.isnull().sum()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Company False\n",
"Product False\n",
"TypeName False\n",
"Inches False\n",
"Ram False\n",
"OS False\n",
"Weight False\n",
"Price_euros False\n",
"Screen False\n",
"ScreenW False\n",
"ScreenH False\n",
"Touchscreen False\n",
"IPSpanel False\n",
"RetinaDisplay False\n",
"CPU_company False\n",
"CPU_freq False\n",
"CPU_model False\n",
"PrimaryStorage False\n",
"SecondaryStorage False\n",
"PrimaryStorageType False\n",
"SecondaryStorageType False\n",
"GPU_company False\n",
"GPU_model False\n",
"dtype: bool"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.isnull().any()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Пропущенных данных в колонках нет :)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Бизнес-цель\n",
"1. Оптимизация ценообразования \n",
"Использование данных для построения модели прогнозирования цены ноутбуков на основе характеристик. Эффект: Повышение продаж за счет правильного позиционирования товаров в разных ценовых сегментах.\n",
"2. Анализ рынка и планирование производства \n",
"Определение наиболее популярных и прибыльных конфигураций ноутбуков на основе данных о характеристиках и продажах. Эффект: Снижение издержек на производство непопулярных моделей и повышение прибыльности.\n",
"\n",
"### Техническая цель\n",
"1. Прогнозирование цены ноутбуков \n",
"Создать модель машинного обучения, которая на вход получает характеристики ноутбука (ОЗУ, CPU, объём памяти, экран и т.д.) и предсказывает его цену. \n",
"На вход поступают характеристики, а целевой признак - цена ноутбука. \n",
"2. Классификация сегмента ноутбука \n",
"Создать модель для предсказания ценового сегмента в зависимости от их характеристик. На вход поступают характеристики ноутбука, а целевой признак - определение ценового сегмента (бюджетный, средний, премиум)."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAx8AAAIjCAYAAABia6bHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABB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dMcPXrUo6zT6XT/v0OHDqZp06bmzJkzHutvuukmU69evQL7k9OePXuMj4+PeeGFFzyWb9q0yfj6+nosz2/827Zta9q2bZurT+f2NzMz04SFhZkmTZqY06dPu5cvXLjQSDLjxo0zxhhz9OhRI8m8/PLLReqDw+EwDz30UJHKArgw3HYFlLApU6YoISFBCQkJmjFjhtq3b6/7779fn376qbvM119/LR8fHz3yyCMe244aNUrGGI/ZscaPH6/GjRtrwIABGjZsmNq2bZtrO5ectx25bkPKzMzUsmXL8iyfnZ2tpUuXqlevXoqOjnYvj4yMVN++ffXtt9+6b4s4X2fOnCny/euZmZny9/cvsMyJEyckSVddddUFtaswCQkJSk9PV58+fXT48GH3l4+Pj1q2bKkVK1bk2iZnucOHD7vbeq7s7Gx3mczMzAtqp+tKm+vryJEjufZV1DHu3bu3AgICNHPmTHe5JUuW6PDhwx5X7opj0KBBHmNVr1493X777Vq8eLH7tsH+/fsrIyPD43a4//73v8rKyspzv7t371a3bt0UExOjjz/+2OOZgd9
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1UAAALOCAYAAABBKTnyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeZxO9f//8ec1+zCbYcbMMBg7IUtIZMmWJSqULYRIJLSgsrYgKQlpsbSQIhFKlmxl37N+LDPIvs5Yh5l5//7wva6fa65lmEuWPO6329y4zvuc9/t9znmfc67Xdc55vy3GGCMAAAAAQKZ43ekKAAAAAMC9jKAKAAAAADxAUAUAAAAAHiCoAgAAAAAPEFQBAAAAgAcIqgAAAADAAwRVAAAAAOABgioAAAAA8ABBFQAAwHXS0tJ08uRJ7du3705XBcA9gqAKAADc944ePaoePXoob9688vPzU0REh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YPv/8c1WrVk3bt29XTEyMJCk1NVUNGzbUokWL1Lx5c73yyis6d+6cFixYoK1bt6pAgQK2Mlq0aKH69evbldu3b1+n9XnvvfdksVjUu3dvHT9+XCNHjlStWrW0adMmBQYGSpL++OMP1atXT+XKldOAAQPk5eWliRMn6rHHHtPy5ctVoUIFh3xz586tIUOGSJLOnz+vLl26OC27X79+euaZZ9SxY0edOHFCn376qapWraqNGzcqLCzMYZlOnTrp0UcflSTNmDFDP//8s116586dbe+zde/eXfHx8Ro9erQ2btyov/76S76+vk63w804e/asbd2ul5aWpkaNGunPP/9Up06dVKxYMf3999/6+OOP9b///U8zZ87MMO/rt5vVr7/+qu+//95h3t27d+vZZ5/Viy++qLZt22rixIlq1qyZ5s2bp9q1a0uSjh07pkceeUQXL15U9+7dlT17dn399ddq1KiRpk+frqeeeipT2+Dbb79V27ZtVbduXQ0bNkwXL17UZ599pipVqmjjxo3Kly+fJGnLli169NFH5evrq06dOilfvnzau3evZs+erffee0+SdPjwYVWoUEFnz55Vp06dVLRoUR06dEjTp0/XxYsX5efnd9PrcSPt2tpOypcvryFDhujYsWP65JNP9Ndffzm0vxw5cujjjz+WJP3zzz/65JNPVL9+fR08eNBpO82MG6lP06ZN1bVrV02ePFllypSxW37y5MmqXr26cuXKpbfeeksdO3aUJJ08eVI9e/a0O3asTp06pcuXL6tLly567LHH9OKLL2rv3r0aM2aMVq9erdWrV8vf31/PPfecBg8erB9++EHdunWzLX/lyhVNnz5dTZo0UUBAgNP1GjBggMaPH68ffvjB7keIgQMHatCgQapVq5a6dOmiXbt26bPPPtPatWsdjtWiRYvqrbfekjFGe/fu1UcffaT69evrwIEDnm52ALeCAYB/ycSJE40ks3DhQnPixAlz8OBBM3XqVJM9e3YTGBho/vnnH2OMMZcvXzapqal2y8bHxxt/f38zePBg27QJEyYYSeajjz5yKCstLc22nCQzfPhwh3keeOABU61aNdvnxYsXG0kmV65cJikpyTb9xx9/NJLMJ598Ysu7UKFCpm7durZyjDHm4sWLJi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gnbu4fO5rvZ9cioXa9bt07Hjx/XSy+9ZNdWGzRooKJFizo8Vmgdu+nkyZPatGmTvvnmG0VHR6tYsWI3tM3St7Nz587Zpd9Mfdq0aaPDhw/btafJkycrMDBQTZo0uaH6pNerVy95e3vbPj/33HPKmTOnQ7mrV6+23W23lhsbG6tq1ao55Dlr1iy99NJLev311+3ubknSwoULdeXKFfXo0cN2/pO
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Визуализация выбросов для столбца Price_euros\n",
"plt.figure(figsize=(10, 6))\n",
"sns.boxplot(x=df['Price_euros'])\n",
"plt.title('Boxplot для цены ноутбуков (Price_euros)')\n",
"plt.show()\n",
"\n",
"\n",
"# Визуализация распределения моделей процессоров\n",
"plt.figure(figsize=(10, 6))\n",
"df['CPU_model'].value_counts().plot(kind='bar')\n",
"plt.title('Распределение процессоров ноутбуков')\n",
"plt.xlabel('Модель процессора')\n",
"plt.ylabel('Количество')\n",
"plt.xticks(rotation=90)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Проблема наборов \n",
"\n",
"**Зашумленность данных** — это наличие ненужной информации, ошибок или неверных значений, которые могут исказить анализ.\n",
"Например, в поле OS могут быть пробелы или некорректные названия операционных систем (например, \"No OS\", \"Windows\", \"Windows 10\").\n",
"\n",
"**Смещение данных** может возникнуть, если данные отражают предпочтения определённого производителя или сегмента. Если в данных преобладает один бренд (например, Apple), это может сместить модель в сторону этого производителя.\n",
"\n",
"**Актуальность данных** - неактуальные данные могут влиять на точность прогнозирования. Ноутбуки устаревают быстро, поэтому информация о старых моделях может быть неактуальной для анализа современных трендов.\n",
"\n",
"**Выбросы** — это значения, которые значительно отличаются от большинства данных. Поле Price_euros может содержать аномально высокие или низкие цены, которые не соответствуют реальности.\n",
"\n",
"**Просачивание данных** - это когда информация из тестовой выборки \"просачивается\" в обучение, что даёт модели несправедливое преимущество.\n",
"\n",
"Решение: Очистить данные, убрать пробелы, проверить на корректность. Чётко разделить данные для обучения и тестирования, исключить целевые признаки из обучения. Уравнять количество данных для разных производителей или использовать методы балансировки.\n",
"\n",
"Для устранения смещения применим рэсемплинг данных, либо же балансировку."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1UAAAJSCAYAAAArje/KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACb0UlEQVR4nOzdd3yN9///8dcJETOJICJGxJbYOzVrE3vVKkVLjdYuaSk6pKoDtT4dVlulds3WXrX3rr03SQgZktfvD79zfXMklFwnyVGP++2WG7nOlXO9zrrO9bze47KoqgoAAAAAIFGcUroAAAAAAHiZEaoAAAAAwARCFQAAAACYQKgCAAAAABMIVQAAAABgAqEKAAAAAEwgVAEAAACACYQqAAAAADCBUAUAAAAAJhCqAABwIKNHj5bY2FgREYmNjZXg4OAUrggA8G8IVQCe24wZM8RisRg/adOmlUKFCkmfPn3k+vXrKV0e8J8wc+ZM+eqrr+TSpUvy9ddfy8yZM1O6JADAv0id0gUAePl88skn4uvrKxEREbJlyxaZMmWKrFixQg4fPizp06dP6fKAl9onn3winTp1kiFDhoiLi4v88ssvKV0SAOBfEKoAvLAGDRpIuXLlRETk7bfflixZssg333wjS5YskXbt2qVwdcDL7Y033pDXX39dTp06JQULFpRs2bKldEkAgH9B9z8AptWsWVNERM6ePSsiInfu3JFBgwZJ8eLFJWPGjOLq6ioNGjSQAwcOxPvbiIgIGTlypBQqVEjSpk0rOXLkkBYtWsjp06dFROTcuXM2XQ6f/KlRo4ZxXxs2bBCLxSJz586VDz/8ULy8vCRDhgzSpEkTuXjxYrxt79ixQ+rXry9ubm6SPn16qV69umzdujXBx1ijRo0Etz9y5Mh46/7yyy9StmxZSZcunXh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EBVn/8z8ejRI/X19VUfHx+9e/euzbpxP6NPWr16tYqIzX7FWlu7du20UaNGxvLz58+rk5OTtmvXTkVEb968adz2Ip8dVdUffvhBRUTPnz9vLIv7Xld9sdfT+r5+0rx581REdP369Tbb8ff3f+pzohr/fayqWq9ePc2XL98z/w5A4tH9D8ALq127tmTLlk1y584tbdu2lYwZM8qiRYskZ86cIvL4LLmT0+PdS0xMjNy+fVsyZswohQsXlr179xr3s2DBAsmaNau899578baRUJeb59WpUyfJlCmT8XurVq0kR44csmLFChER2b9/v5w8eVLat28vt2/fllu3bsmtW7ckPDxcatWqJZs2bTKmtLaKiIh4aiuI1cKFCyU2NlbatGlj3OetW7fEy8tLChYsKOvXr7dZPyoqSkQeP19PM2/ePHFzc5M6derY3GfZsmUlY8aM8e4zOjraZr1bt24leFY+rsuXL8t3330nw4cPj9cFad68eVK0aFEpUqSIzX1au3w+uf2n2blzp7Rp00ZatmwpY8eOtblt9+7dcuPGDenVq5fNcxwYGChFihSR5cuXx7u/rl27yuzZs40uiNOnT5cWLVqIm5vbc9XzNHFbO+7evSuhoaFStWpVm/etVURERLzn+snuZk/as2ePzJs3T4KDg43PyNNMmjRJbt++LSNGjHihx/A879U1a9ZIVFSU9OvXz6aOd955R1xdXRN8zhPyZKuH9bNs/aw972di3759cvbsWenXr1+81ty4+4In39+lSpWScuXKybx58+LV1rVrV1m1apVcu3ZNRB7PqhgQECCFChV6rsf2LM/z2X3S87yeT76fnuza+Lzivo9DQ0Pl1q1bUr16dTlz5oyEhoYm6j4BPBvd/wC8sEmTJkmhQoUkderUkj17dilcuLDNgVlsbKy
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1kAAAJSCAYAAAAxsQ9EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8h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8382nv1uxPb3uqKr+8ssvKiK6devWBN8HvO5oLgjA4O/vLzly5JB8+fJJmzZtJFOmTLJ06VLJkyePiIg4OjqKg8OTzUZ0dLTcvn1bMmXKJEWLFrVpZrN48WLJnj27/O9//4szj5c56tmxY0fJnDmz8bxFixaSO3duWblypYiIHDp0SE6fPi3t2rWT27dvy61bt+TWrVsSHh4utWvXlq1btxpdaFtFREQkeJbEasmSJRITEyOtWrUypnnr1i1xdXWVwoULy6ZNm2zGj4qKEpEnn1dCFi5cKM7OzlKnTh2baXp7e0umTJniTPPRo0c24926deuZR9FFRC5fvixfffWVDB8+PE5Tu4ULF0rx4sWlWLFiNtO0NhF9ev4J2bNnj7Rq1UrefPNNGT9+vM1r+/btkxs3bkjv3r1tPuOGDRtKsWLFZMWKFXGm16VLF5k7d67RZHHmzJnSvHlzcXZ2fq56EmI90ykicvfuXbl3755UrVo1TvMwkSffiac/60ePHj1z+vv375eFCxdKcHCwsY4kZOrUqXL79m0ZOXJk4hYmAdHR0bJ27VoJDAyUAgUKGMNz584t7dq1k+3bt0toaKiIPFlHy5QpE+8ZpqfX0aioqGd+l+/cuSMbN26
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Балансировка данных. Визуализация до ресэмплинга\n",
"plt.figure(figsize=(10, 6))\n",
"df['Company'].value_counts().plot(kind='bar', color='blue')\n",
"plt.title('Распределение компаний до ресэмплинга')\n",
"plt.xlabel('Компания')\n",
"plt.ylabel('Количество')\n",
"plt.xticks(rotation=45)\n",
"plt.show()\n",
"\n",
"# Пример ресэмплинга\n",
"brand_counts = df['Company'].value_counts()\n",
"min_count = brand_counts.min()\n",
"balanced_data = pd.concat([df[df['Company'] == brand].sample(min_count) for brand in brand_counts.index])\n",
"\n",
"# Визуализация после ресэмплинга\n",
"plt.figure(figsize=(10, 6))\n",
"balanced_data['Company'].value_counts().plot(kind='bar', color='green')\n",
"plt.title('Распределение компаний после ресэмплинга')\n",
"plt.xlabel('Компания')\n",
"plt.ylabel('Количество')\n",
"plt.xticks(rotation=45)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Рэсемплинг данных позволил нам изменить размер выборки, чтобы достичь более сбалансированного распределения классов, чтобы повысить общую эффективность анализа данных. Устанили перекос (дисбаланс) данных и добились более равномерное распределение компаний (брендов) ноутбуков."
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество выявленных выбросов: 101\n",
"Количество записей после удаления выбросов: 1174\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA7oAAAIjCAYAAAAtGmdSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABDKklEQVR4nO3deZxWZd0/8O/MwMywOCD7IgKyuCCgoRhuaKBImlgKpjzuCi6k/korM0Mtsx6fxywllxa0R4tUVMzccF8CURNRUUQYNVF2WZV1zu8PXnPHMAOMxDB48X6/XvPS+5zrnPM9133dN/OZs+VlWZYFAAAAJCK/tgsAAACArUnQBQAAICmCLgAAAEkRdAEAAEiKoAsAAEBSBF0AAACSIugCAACQFEEXAACApAi6AACbUVZWFvPnz4+ZM2fWdikAVIOgCwBfUIcOHeL000+v7TKoYbNnz46LL7442rdvH4WFhdG8efPYa6+9YsmSJbVdGgCbIegCX2q333575OXl5X6Ki4uja9euMWLEiJgzZ05tl8d26PTTT68wZkpKSqJnz57xv//7v7Fy5craLo/txHvvvRf7779/jBkzJoYPHx4PPfRQjB8/Pp588slo0KBBbZcHwGbUqe0CALaGq6++Ojp27BgrVqyIF154IW6++eZ4+OGH480334z69evXdnlsZ4qKiuL3v/99REQsWrQoxo4dG5dcckm8/PLLMWbMmM0uP23atMjP97filA0fPjwKCwtj4sSJ0bZt29ou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RRfF0qVLY/z48fHmm29Gp06dcts46aST4utf/3qF7V522WVV1nPNNddEXl5e/OAHP4i5c+fGDTfcEP3794/Jkyfnjpg99dRTMXDgwOjVq1eMHDky8vPzc7/MPv/889G7d+9K691ll13i2muvjYiIZcuWxXnnnVfltq+44ooYMmRInH322TFv3ry48cYb49BDD43XXnstGjduXGmZYcOGxSGHHBIREffdd1/cf//9FeYPHz48br/99jjjjDPiwgsvjNLS0rjpppvitddeixdffDHq1q1bZT98EYsWLcrt2/rKysri2GOPjRdeeCGGDRsWe+65Z7zxxhvxq1/9Kt5999144IEHtmh7G46ZiHWnKJ900kkxfPjwOOecc2L33Xevctlly5bFIYccEm+//XaceeaZ8ZWvfCXmz58fDz74YHz00UfRrFmzrVr3W2+9FQcddFC0bds2fvjDH0aDBg3i7rvvjuOOOy7Gjh0b3/zmN7eoD6ra3zlz5sSBBx4Yn332WVx44YXRtGnTuOOOO+LYY4+Ne++9N7et3/3ud3HhhRfGCSecEBdddFGsWLEipkyZEi+99FKcfPLJG93mF/nMVeWQQw6JYcOGRVlZWbz55ptxww03xMcffxzPP//8FvVBRMSCBQtixYoVcd5558XXvva1OPfcc2PGjBkxatSoeOmll+Kll16qcFT/008/ja9//esxZMiQOOmkk+Luu++O8847LwoLC+PMM8+MiIjPP/88DjvssHjvvfdixIgR0bFjx7jnnnvi9NNPj0WLFsVFF12UW99ZZ50Vt99+ewwcODDOPvvsWLNmTTz//PMxceLE3JkrN998c3Tr1i2OPfbYqFOnTvztb3+L888/P8rKyuKCCy6osD/FxcVx1113xXXXXZf7bH700Ufx5JNPRnFx8Wb747nnnouHH354i/sToFZkAF9io0ePziIie+KJJ7J58+Zl//rXv7IxY8ZkTZs2zerVq5d99NFHWZZl2YoVK7K1a9dWWLa0tDQrKirKrr766ty0P/7xj1lEZNdff32lbZWVleWWi4jsuuuuq9SmW7duWd++fXOvn3766SwisrZt22ZLlizJTb/77ruziMh+/etf59bdpUuXbMCAAbntZFmWffbZZ1nHjh2zI444otK2DjzwwGzvvffOvZ43b14WEdnIkSNz095///2soKAgu+aaayos+8Ybb2R16tSpNH369OlZRGR33HFHbtrIkSOz9f+5eP7557OIyO66664Kyz766KOVprdv3z47+uijK9V+wQUXZBv+E7Rh7d///vezFi1aZL169arQp//3f/+X5efnZ88//3yF5W+55ZYsIrIXX3yx0vbWd9ppp2UNGjTI5s2bl82bNy977733sp///OdZXl5e1qNHjwq1R0T26KOPVlpH+/bts9NOOy33+ic/+UkWEdl9991XqW35+/mf1r2+fv36Zd27d89WrFhRYTsHHnhg1qVLl9y0Dd+7cuWfm9LS0s3u78UXX5xFRIW6ly5dmnXs2DHr0KFD7nM1aNCgrFu3btXeh3LV+cxtzIbvQ5Zl2cknn5zVr18/93pTn9dyG/ZT+et+/fpla9asyU0v77cbb7wxN61v375ZRGT/+7//m5u2cuXKbJ999slatGiRrVq1KsuyLLvhhhuyiMjuvPPOXLtVq1Zlffr0yRo2bJj7fnjqqaeyiMguvPDCTfbHZ599Vmn+gAEDst12263CtPbt22dHHHFE1qxZs+zee+/NTf/pT3+aHXjggZU+o+XfWU8//XRu2gEHHJANHDiw0mcUYHvm1GUgCf3794/mzZtHu3bt4tvf/nY0bNgw7r///tz1dUVFRbmbB61duzYWLFgQDRs2jN133z3++c9/5tYzduzYaNasWXznO9+ptI2qTgGtrlNPPTV22mmn3OsTTjghWrdunTtKMnny5Jg+fXqcfPLJsWDBgpg/f37Mnz8/li9fHv369YvnnnsuysrKKqxzxYoVmz0ac99990VZWVkMGTIkt8758+dHq1atokuXLvH0009XaL9q1aqIiE1eg3rPPfdEo0aN4ogjjqiwzl69ekXDhg0rrXP16tUV2s2fPz9WrFixybpnzZoVN954Y1xxxRXRsGHDStvfc889Y4899qiwzvLT1TfcflWWL18ezZs3j+bNm0fnzp3jRz/6UfTp06fSkeuOHTvGgAE
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANS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HjlGzZs3YZJNN4ogjjqh0/cvbtiWVlZXF1VdfHR06dIgaNWpEo0aN4pRTTokvvviiaL4tttgi9ttvvwrrGTBgQIVlVjb2K664osJtGhHxzTffxODBg6NNmzZRWloazZs3j3POOWeVDz2uUqVKYR1Tp04tGvsTTzwRO++8c9SsWTNuvvnmwrSlP6M7e/bsOOOMM2KLLbaI0tLSaNasWRx77LExc+bMNTLud955Jw455JDYZJNNokaNGrHzzjvHI488UjTPhRdeWOF2jvjfQ/7Lt3VF2/v+++/HoYceGptssklsuOGGsdtuu8U//vGPCsv94x//GB06dIgNN9wwNt5449h5553jv//7v5e7HeX7yLJ+lr6dV3YsK9qPl76NVrTejz/+OE488cRo1KhRlJaWRocOHeLWW29d7rZFRHTr1i223377Sqe1b98+evbsWXTZ0h/HKP9Z+hDZN954I44//vho1apV1KhRIxo3bhwnnnhizJo1q9J1bbHFFpUud8yYMUXzPf7449GlS5eoVatWbLTRRtGnT594++23i+Y5/vjjo3bt2hXW8cADD1RY5l577VVh/x03blyljytffvllnHnmmdGqVauoVq1a0TiX3I8qs/TjYYMGDaJPnz7x1ltvFc1XUlISAwYMWOZylt43xo0bF2VlZbFw4cLYeeedo0aNGlG/fv048sgj48MPP6z0dnn//fejZ8+eUatWrWjSpEkMHTo0UkpF886fPz/OPPPMaN68eZSWlkb79u3jv/7rvyrMF/Hd4/euu+5a2K+6du0aTz75ZNE8N9xwQ3To0CFKS0ujSZMm0b9//5g9e/Yq3UbAj493dGE9Uv5ktn79+hHx3ZPjhx56KA499NBo2bJlTJs2LW6++ebo1q1bjB8/vvAO3uLFi2O//faLp556Ko444oj41a9+FfPmzYuRI0fGW2+9Fa1bty6s48gjj4yf/vSnResdNGhQpeO56KKLoqSkJM4999yYPn16XH311dG9e/d47bXXCu+YPf3009G7d+/o2LFjDB48OKpUqRK33XZb/OQnP4nnnnsudt111wrLbdasWVxyySUR8d2TxFNPPbXSdZ9//vlx2GGHxcknnxwzZsyIP/7xj9G1a9d49dVXo169ehWu069fv+jSpUtERPztb3+LBx98sGj6KaecEsOGDYsTTjghBg4cGFOmTInrrrsuXn311XjhhReiWrVqld4O38fs2bML27aksrKy2H///eP555+Pfv36xVZbbRVvvvlmXHXVVfHuu+/GQw89tErrW/o+E/HdIcpHHnlknHLKKdG3b99o3759pdf98ssvo0uXLjFhwoQ48cQTY6eddoqZM2fGI488Eh999FE0aNBgtY777bffjs6dO0fTpk3j17/+ddSqVSvuu+++OPDAA2P48OHx85//fJVug8q2d9q0abHHHnvEV199FQMHDoz69evH7bffHvvvv3888MADhXX96U9/ioEDB8YhhxwSv/rVr2LBggXxxhtvxIsvvhhHHXXUCtc9cODA2GWXXYouO/nkk4t+X9mxfJ/9uNxf//rXwv+fccYZFda72267FSKpYcOG8fjjj8dJJ50Uc+fOjdNPP32Z23XMMcdE375946233optttmmcPm4cePi3Xffjd/+9reVXq/84xgREX/4wx8qvIg0cuTIeP/99+OEE06Ixo0bx9tvvx233HJLvP322/E///M/lb7A0aVLl+jXr19EREyYMCEuvvjiCrfBcccdFz179ozLLrssvvrqq7jxxhtjzz33jFdffXW1fR713HPPrfTys88+O2666aY46aSTonPnzlGtWrVKH3+WZcstt4zzzjsvUkoxefLkuPLKK+OnP/1phSD9PspfOBgwYEB07NgxLr300pgxY0Zce+218fzzz8err74aDRo0KMy/ePHi6NWrV+y2225x+eWXx4gRI2Lw4MHx7bffxtChQyPiu6Ml9t9//xg9enScdNJJscMOO8QTTzwRZ599dnz88cdx1VVXFZY3ZMiQuPDCC2OPPfaIoUOHRvXq1ePFF1+Mp59+Onr06BER371YM2TIkOjevXuceuqpMXHixLjxxhtj3LhxFR6P18RtBKwDEpCd2267LUVEGjVqVJoxY0b697//ne65555Uv379VLNmzfTRRx+llFJasGBBWrx4cdF1p0yZkkpLS9PQoUMLl916660pItKVV15ZYV1lZWWF60VEuuKKKyrM06FDh9StW7fC76NHj04RkZo2bZrmzp1buPy+++5LEZGuueaawrLbtm2bevbsWVhPSil99dVXqWXLlmnfffetsK499tgjbbPNNoXfZ8yYkSIiDR48uHDZ1KlTU9WqVdNFF11UdN0333wzbbDBBhUunzRpUoqIdPvttxcuGzx4cFryIfS5555LEZHuuuuuouuOGDGiwuUtWrRIffr0qTD2/v37p6Uflpce+znnnJM23XTT1LFjx6Lb9K9//WuqUqVKeu6554quf9NNN6WISC+88EKF9S3puOOOS7Vq1UozZsxIM2bMSO+99166+OKLU0lJSdpuu+2Kxh4RacSIERWW0aJFi3TccccVfr/gggtSRKS//e1vFeYt/3v+X8e9pH322Sdtu+22acGCBUXr2WOPPVLbtm0Lly39tytXvt9MmTJlhdt7+umnp4goGve8efNSy5Yt0xZbbFHYrw444IDUoUOHld6GcuX7yP33319hWq1atYpu55Udy8rsx+XOO++8VFJSUnTZ0n/fk046KW222WZp5syZRfMdccQRqW7duumrr75a5vbNnj071ahRI5177rlFlw8cODDVqlUrffnll0WX33LLLSki0ssvv1y4rE+fPqlFixZF81W2zrvvvjtFRHr22WcrTGvatGk64YQTCr+X3+6jR49OKX13O9arVy/17du36HqfffZZqlu3btH
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"\n",
"# Вычисление медианы для 'Price_euros'\n",
"median_price = df['Price_euros'].median()\n",
"\n",
"# Вычисление абсолютных отклонений от медианы\n",
"df['absolute_deviation'] = np.abs(df['Price_euros'] - median_price)\n",
"\n",
"# Вычисление медианного абсолютного отклонения (MAD)\n",
"mad = df['absolute_deviation'].median()\n",
"\n",
"# Определение порога для выбросов. Вы можете настроить множитель в зависимости от ваших предпочтений\n",
"threshold = 3 * mad\n",
"\n",
"# Выявление выбросов\n",
"outliers = df[df['absolute_deviation'] > threshold]\n",
"\n",
"# Удаление выбросов из набора данных\n",
"datalaptop_cleaned = df[df['absolute_deviation'] <= threshold].drop(columns=['absolute_deviation'])\n",
"\n",
"# Вывод количества найденных выбросов и оставшихся записей\n",
"print(f\"Количество выявленных выбросов: {len(outliers)}\")\n",
"print(f\"Количество записей после удаления выбросов: {len(datalaptop_cleaned)}\")\n",
"\n",
"# Визуализация результатов\n",
"plt.figure(figsize=(12, 6))\n",
"sns.boxplot(x=df['Price_euros'])\n",
"plt.title('Распределение Price_euros с выбросами')\n",
"plt.show()\n",
"\n",
"plt.figure(figsize=(12, 6))\n",
"sns.boxplot(x=datalaptop_cleaned['Price_euros'])\n",
"plt.title('Распределение Price_euros после удаления выбросов')\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Медиальный способ борьбы с выбросами позволяет сохранить структуру даныых, создать устойчивость к этим выбросать, чтобы избежать смещения данных, если использовали бы среднее. Если имеются товары с высоко аномальной ценой, то замена на медиану позволит сократить влияние на данные. Удаление выбросов вдобавок и решает проблему зашумлённости данных. Выбросы - это одна из форм шума и удаление их позволяеи сделать данные чище и менее зашумлённые."
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Размер обучающей выборки: 765\n",
"Размер валидационной выборки: 255\n",
"Размер тестовой выборки: 255\n",
"Company float64\n",
"Product float64\n",
"TypeName float64\n",
"Inches float64\n",
"Ram int64\n",
"OS float64\n",
"Weight float64\n",
"Screen float64\n",
"ScreenW int64\n",
"ScreenH int64\n",
"Touchscreen float64\n",
"IPSpanel float64\n",
"RetinaDisplay float64\n",
"CPU_company float64\n",
"CPU_freq float64\n",
"CPU_model float64\n",
"PrimaryStorage int64\n",
"SecondaryStorage int64\n",
"PrimaryStorageType float64\n",
"SecondaryStorageType float64\n",
"GPU_company float64\n",
"GPU_model float64\n",
"dtype: object\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1IAAAIjCAYAAAAJLyrXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6d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wv4nhw4fr4sWLeWpcsGBBnvrd3d1tlnOznxmX57l+/Xpr2+nTpxUSEqJGjRopKSlJkpSRkaE33nhDYWFh8vLykpubm1q1aqV169bd8L29/D5c7/29UlZWlt566y1VqVJFzs7OCgkJ0SuvvJLv9vHLL7+oTZs28vDwkKenpxo3bqw5c+bYjFPYnwvXcqO/vQULFshisSgiIiLPtFOnTpXFYtGePXusbQcOHNDDDz8sHx8fubi4qFGjRlq2bJnNdJf/FiMiIjRy5Ej5+vqqQoUKkqTExEQ988wzCgkJkbOzs3x9fdWpUydt377dOv1vv/2mRx55RBUrVrT+3T377LNKTU21Wc6gQYPk7u6u6OhodevWTe7u7ipfvrwmTZokSdq9e7fat28vNzc3BQcH51kHZraZq+V3jtTlek6dOqUePXrI3d1d5cqV0/PPP6/s7Gyb6S9cuKDHHntMnp6e8vb21sCBA7Vz507Ou0KR4IgUcBtcDj1lypSRJP39999asmSJHnnkEVWqVEmxsbGaOnWq2rRpo3379ikwMFCSlJ2drW7dumnNmjXq06eP/v3vfysxMVGrVq3Snj17VKVKFesy+vbtq/vvv99muWPHjs23nv/85z+yWCx66aWXdPbsWX366afq2LGjIiMj5erqKin3R0R4eLjCwsI0btw42dnZafr06Wrfvr1+++03NWnSJM98K1SooIkTJ0qSkpKSNGLEiHyX/frrr6t379568sknde7cOX3++edq3bq1duzYIW9v7zzTDB06VK1atZIkLVq0SIsXL7YZPmzYMM2YMUOPP/64nn76aUVFRemLL77Qjh079PvvvxdKF5K4uDjra7tSTk6OHnjgAW3cuFFDhw5VrVq1tHv3bn3yySc6dOiQlixZ8o+XfVlKSoratGmjU6dOadiwYapYsaL++OMPjR07VmfOnNGnn36a73Tfffed9f/PPvuszbDY2Fjde++9slgsGj16tMqVK6dffvlFgwcPVkJCgp555hmb8V955RXVqlVLqamp1kDu6+urwYMHS5L27t2rVq1aydPTUy+++KIcHR01depUtW3bVhEREWratKnN/C53g72Sj4+PJGn16tUKDw9X5cqVNX78eKWmpurzzz9XixYttH37d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3t7eiI6Otml/9dVXDYvFYtMWHBxsDBw40Pp88ODBRkBAgHH+/Hmb8fr06WN4eXkZKSkphmH839/OunXrrOOkpaUZdnZ2xsiRI61tPXr0MJycnIyjR49a206fPm14eHgYrVu3trZd3la2bNlyjXfGMOrXr2/4+voaFy5csLbt3LnTsLOzMwYMGHDN6a6sd/78+XmGubm52bwHl2sJCwszMjIyrO3vv/++IclYunSpte3q9+/LL780nJ2djXbt2hnBwcHXrWnkyJGGu7t7gWq82c+MK9dTWlqa0bZtW8PX19c4cuSIzbRZWVlGenq6TdulS5cMPz8/44knnrju6zCMm9+WIiMjDUnGk08+aTPe888/b0gy1q5daxiGYcTFxRkeHh5G06ZNjdTUVJtxr/wMMozC/1zIz83+7fXt29fw9fU1srKyrG1nzpwx7OzsbNZLhw4djNDQUCMtLc3mdTVv3tyoVq2ate3y32LLli1t5mkYhuHl5WWMGjXqunVf3l6vNHHiRMNisRjHjx+3tg0cONCQZLzzzjvWtkuXLhmurq6
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1IAAAIjCAYAAAAJLyrXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABnkUlEQVR4nO3dd3gU5eL28XuTkE0gBQKEJBB670XkIL0oBERRFEWUKqCCBVQ0Nooltp8dUY8CegRRpCkqvSkiIh1BBAwdQicQJEAy7x/PuxuWJJAJIZuE7+e65oKdnZ19djezO/fTxmFZliUAAAAAQJb5eLsAAAAAAJDfEKQAAAAAwCaCFAAAAADYRJACAAAAAJsIUgAAAABgE0EKAAAAAGwiSAEAAACATQQpAAAAALCJIAUAAAAANhGkAAAArrI+ffqofPny3i5GnrB48WI5HA4tXrzYvY73B/kRQQrIhgkTJsjhcLiXg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NVbRoUQUFBalatWp65pln3I/N6t/Aha9xzJgxqlixogoXLqybbrpJu3fvlmVZevHFF1WmTBkFBgbq1ltv9fg7v7Ccc+fOVf369RUQEKCaNWtq2rRpl/wccuI9nzJlimrWrOnxnjPuClcbLVJADnKFnuLFi0uS/vnnH82YMUN33nmnKlSooISEBH388cdq1aqVNm3apKioKElSSkqKbr75Zi1YsEB33323Hn30UZ08eVLz5s3Txo0bValSJfdz9OjRQ506dfJ43tjY2AzL8/LLL8vhcOipp57SwYMH9c4776h9+/Zau3atuyZz4cKFiomJUaNGjTRixAj5+Pho/Pjxatu2rX7++Wddf/316fZbpkwZxcXFSZJOnTqlBx98MMPnfv7559W9e3fdf//9OnTokN5//321bNlSa9asUdGiRdM9ZuDAgWrRooUkadq0aelOPgYNGqQJEyaob9++euSRRxQfH68PPvhAa9as0bJly3KkRvP48ePu13ah1NRU3XLLLfrll180cOBA1ahRQxs2bNDbb7+tv//+WzNmzLji53Y5ffq0WrVqpb1792rQoEEqW7asfv31V8XGxmr//v165513Mnzc//73P/f/hw4d6nFfQkKC/vOf/8jhcGjIkCEqWbKkfvrpJ/Xv31+JiYl67LHHPLZ/5plnVKNGDf3777/uQB4eHq7+/ftLkv7880+1aNFCISEhGj58uAoVKqSPP/5YrVu31pIlS9SkSROP/bm6wV4oLCxMkjR//nzFxMSoYsWKGjlypP7991+9//77atasmVavXp2lE6FHHnlEjRs39lh3//33Z7jtkCFDVLRoUY0cOVJbtmzR2LFjtXPnTnc4ycj58+f17LPPpluflJSkMmXKqEuXLgoJCdHGjRs1ZswY7d27V99///1ly32xrH5nXOzEiROKiYlRoUKF9OOPPyooKEiSlJiYqE8//VQ9evTQgAEDdPLkSX322Wfq0KGDfv/9d9WvX/+yZapfv74ef/xxj3VffPGF5s2b57Hu/vvv1+eff6477rhDjz/+uFasWKG4uDht3rzZ41ieMGGC+vXrp1q1aik2NlZFixbVmjVrNHv2bN1zzz3pnj8vfC+4TJo0SSdPntSgQYPkcDj0+uuv6/bbb9c///zjfp65c+eqW7duqlmzpuLi4nTkyBH17dtXZcqUSbc/O2XfsmWLevTooUGDBmnAgAGqVq2a/vzzT918882qW7euRo8eLafTqW3btnlUhNn9G5g4caLOnj2rhx9+WEePHtXrr7+u7t27q23btlq8eLGeeuopbdu2Te+//76eeOKJdJUxW7du1V133aUHHnhAvXv31vjx43XnnXdq9uzZuvHGG6/Ke/7DDz/orrvuUp06dRQXF6djx46pf//+Kl26tO3nA2yxANg2fvx4S5I1f/5869ChQ9bu3butyZMnW8WLF7cCAwOtPXv2WJZlWWfOnLFSUlI8HhsfH285nU5r9OjR7nXjxo2zJFlvvfVWuudKTU11P06S9cYbb6TbplatWlarVq3ctxctWmRJskqXLm0lJia613/zzTeWJOvdd99177tKlSpWhw4d3M9jWZZ1+vRpq0KFCtaNN96Y7rluuOEGq3bt2u7bhw4dsiRZI0aMcK/bsWOH5evra7388ssej92wYYPl5+eXbv3WrVstSdbnn3/uXjdixAjrwq+on3/+2ZJkTZw40eOxs2fPTre+XLlyVufOndOVffDgwdbFX3sXl3348OFWeHi41ahRI4/39H//+5/l4+Nj/fzzzx6P/+ijjyxJ1rJly9I934VatWpl1apVK936N954w5JkxcfHu9e9+OKLVpEiRay///7bY9unn37a8vX1tXbt2uWx/tlnn7UcDofHunLlylm9e/d23+7fv78VGRlpHT582GO7u+++2woNDbVOnz5tWVba386iRYvc25w5c8by8fGxHnroIfe6rl27Wv7+/tb27dvd6/bt22cFBwdbLVu2dK9zHSsrV67M5J2xrPr161vh4eHWkSNH3OvWrVtn+fj4WL169cr0cReWd8qUKenuK1KkiMd74CpLo0aNrLNnz7rXv/7665Yka+bMme51F79/H374oeV0Oq02bdpY5cqVu2SZHnroISsoKChbZczqd8aFn9OZM2es1q1bW+Hh4da2bds8Hnv+/HkrOTnZY92xY8esUqVKWf369bvk67CsrB9La9eutSRZ999/v8d2TzzxhCXJWrhwoWVZlnX8+HErODjYatKkifXvv/96bHvhd5Bl5fz3QkZatWrlcZy79O7d2+Nzdn3/Fi9e3Dp69Kh7/cyZMy1J1vfff+9eV79+fSsyMtI6fvy4e93cuXMtSR77tPudJsmaPXu2x7Zvv/22Jck6dOhQpq8xq38DrtdYsmRJj7LHxsZakqx69epZ586dc6/v0aOH5e/vb505cyZdOadOneped+LECSsyMtJq0KCBe11G3zNX8p7XqVPHKlOmjHXy5En3usW
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество записей в обучающей выборке до аугментации: 765\n",
"Количество записей в обучающей выборке после oversampling: 772\n",
"Количество записей в обучающей выборке после undersampling: 760\n"
]
}
],
"source": [
"from imblearn.over_sampling import RandomOverSampler\n",
"from imblearn.under_sampling import RandomUnderSampler\n",
"\n",
"# Разделение признаков и целевой переменной\n",
"X = df.drop(columns=['Price_euros']) # Признаки\n",
"y = df['Price_euros'] # Целевая переменная (для регрессии)\n",
"\n",
"# Разбиение данных на обучающую, контрольную и тестовую выборки\n",
"X_train, X_temp, y_train, y_temp = train_test_split(X, y, test_size=0.4, random_state=42)\n",
"X_val, X_test, y_val, y_test = train_test_split(X_temp, y_temp, test_size=0.5, random_state=42)\n",
"\n",
"print(f\"Размер обучающей выборки: {len(X_train)}\")\n",
"print(f\"Размер валидационной выборки: {len(X_val)}\")\n",
"print(f\"Размер тестовой выборки: {len(X_test)}\")\n",
"\n",
"# Все типы к числовым приводим\n",
"X_train = X_train.apply(pd.to_numeric, errors='coerce')\n",
"print(X_train.dtypes)\n",
"\n",
"# Квантилизация целевой переменной для создания категорий\n",
"y_train_cat = pd.qcut(y_train, q=4, labels=False)\n",
"\n",
"# Объединяем исходные данные и \"шумные\" данные для увеличения обучающей выборки\n",
"X_train_combined = np.vstack([X_train, X_train])\n",
"y_train_combined = np.hstack([y_train, y_train]) # Убедитесь, что y_train повторяется для новых данных\n",
"\n",
"# Применение oversampling и undersampling\n",
"ros = RandomOverSampler(random_state=42)\n",
"X_train_ros, y_train_ros = ros.fit_resample(X_train, y_train_cat)\n",
"\n",
"# Проверка распределения после oversampling\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(y_train_ros, bins=30, kde=True, color='green')\n",
"plt.title('Распределение целевого признака после oversampling')\n",
"plt.xlabel('Price_euros')\n",
"plt.ylabel('Частота')\n",
"plt.show()\n",
"\n",
"# Применение RandomUnderSampler\n",
"rus = RandomUnderSampler(random_state=42)\n",
"X_train_rus, y_train_rus = rus.fit_resample(X_train, y_train_cat)\n",
"\n",
"# Проверка распределения после undersampling\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(y_train_rus, bins=30, kde=True, color='red')\n",
"plt.title('Распределение целевого признака после undersampling')\n",
"plt.xlabel('Price_euros')\n",
"plt.ylabel('Частота')\n",
"plt.show()\n",
"\n",
"# Вывод количества данных до и после аугментации\n",
"print(f\"Количество записей в обучающей выборке до аугментации: {len(y_train)}\")\n",
"print(f\"Количество записей в обучающей выборке после oversampling: {len(y_train_ros)}\")\n",
"print(f\"Количество записей в обучающей выборке после undersampling: {len(y_train_rus)}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Набор данных, судя по числам, был относительно сбалансирован, и применение oversampling/undersampling не сильно изменил размер выборок. Использование RandomOverSampler и RandomUnderSampler для регрессионных задач не является оптимальным решением, поскольку эти методы предназначены для классификации."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Третий датафрейм: Зарплата сотрудников по обработке данных (DataScience)\n",
"Выгрузили третий датасет!!! :)"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['work_year', 'experience_level', 'employment_type', 'job_title',\n",
" 'salary', 'salary_currency', 'salary_in_usd', 'employee_residence',\n",
" 'remote_ratio', 'company_location', 'company_size'],\n",
" dtype='object')\n",
"\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 3755 entries, 0 to 3754\n",
"Data columns (total 11 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 work_year 3755 non-null int64 \n",
" 1 experience_level 3755 non-null object\n",
" 2 employment_type 3755 non-null object\n",
" 3 job_title 3755 non-null object\n",
" 4 salary 3755 non-null int64 \n",
" 5 salary_currency 3755 non-null object\n",
" 6 salary_in_usd 3755 non-null int64 \n",
" 7 employee_residence 3755 non-null object\n",
" 8 remote_ratio 3755 non-null int64 \n",
" 9 company_location 3755 non-null object\n",
" 10 company_size 3755 non-null object\n",
"dtypes: int64(4), object(7)\n",
"memory usage: 322.8+ KB\n"
]
}
],
"source": [
"# Выгружаем третий датафрейм\n",
"df = pd.read_csv(\".\\\\static\\\\csv\\\\ds_salaries.csv\")\n",
"\n",
"print(df.columns)\n",
"\n",
"print()\n",
"\n",
"df.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Описание набора \n",
"Kaggle даёт следующие пояснения о датасете: \n",
"Целью данного исследования является изучение факторов, влияющих на заработную плату специалистов по обработке данных. Для этого был использован набор данных, содержащий различные релевантные переменные. В этом отчёте описывается исследовательский анализ, проведённый для понимания взаимосвязи между этими факторами и заработной платой специалистов по обработке данных. Наука о данных — быстро развивающаяся область, и специалисты по обработке данных играют важнейшую роль в анализе и интерпретации больших объёмов данных. Поскольку эта профессия становится всё более востребованной, важно понимать факторы, которые могут влиять на зарплату специалистов по обработке данных. Этот анализ посвящён изучению этих факторов и их влиянию на зарплату."
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"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>work_year</th>\n",
" <th>experience_level</th>\n",
" <th>employment_type</th>\n",
" <th>job_title</th>\n",
" <th>salary</th>\n",
" <th>salary_currency</th>\n",
" <th>salary_in_usd</th>\n",
" <th>employee_residence</th>\n",
" <th>remote_ratio</th>\n",
" <th>company_location</th>\n",
" <th>company_size</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2023</td>\n",
" <td>SE</td>\n",
" <td>FT</td>\n",
" <td>Principal Data Scientist</td>\n",
" <td>80000</td>\n",
" <td>EUR</td>\n",
" <td>85847</td>\n",
" <td>ES</td>\n",
" <td>100</td>\n",
" <td>ES</td>\n",
" <td>L</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2023</td>\n",
" <td>MI</td>\n",
" <td>CT</td>\n",
" <td>ML Engineer</td>\n",
" <td>30000</td>\n",
" <td>USD</td>\n",
" <td>30000</td>\n",
" <td>US</td>\n",
" <td>100</td>\n",
" <td>US</td>\n",
" <td>S</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2023</td>\n",
" <td>MI</td>\n",
" <td>CT</td>\n",
" <td>ML Engineer</td>\n",
" <td>25500</td>\n",
" <td>USD</td>\n",
" <td>25500</td>\n",
" <td>US</td>\n",
" <td>100</td>\n",
" <td>US</td>\n",
" <td>S</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2023</td>\n",
" <td>SE</td>\n",
" <td>FT</td>\n",
" <td>Data Scientist</td>\n",
" <td>175000</td>\n",
" <td>USD</td>\n",
" <td>175000</td>\n",
" <td>CA</td>\n",
" <td>100</td>\n",
" <td>CA</td>\n",
" <td>M</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2023</td>\n",
" <td>SE</td>\n",
" <td>FT</td>\n",
" <td>Data Scientist</td>\n",
" <td>120000</td>\n",
" <td>USD</td>\n",
" <td>120000</td>\n",
" <td>CA</td>\n",
" <td>100</td>\n",
" <td>CA</td>\n",
" <td>M</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" work_year experience_level employment_type job_title \\\n",
"0 2023 SE FT Principal Data Scientist \n",
"1 2023 MI CT ML Engineer \n",
"2 2023 MI CT ML Engineer \n",
"3 2023 SE FT Data Scientist \n",
"4 2023 SE FT Data Scientist \n",
"\n",
" salary salary_currency salary_in_usd employee_residence remote_ratio \\\n",
"0 80000 EUR 85847 ES 100 \n",
"1 30000 USD 30000 US 100 \n",
"2 25500 USD 25500 US 100 \n",
"3 175000 USD 175000 CA 100 \n",
"4 120000 USD 120000 CA 100 \n",
"\n",
" company_location company_size \n",
"0 ES L \n",
"1 US S \n",
"2 US S \n",
"3 CA M \n",
"4 CA M "
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Для наглядности\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"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>work_year</th>\n",
" <th>salary</th>\n",
" <th>salary_in_usd</th>\n",
" <th>remote_ratio</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>3755.000000</td>\n",
" <td>3.755000e+03</td>\n",
" <td>3755.000000</td>\n",
" <td>3755.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>2022.373635</td>\n",
" <td>1.906956e+05</td>\n",
" <td>137570.389880</td>\n",
" <td>46.271638</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>0.691448</td>\n",
" <td>6.716765e+05</td>\n",
" <td>63055.625278</td>\n",
" <td>48.589050</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>2020.000000</td>\n",
" <td>6.000000e+03</td>\n",
" <td>5132.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>2022.000000</td>\n",
" <td>1.000000e+05</td>\n",
" <td>95000.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>2022.000000</td>\n",
" <td>1.380000e+05</td>\n",
" <td>135000.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>2023.000000</td>\n",
" <td>1.800000e+05</td>\n",
" <td>175000.000000</td>\n",
" <td>100.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>2023.000000</td>\n",
" <td>3.040000e+07</td>\n",
" <td>450000.000000</td>\n",
" <td>100.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" work_year salary salary_in_usd remote_ratio\n",
"count 3755.000000 3.755000e+03 3755.000000 3755.000000\n",
"mean 2022.373635 1.906956e+05 137570.389880 46.271638\n",
"std 0.691448 6.716765e+05 63055.625278 48.589050\n",
"min 2020.000000 6.000000e+03 5132.000000 0.000000\n",
"25% 2022.000000 1.000000e+05 95000.000000 0.000000\n",
"50% 2022.000000 1.380000e+05 135000.000000 0.000000\n",
"75% 2023.000000 1.800000e+05 175000.000000 100.000000\n",
"max 2023.000000 3.040000e+07 450000.000000 100.000000"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Описание представленного датафрейма\n",
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"work_year 0\n",
"experience_level 0\n",
"employment_type 0\n",
"job_title 0\n",
"salary 0\n",
"salary_currency 0\n",
"salary_in_usd 0\n",
"employee_residence 0\n",
"remote_ratio 0\n",
"company_location 0\n",
"company_size 0\n",
"dtype: int64"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Процент пропущенных значений признаков\n",
"for i in df.columns:\n",
" null_rate = df[i].isnull().sum() / len(df) * 100\n",
" if null_rate > 0:\n",
" print(f'{i} Процент пустых значений: %{null_rate:.2f}')\n",
"\n",
"# Проверка на пропущенные данные\n",
"df.isnull().sum()"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"work_year False\n",
"experience_level False\n",
"employment_type False\n",
"job_title False\n",
"salary False\n",
"salary_currency False\n",
"salary_in_usd False\n",
"employee_residence False\n",
"remote_ratio False\n",
"company_location False\n",
"company_size False\n",
"dtype: bool"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.isnull().any()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Хе-хе, какие весёлые датасеты :) Ни где данных пропущенных не нашлось, хе-хе))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Анализ сведений о наборе данных\n",
"\n",
"**Набор данных:** Набор данных представляет собой информацию о сотрудниках DataScientist. Их зарплатах, занятости, стаже и по этим данным будет проводиться анализ. \n",
"\n",
"**Проблемная область:** Проблемной областью может являться анализ и управление заработной платой сотрудников с учётом различных факторов, которые позволяют компаниям улучшать свои кадровые стратегии и конкурировать на рынке труда.\n",
"\n",
"Проанализируем содержимое...\n",
"\n",
"*Объекты наблюдения:* Каждый сотрдник в области оьработки данных является объектом наблюдения. \n",
"\n",
"*Атрибуты объектов:* Основные атрибуты представляют собой зарплату работников, тип занятости, уровень опыта разработчика, год получения опыта работника, валюта (выплачиваемой зарплаты), местоположение сотрудника, мостоположение компании, размер компании, доля удалённой работы.\n",
"\n",
"*Связи между объектами:* Стаж сотрудника может быть использован в зарплатах и трудоустройстве по годам. Более высокий опыт и определённые должности коррелируют с большими зарплатами. Регионы и страы могут показать разницу в зарплатах. \n",
"\n",
"## Бизнес-цель\n",
"1. Определение конкурентоспособности зарплат \n",
"Цель: Сравнить зарплаты сотрудников по странам и должностям. \n",
"Эффект же будет заключаться в том, что компании могут использовать эту информацию для привлечения и удержания талантов, предлагая конкрурентные зарплаты. \n",
"2. Оценка зависимости между опытом и зарплатой \n",
"Цель: Определить, как профессиональный опыт влияет на зарплаты в различных секторах. \n",
"Эффект заключается в том, что компании могут лучше планировать бюджеты на повышение зарплат в зависимости от опыта сотрудников.\n",
"\n",
"### Техническая цель\n",
"1. Конкурентоспособность зарплат \n",
"Построить модель, которая будет предсказывать зарплаты сотрудников на основе атрибутов. На вход должны следовать такие признаки, как должность, опыт, страна компании. Целевой признак: зарплата.\n",
"2. Оценка зависимости между опытом и зарплатой\n",
"Создать модель и визуализировать влияние опыта на зарплату. На вход должны идти уровень опыта, должность, местоположение компании. Целевой признак: Зарплата"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAx8AAAIjCAYAAABia6bHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA7kklEQVR4nO3dd5hV1b0//s8MMAMIMwOIFKWIYgFB7EGsERsYSxRLiIKxxKhRE0tiQEFjvhpbEonGGK+i6JWrXlssESIiSQRUFBGwBiyRJjoUpTP794e/OZdDGQbUNYO8Xs8zD5y911nrs/dZz5nznrNLQZZlWQAAAHzDCmu6AAAAYPMgfAAAAEkIHwAAQBLCBwAAkITwAQAAJCF8AAAASQgfAABAEsIHAACQhPABAAAkIXwAfEXvv/9+FBQUxNChQ2u6lE3e0KFDo6CgIN5///2aLmWtBg8eHAUFBTVdxlfSvn376N+/f02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ne/iy233DIiIpo3b16tOg499NA47bTTIiLi5ZdfjltuuWWdbbfccsv43e9+l3t86qmn5q0fO3ZsnHjiibHrrrvGddddF6WlpTF37tz42c9+tt46Bg8eHNdee22ceeaZsffee8eCBQvilVdeiVdffTUOPfTQiIgYOXJkTJs2LU4//fRo2bJlTJkyJe64446YMmVKjBs3rsqTuIcOHRqNGjWKn//859GoUaMYNWpUXHnllbFgwYK44YYb8tp++umnceSRR8bJJ58cP/zhD6NFixaxxRZbxL333hvPPvts3jdns2bNilGjRsWgQYPWu43r889//jMeeeSROPfcc6Nx48Zxyy23xPHHHx8ffvhhlfNkYx1//PExZcqU+OlPfxrt27ePOXPmxMiRI+PDDz+M9u3bR0TElVdeGddcc0306tUrevXqFa+++mocdthhsWzZsq+9HoBqywBqibvvvjuLiDV+iouLs6FDh+a1feyxx7KIyK655pq85SeccEJWUFCQvffee7lll19+eVZYWJiNGTMme+ihh7KIyH7/+9+vt57nn38+i4jsrrvuyj755JNsxowZ2VNPPZW1b98+KygoyF5++eUsy7Js+vTpWURkd999d+653bp1y7baaqvs008/zS17/fXXs8LCwuy0007LLbvhhhuyiMimT59e7f20bNmyLCKy888/P7escruef/75Ndr37ds323bbbfOWRUQ2aNCg3OPLL788i4hs5syZuWWV23XDDTdUWc+uu+6a9e7du8o2ixYtWmPZAw88kEVENmbMmNyyyjmw6v5Y23N//OMfZw0bNsyWLFmSW3bggQdmEZHdfvvteW1XrlyZbbPNNtlJJ52Ut/zmm2/OCgoKsmnTplVZ+6oGDRqUrf6rMyKyoqKivDn3+uuvZxGRDRkypNp9V8631V/D1edXeXn5el+XOXPmZEVFRVnv3r2zioqK3PJf/epXWURk/fr1q3ZdAF8nh10Btc6tt94aI0eOjJEjR8Z9990XBx98cJx55pnxyCOP5No8/fTTUadOnbjgggvynnvxxRdHlmV5V8caPHhwdO7cOfr16xfnnntuHHjggWs8ryo/+tGPonnz5tG6devo3bt3fPHFF3HPPffknZeyqpkzZ8bEiROjf//+0bRp09zyrl27xqGHHhpPP/10tcdemyVLlkRERP369avVftmyZVFcXFxlm4ULF0ZhYWGUlZVtcD1lZWUxZcqUePfdd9fZpkGDBrn/L1myJObOnRvf+c53IiLi1VdfrbL/VZ+7cOHCmDt3buy///6xaNGieOutt/LaFhcXx+mnn563rLCwMPr27RtPPPFELFy4MLf8/vvvj3333Te23Xbb9W/kevTs2TO222673OOuXbtGSUnJ13ZVtFU1aNAgioqKYvTo0VFeXr7WNn//+99j2bJl8dOf/jTvW6WLLrroa68HYEMIH0Cts/fee0fPnj2jZ8+e0bdv33jqqaeiU6dOcf755+cOGfnggw+idevW0bhx47zn7rzzzrn1lYqKiuKuu+6K6dOnx8KFC+Puu+/eoHs1XHnllTFy5MgYNWpUTJo0KWbMmLHGYUurqhx7becS7LzzzjF37tz44osvqj3+6ubOnRsREaWlpdVqP2/evGjUqFGVbbp37x4VFRVx4YUXxr///e+YO3fuOj/Yru7qq6+OefPmxQ477BBdunSJSy+9NCZNmpTX5rPPPosLL7wwWrRoEQ0aNIjmzZvnPvTPnz+/yv6nTJkSxx13XJSWlkZJSUk0b948dwje6s/deuuto6ioaI0+TjvttFi8eHE8+uijERHx9ttvx4QJE6p8HTdE27Zt11jWpEmTau/DDVFcXBy//e1v45lnnokWLVrEAQccENdff33MmjUr16ZyDnbs2DHvuc2bN48mTZp87TUBVJfwAdR6hYWFcfDBB8fMmTOr/Ot6VZ599tmI+PKv7hvaR5cuXaJnz55x8MEHR5cuXWr8akeVJxVXHtu/PrNmzYqWLVtW2ebkk0+Oiy++OIYOHRrbb799NG/ePHbfffdq9X/AAQfEv//977jrrrtil112iTvvvDN23333uPPOO3NtTjzxxPjLX/4S55xzTjzyyCMxYsSI3AnZFRUV6+x73rx5ceCBB8brr78eV199dfz1r3+NkSNHxm9/+9u1PnfVb0lW1alTp9hjjz3ivvvui4iI++67L4qKiuLEE0+s1jauz7rOHcr+/4sfVMe6AvHaLopw0UUXxTvvvBPXXntt1K9fP6644orYeeed47XXXqv2eAA1QfgANgkrVqyIiIjPP/88IiLatWsXM2bMyDuMJiJyh+G0a9cut2zSpElx9dVXx+mnnx677bZbnHnmmev9a/tXUTn222+/vca6t956K7bccsvYYostImLdHzir8sorr0RErPOwr1UtX7483nvvvdw3QutSWFgYN954Yxx00EHRsWPH3CFv1dW0adM4/fT
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0sAAAIjCAYAAADSlID1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABwG0lEQVR4nO3deXhU1f3H8c9MkpnsGxASICRBNsMii6AoixUsigtuFa2iWEW0WsTWDZeibRXFautScavi0l8FFyhWRFBxR3ABWYLIFjYhAbLvycz5/ZFmzJCbZDJMmADv1/PMo7lz7jnfe+bO8uHO3GszxhgBAAAAALzYg10AAAAAALRFhCUAAAAAsEBYAgAAAAALhCUAAAAAsEBYAgAAAAALhCUAAAAAsEBYAgAAAAALhCUAAAAAsEBYAgAAAAALhCUAaMR9990nm80W7DK8nHbaaTrttNOCXUaLfPzxx7LZbPr444+DXcoRzWaz6b777gt2GQGVnp6uSZMmBbsMSW2rFgBtB2EJAAAAACyEBrsAAIDvlixZEuwSECTl5eUKDeVtGwAOJ44sAcBhYIxReXn5IffjcDjkcDgCUBGOBG63WxUVFZKk8PBwwhIAHGaEJQBHleLiYk2bNk3p6elyOp1KSkrSGWecoe+++87T5rPPPtOvfvUrde3aVU6nU6mpqbrlllt8CjMvvfSSTj/9dCUlJcnpdCozM1OzZ89u0C49PV3nnHOO3n//fZ144omKiIjQs88+q1GjRumEE06w7LtXr14aO3Zsk+Mf/Julut8DzZs3Tw888IC6dOmi8PBwjR49Wps3b252eyZNmqT09PQGy61+r7V06VINHz5c8fHxio6OVq9evXTX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jDF66623dO6558oY49Xv2LFjVVhY6PXVU6n5fWTVqlXatm2bpk2b5nm869R9JbOl89hSb7zxhkaMGKGEhASvbRozZoxcLpc+/fRTSdLpp5+u9u3ba+7cuZ518/PztXTpUq+vSrZ07gHgYIQlAEeVWbNmad26dUpNTdXQoUN13333NQgMO3bs0KRJk5SYmKjo6Gh16NDB89WvgwPPwb744guNGTNGUVFRio+PV4cOHTy/27EKS1auvPJK7dixQ5999pkk6YMPPlBOTo4mTpzo1zZLUteuXb3+TkhIkKQWBYqmTJgwQaeeeqquvfZadezYUZdeeqnmzZvnFZy2b9+u7t27N/itU69evXwa48wzz1RcXJzXB+C5c+dqwIAB6tmzpyTJ6XTq4Ycf1nvvvaeOHTtq5MiRmjVrlvbu3dtk35s3b5YxRvfee686dOjgdZsxY4ak2t8r1UlMTNQTTzyhNWvWKC4uTk888YRlv506dWoQcOtqrfsN1aZNm7R+/foG49a1qz+u1Ph+U9++fftUUFCg5557rkG/db/lObjf5vaRLVu2SJLX10MP1tJ5bKlNmzZp8eLFDfoeM2aMV9+hoaG66KKL9J///Mfz26O3335b1dXVXmGppXMPAAfjN0sAjiqXXHKJRowYofnz52vJkiV65JFH9PDDD+vtt9/WWWedJZfLpTPOOEN5eXm644471Lt3b0VFRWn37t2aNGlSo0dNpNoPk6NHj1bv3r312GOPKTU1VQ6HQ4sWLdLf/va3BuvWPwpV39ixY9WxY0e99tprGjlypF577TUlJyd7PhD6IyQkxHK5qXeSAiuNXXTX5XJ5/R0REaFPP/1Uy5Yt07vvvqvFixdr7ty5Ov3007VkyZJGx28Jp9Op888/X/Pnz9fTTz+tnJwcffHFF3rwwQe92k2bNk3nnnuuFixYoPfff1/33nuvZs6cqY8++kgDBw607Lvusbn11ls
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Визуализация данных - ящик с усами. Выборка относительно сбалансирована, есть среднее смещение в среднюю сторону, медиана уравновешена\n",
"plt.figure(figsize=(10, 6))\n",
"sns.boxplot(x=df[\"salary_in_usd\"])\n",
"plt.title(\"Box Plot для salary_in_usd\")\n",
"plt.xlabel(\"salary_in_usd\")\n",
"plt.show()\n",
"\n",
"# Визуализируем отношение размера компании и зарплаты\n",
"plt.figure(figsize=(10, 6))\n",
"plt.scatter(df[\"salary_in_usd\"], df[\"experience_level\"])\n",
"plt.xlabel(\"salary_in_usd\")\n",
"plt.ylabel(\"experience_level\")\n",
"plt.title(\"salary in usd vs experience_level\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Проблемы выбранный наборов данных \n",
"**Зашумленность:** \n",
"Возможное присутствие некорректных или неполных данных, например, ошибки в заполнении зарплат или местоположений.\n",
"Необходима очистка данных от выбросов и ошибок. \n",
"\n",
"**Смещение:** \n",
"Могут быть смещения в данных по странам или компаниям, например, если большая часть выборки состоит из сотрудников одной страны или отрасли. \n",
"\n",
"**Актуальность:** \n",
"Если данные собраны за несколько лет, некоторые зарплаты могут быть неактуальны для текущего рынка, что требует дополнительной актуализации. \n",
"\n",
"**Выбросы:** \n",
"Возможны экстремальные значения в зарплатах, которые необходимо либо исключить, либо обработать, чтобы не искажать модели. \n",
"\n",
"**Просачивание данных:** \n",
"Если в данных есть признаки, которые могут напрямую предсказывать зарплату (например, если salary_currency или company_size напрямую коррелируют с зарплатой), это может привести к ошибкам в моделях."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Борьба с выбросами"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1MAAAIjCAYAAADm7UHpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB+ZElEQVR4nO3deXwU9f3H8ffuJrub+w4JEJJwGw4RBAE5rIAg3iceKFRFa7UerXe1YlvFo5faitevYrWtIFWLVVFUvAABBUQOOQPhTMhB7mST3fn9EbNmc+5OFhPg9Xw88oDMfuc7n+8xk/ns7M5YDMMwBAAAAAAIiLWjAwAAAACAoxHJFAAAAACYQDIFAAAAACaQTAEAAACACSRTAAAAAGACyRQAAAAAmEAyBQAAAAAmkEwBAAAAgAkkUwAAAABgAskUALRg9uzZslgsHR2Gj9NOO02nnXZaR4cRkE8++UQWi0WffPJJR4dyVLNYLJo9e3ZHhxFUGRkZmjlzZkeHIalzxQLg6EEyBQAAAAAmhHR0AAAA/33wwQcdHQI6SGVlpUJC+LMNAJ0JV6YA4EdgGIYqKyvbXY/dbpfdbg9CRDgaeDweVVVVSZKcTifJFAB0MiRTAI4ppaWluu2225SRkSGHw6Hk5GRNmjRJa9as8Zb5/PPPdckll6hHjx5yOBxKS0vT7bff7ley89JLL+n0009XcnKyHA6HsrKyNHfu3CblMjIydPbZZ+v999/XySefrLCwMD333HMaP368TjzxxGbr7tevnyZPntzq9ht/Z6r++0gLFizQww8/rO7du8vpdGrChAnavn17m+2ZOXOmMjIymixv7vtiS5Ys0ZgxYxQbG6vIyEj169dP9913n0+ZvXv36vzzz1dERISSk5N1++23q7q6us04Fi5cKIvFok8//bTJa88995wsFos2bNggSTp48KB++tOfqnv37nI4HEpNTdV5552nXbt2tbmd7777ThdffLHi4+PldDp18skna9GiRd7X8/LylJSUpNNOO02GYXiXb9++XREREZo2bZp32WmnnaaBAwfq66+/1ujRoxUWFqbMzEw9++yzTbZbXV2tBx98UL179/bOubvuuqtJ31gsFt1888365z//qQEDBsjhcGjx4sXe1xp/Z2rfvn265ppr1KVLFzkcDg0YMEB///vffcoEOkdWrlypqVOnKi4uThERERo8eLCefPLJgPqxPQ4fPqzbbrtNaWlpcjgc6t27tx577DF5PB5JUk1NjeLj4/XTn/60ybolJSVyOp264447vMv87XsAMIO3uAAcU372s59p4cKFuvnmm5WVlaWCggJ98cUX2rx5s4YOHSpJev3111VRUaEbb7xRCQkJWrVqlZ5++mnt3btXr7/+eqv1z507VwMGDNC5556rkJAQvf322/r5z38uj8ejm266yafsli1bdPnll+uGG27QrFmz1K9fP0VGRmrWrFnasGGDBg4c6C27evVqbd26Vffff7+pdj/66KOyWq264447VFxcrMcff1xXXnmlVq5caaq+xjZu3Kizzz5bgwcP1m9/+1s5HA5t375dy5Yt85aprKzUhAkTlJOTo1tuuUVdu3bVK6+8oo8//rjN+s866yxFRkZqwYIFGj9+vM9r8+fP14ABA7z9ddFFF2njxo36xS9+oYyMDOXl5WnJkiXKyclpNjFs2IZTTz1V3bp10z333KOIiAgtWLBA559/vv7zn//oggsuUHJysubOnatLLrlETz/9tG655RZ5PB7NnDlTUVFReuaZZ3zqLCoq0tSpU3XppZfq8ssv14IFC3TjjTfKbrfrmmuukVR3dencc8/VF198oeuvv14nnHCCvv32W/35z3/W1q1b9dZbb/nU+fHHH2vBggW6+eablZiY2GKbcnNzNXLkSG8ClpSUpPfee0/XXnutSkpKdNttt/mU92eOLFmyRGeffbZSU1N16623KiUlRZs3b9b//vc/3XrrrX73o1kVFRUaP3689u3bpxtuuEE9evTQ8uXLde+99+rAgQP6y1/+otDQUF1wwQV644039Nxzz/lcqX3rrbdUXV2tyy67zFTfA0DADAA4hsTExBg33XRTq2UqKiqaLJszZ45hsViM3bt3e5c9+OCDRuPDZHPrTp482ejZs6fPsvT0dEOSsXjxYp/lhw8fNpxOp3H33Xf7LL/llluMiIgIo6ysrNXYx48fb4wfP977+9KlSw1JxgknnGBUV1d7lz/55JOGJOPbb79ttb4ZM2YY6enpTZY3bvuf//xnQ5Jx6NChFuv6y1/+YkgyFixY4F1WXl5u9O7d25BkLF26tNVYLr/8ciM5Odmora31Ljtw4IBhtVqN3/72t4ZhGEZRUZEhyXjiiSdaras5EyZMMAYNGmRUVVV5l3k8HmP06NFGnz59msQSHh5ubN261XjiiScMScZbb73lU2b8+PGGJOOPf/yjd1l1dbUxZMgQIzk52XC5XIZhGMYrr7xiWK1W4/PPP/d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dm2SANfHWv8drm3btmnjxo1NtltfruF2pZbnTUOHDh3S4cOH9fzzzzept/67RI3rbWuO7NixQ5J8Pn7aWKD9GKht27Zp8eLFTeqeOHGiT90hISG66KKL9N///tf73ac33nhDNTU1PslUoH0PAIHiO1MAjimXXnqpxo4dqzfffFMffPCBnnjiCT322GN64403dOaZZ8rtdmvSpEkqLCzU3Xffrf79+ysiIkL79u3TzJkzW7zqItWdbE6YMEH9+/fXn/70J6Wlpclut+vdd9/Vn//85ybrNryK1dDkyZPVpUsXvfrqqxo3bpxeffVVpaSkeE8YzbDZbM0uNxrcRKE5LT2U2O12+/weFhamzz77TEuXLtU777yjxYsXa/78+Tr99NP1wQcftLj9QDgcDp1//vl688039cwzzyg3N1fLli3TI4884lPutttu0znnnKO33npL77//vh544AHNmTNHH3/8sU466aR
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABAgAAAIjCAYAAACOIinVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABT30lEQVR4nO3deVxU9f7H8feAsrgwrmxXXHJDXANNSdMKErfS1FIrU1MrL2pqrmXq7VYmbVpulbds817U0koTJdxKSRMkl9zTcAM1hVFUUDi/P3pwfk6QwogM6uv5eMwjzzmf+c5nTtPj3vP2e77HYhiGIQAAAAAAcFtzcXYDAAAAAADA+QgIAAAAAAAAAQEAAAAAACAgAAAAAAAAIiAAAAAAAAAiIAAAAAAAACIgAAAAAAAAIiAAAAAAAAAiIAAAAAAAACIgAADcgqZMmSKLxeLsNuzce++9uvfee53dRqGsXbtWFotFa9eudXYrNzWLxaIpU6Y4u40iVbNmTfXv39/ZbUgqWb0AwM2OgAAAAAAAAKiUsxsAAOB2sGrVKme3ACe5cOGCSpXi/3IB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E4qNjVVycnK+YceV36F169b6xz/+ofHjx6ts2bJauHChunXrpi+//FIPP/ywvL29NWfOHD3yyCN67733NHz4cOXk5Kh///4qX768Zs+ebTfmmTNn1KlTJz366KPq06ePFi5cqCFDhsjNzU1PPfWUpD9nATz00EP68ccf9fTTT6tBgwbavn273nnnHe3du1dLly61G3P16tVauHChhg4dqipVqvztd0pNTVWrVq3MUKFq1apasWKFBg4cKJvNphEjRtjVF+Q3Ehsbqy5dusjPz0/PPfecfH19tWvXLi1btkzPPfdcgc+jo86fP6927drp6NGjeuaZZ1S9enVt3LhREyZM0PHjxzV9+nSVLl1aDz/8sL766iu9//77djNqli5dqszMTPXu3duhcw8AKCIGAAAlgNVqNSIjI69ac/78+Tz7pk6dalgsFuP33383902ePNn46//E5ffeiIgI44477rDbV6NGDUOSERMTY7c/LS3N8PDwMMaNG2e3f/jw4UbZsmWNc+fOXbX3du3aGe3atTO316xZY0gyGjRoYGRmZpr7Z8yYYUgytm/fftXx+vXrZ9SoUSPP/r9+93feeceQZJw8efJvx5o+fbohyVi4cKG5LyMjw6hTp44hyVizZs1Ve+nTp4/h7e1tXL582dx3/Phxw8XFxXj55ZcNwzCMM2fOGJKMN95446pj5ScsLMxo3LixcfHiRXNfTk6Ocffddxt169bN00uZMmWMvXv3Gm+88YYhyVi6dKldTbt27QxJxltvvWXuy8zMNJo1a2Z4e3sbWVlZhmEYxmeffWa4uLgYP/zwg937586da0gyNmzYYO6TZLi4uBg7d+7M078kY/Lkyeb2wIEDDT8/P+PUqVN2db179zasVqv5Wy3ob+Ty5ctGrVq1jBo1ahhnzpyxGzMnJ8eh83gtNWrUMPr162du//vf/zbKli1r7N27165u/Pjxhqurq5GcnGwYhmGsXLnSkGR8++23dnWdOnWy+2+xMOf+r70AABzHLQYAgBKhQoUK2rRpk44dO/a3NZ6enuafMzIydOrUKd19990yDENbt2696vhXvjc9PV2nTp1Su3bt9Ntvvyk9Pd2utlatWnluGbBareratav++9//mlPYs7OzFR0dbU7Nd8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u9+44qF9vLz14v5XNnZ2Xbbnp6eWr9+vdasWaPly5crJiZG0dHRuv/++7Vq1aq//fzCcHd3V7du3bRkyRLNnj1bqamp2rBhg1577TW7uhEjRujBBx/U0qVLtXLlSr300kuaOnWqVq9
"text/plain": [
"<Figure size 1200x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Статистический анализ для определения выбросов\n",
"Q1 = df[\"salary_in_usd\"].quantile(0.25)\n",
"Q3 = df[\"salary_in_usd\"].quantile(0.75)\n",
"IQR = Q3 - Q1\n",
"\n",
"# Определение порога для выбросов\n",
"threshold = 1.5 * IQR\n",
"outliers = (df[\"salary_in_usd\"] < (Q1 - threshold)) | (\n",
" df[\"salary_in_usd\"] > (Q3 + threshold)\n",
")\n",
"\n",
"# Обработка выбросов\n",
"# В данном случае мы уберем выбросы\n",
"median_salary = df[\"salary_in_usd\"].median()\n",
"df.loc[outliers, \"salary_in_usd\"] = 0\n",
"df1 = df[df.salary_in_usd != 0]\n",
"\n",
"# Визуализация данных после обработки\n",
"plt.figure(figsize=(10, 6))\n",
"plt.scatter(df1[\"salary_in_usd\"], df1[\"experience_level\"])\n",
"plt.xlabel(\"salary_in_usd\")\n",
"plt.ylabel(\"experience_level\")\n",
"plt.title(\"salary in usd vs experience_level\")\n",
"plt.show()\n",
"\n",
"# Визуализация данных после обработки\n",
"plt.figure(figsize=(12, 6))\n",
"plt.boxplot(df1[\"salary_in_usd\"])\n",
"plt.xlabel(\"salary_in_usd\")\n",
"plt.ylabel(\"experience_level\")\n",
"plt.title(\"salary in usd vs experience_level\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Размер обучающей выборки: 2253\n",
"Размер контрольной выборки: 751\n",
"Размер тестовой выборки: 751\n"
]
}
],
"source": [
"from sklearn.model_selection import train_test_split\n",
"\n",
"# Пример датасета с данными (X — признаки, y — целевой признак)\n",
"X = df.drop(columns=[\"salary_in_usd\"]) # Признаки (все столбцы, кроме целевого признака 'salary')\n",
"y = df[\"salary_in_usd\"] # Целевая переменная\n",
"\n",
"# Разделяем данные на обучающую (60%), временную (40%) выборки\n",
"X_train, X_temp, y_train, y_temp = train_test_split(X, y, test_size=0.4, random_state=42)\n",
"\n",
"# Временную выборку делим пополам на контрольную (20%) и тестовую (20%) выборки\n",
"X_val, X_test, y_val, y_test = train_test_split(X_temp, y_temp, test_size=0.5, random_state=42)\n",
"\n",
"# Проверяем размер выборок\n",
"print(f\"Размер обучающей выборки: {len(X_train)}\")\n",
"print(f\"Размер контрольной выборки: {len(X_val)}\")\n",
"print(f\"Размер тестовой выборки: {len(X_test)}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Теперь оценим сбалансированность, если нужно использовать методы аугментации данных, то применим. Анаализ проведём в категории 'salary_in_usd', в которой может потребоваться применение oversampling или undersampling."
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA14AAAIjCAYAAAATE8pZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACSP0lEQVR4nOzde3zO9f/H8ce1jR3MxowdYgi1OeaUY04p53NElErSOVHkWygdpKOS0MmhSEnoIOUs50MRGVGY0zAyNtuwfX5/vH+7MjYx17XPDs/77XbdfK7P9bk+13PXtV2u1/V5f15vh2VZFiIiIiIiIuI2HnYHEBERERERye9UeImIiIiIiLiZCi8RERERERE3U+ElIiIiIiLiZiq8RERERERE3EyFl4iIiIiIiJup8BIREREREXEzFV4iIiIiIiJupsJLREQkj0lMTGT//v38888/dkcRFzt9+jR79+4lMTHR7igi4mIqvERERPKAWbNmceutt1K0aFH8/f2JiIjg9ddftztWnpCQkMDYsWOd10+ePMn48ePtC3QBy7L48MMPqV+/Pn5+fgQEBFC+fHk+//xzu6OJiIs5LMuy7A4hIu4xZcoU7rvvPud1b29vIiIiuP322xk+fDghISE2phORK/Xss88yZswYOnXqRM+ePQkODsbhcHDDDTdQpkwZu+PleqmpqQQGBjJp0iSaNGnCW2+9xY4dO1iwYIHd0ejVqxdffvklffv2pX379gQGBuJwOKhevTolS5a0O56IuJCX3QFExP1GjRpF+fLlSU5OZuXKlUyYMIH58+ezbds2/Pz87I4nIpexfPlyxowZw+jRo3n22WftjpMneXp68uKLL3LPPfeQlpZGQEAAP/zwg92xmDZtGl9++SWff/45d911l91xRMTNdMRLJB9LP+K1YcMG6tSp41w/ePBg3n77bWbMmEGvXr1sTCgi/6VDhw6cOHGCVatW2R0lzztw4AD79+8nKiqKYsWK2R2HatWqUb16daZPn253FBHJATrHS6QAatGiBQB79uwB4MSJEzz99NNUq1YNf39/AgICaNOmDVu2bLnkvsnJybzwwgvccMMN+Pj4EBYWRteuXfnrr78A2Lt3Lw6HI8tLs2bNnPtatmwZDoeDL7/8kv/973+EhoZSpEgROnbsyP79+y957HXr1tG6dWsCAwPx8/OjadOmWX4YbdasWaaP/8ILL1yy7eeff07t2rXx9fUlKCiInj17Zvr4l/vZLpSWlsbYsWOpUqUKPj4+hISEMGDAgEsaIZQrV4727dtf8jiPPfbYJfvMLPsbb7xxyXMKkJKSwsiRI6lYsSLe3t6UKVOGIUOGkJKSkulzdaGHHnqISpUq4efnR1BQEC1atOCXX37JsM28efNo164d4eHheHt7U6FCBV566SVSU1MzbNesWTOqVq3Kpk2baNiwIb6+vpQvX56JEydm2C799yCry7333ntJzqxe3ylTpji3+eWXX+jevTsRERHO5+Gpp54iKSnJuc2999572cd2OBzs3bs3y+fr4vsXL16cZs2aXfKcZWXJkiXccsstFClShGLFitGpUyeio6MzbLN27VqqVq1Kz549CQoKwtfXl7p16zJ37lznNgkJCRQpUoQnn3zyksc4cOAAnp6ejB492pm5XLlyl2x38e/Yvn37eOSRR7jxxhv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EORAqBly5aULFmSMmXK0LNnT/z9/ZkzZw7XXXcdYLodeniYt4PU1FSOHz+Ov78/N954I7/++qtzP7NnzyY4OJjHH3/8kse4eGjc1bjnnnsoWrSo8/odd9xBWFgY8+fPB2Dz5s3s2rWLu+66i+PHjxMXF0dcXByJiYnceuu
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA2YAAAIjCAYAAABoNwiVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACelUlEQVR4nOzdd3gU5cLG4d+m90J6Qgihho6AICId6SKIIipSVLCAHrsfHsUu1iPYu2CnCCiodBDpRToJHUJLSAJJSG/z/ZGTPYSEFjZMynNf114mu7PvPBvWJE9m5n0thmEYiIiIiIiIiGnszA4gIiIiIiJS3amYiYiIiIiImEzFTERERERExGQqZiIiIiIiIiZTMRMRERERETGZipmIiIiIiIjJVMxERERERERMpmImIiIiIiJiMhUzERERERERk6mYiYiIiFRSL774IhaLpdh9tWvXZuTIkeYEEpEyUzETkcs2ZcoULBaL9ebi4kKDBg0YN24c8fHxZscTERERqXQczA4gIpXXyy+/TGRkJFlZWaxcuZJPPvmEP/74gx07duDm5mZ2PBGRamn37t3Y2elv7yKVjYqZiJRZnz59aNOmDQD33Xcffn5+/Oc//+HXX3/ljjvuMDmdiMjF5eXlUVBQgJOTk9lRbMbZ2dnsCCJSBvpziojYTLdu3QA4ePAgAKdOneLJJ5+kWbNmeHh44OXlRZ8+fdi6dWuJ52ZlZfHiiy/SoEEDXFxcCAkJ4ZZbbmH//v0AHDp0qNjpk+feunTpYh1r+fLlWCwWpk2bxrPPPktwcDDu7u4MGDCAI0eOlNj3unXr6N27N97e3ri5udG5c2dWrVpV6mvs0qVLqft/8cUXS2z7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EhwQCMF154wXrfoUOHDHt7e+O1114r9tzt27cbDg4OJe7fu3evARhTp0613vfCCy8YZ3+L/vvvvw3A+OGHH4o9d/78+SXuj4iIMPr161ci+9ixY41zv+2fm/3pp582AgMDjdatWxf7mn733XeGnZ2d8ffffxd7/qeffmoAxqpVq0rs70LWr19vAMbMmTOt92VkZJTY7v777zfc3NyMrKws632dO3c2AOPdd9+13pednW20bNnSCAwMNHJycgzD+N/7YMaMGSXGdXd3N0aMGFHi/g4dOhhdu3a1fl70vvvmm28umHPixImGxWIxDh8+XOrrPffrfDEjRoww3N3dS9w/Y8YMAzCWLVtmGIZh5OTkGIGBgUbTpk2NzMxM63bz5s0zAGPChAnW+zp16mR4enqWyHj2e79IWFiYMWrUKOvnRV/Lov2eOXPG8PHxMUaPHl3seXFxcYa3t3eJ+8/16KOPGkCx99OZM2eMyMhIo3bt2tbvG5999pkBGNu3by/2/MaNGxvdunWzfv7KK68Y7u7uxp49e4pt93//93+Gvb29ERsbaxjG//49vby8jJMnTxbb9uabbzaaNGlywdyl/duvWbPGAIxvv/3Wel/R98hzv7e0b9/esFgsxgMPPGC9Ly8vz6hZs2ax/9+Kcp79/dQwDGPdunUGYDz22GPW+879XmEYhd8Dzn5/F+Xp0aNHsTyPPfaYYW9vbyQnJxuGUfjv5+DgYAwcOLDYeC+++KIBlPr/jIjYjk5lFJEy69GjBwEBAYSHhzN06FA8PDyYPXs2YWFhQOFf/IsuQM/PzycpKQkPDw8aNmzIP//8Yx3nl19+wd/fn4cffrjEPs499e5yDB8+HE9PT+vnt956KyEhIfzxxx8AbNmyhb1793LnnXeSlJREYmIiiYmJpKen0717d1asWFHsNCgoPOXSxcXlgvudNWsWBQUFDBkyxDpmYmIiwcHB1K9
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA2YAAAIjCAYAAABoNwiVAAAAOXRFWHRTb2Z0d2FyZQB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M19++WWx+zZs2MD7779f7L6i98S1117LxIkTiY+PZ/LkyaxatarYe23btm107NgRR0dHxowZQ+3atdm/fz9z587ltddeK7H/jh07MmbMGACio6N5/fXXiz3+3XffMWLECHr16sWbb75JRkYGn3zyCTfccAObN2+mdu3a531t8fHxXH/99WRkZPDII4/g5+fH1KlTGTBgADNnzmTQoEEEBQXRuXNnpk+fzgsvvFDs+dOmTcPe3p7bbrsNgIyMDDp37syxY8e4//77qVWrFqtXr2b8+PGcOHGCSZMmFXv+N998Q1ZWFmPGjMHZ2ZkaNWrwxRdf8Mgjj3Drrbfyr3/9i6ysLLZt28a6deu48847rV//1atXM3ToUGrWrMmhQ4f45JNP6NKlC7t27SpxCvfDDz9McHAwL730EmvXruXzzz/Hx8eH1atXU6tWLV5//XX++OMP3n77bZo2bcrw4cOLPf/bb7/lzJkzjB07lqysLCZPnky3bt3Yvn07QUFB5/36ns/DDz+Mr68vL7zwAocOHWLSpEmMGzeOadOmWbcZP348b731FjfddBO9evVi69at9OrVi6ysrMven4hcJkNE5DJ98803BmAsXrzYSEhIMI4cOWL8/PPPhp+fn+Hq6mocPXrUMAzDyMrKMvLz84s99+DBg4azs7Px8ssvW+/7+uuvDcD4z3/+U2JfBQUF1ucBxttvv11imyZNmhidO3e2fr5s2TIDMMLCwozU1FTr/dOnTzcAY/Lkydax69evb/Tq1cu6H8MwjIyMDCMyMtK48cYbS+zr+uuvN5o2bWr9PCEhwQCMF154wXrfoUOHDHt7e+O1114r9tzt27cbDg4OJe7fu3evARhTp0613vfCCy8YZ3+L/vvvvw3A+OGHH4o9d/78+SXuj4iIMPr161ci+9ixY41zv+2fm/3pp582AgMDjdatWxf7mn733XeGnZ2d8ffffxd7/qeffmoAxqpVq0rs70LWr19vAMbMmTOt92VkZJTY7v777zfc3NyMrKws632dO3c2AOPdd9+13pednW20bNnSCAwMNHJycgzD+N/7YMaMGSXGdXd3N0aMGFHi/g4dOhhdu3a1fl70vvvmm28umHPixImGxWIxDh8+XOrrPffrfDEjRoww3N3dS9w/Y8YMAzCWLVtmGIZh5OTkGIGBgUbTpk2NzMxM63bz5s0zAGPChAnW+zp16mR4enqWyHj2e79IWFiYMWrUKOvnRV/Lov2eOXPG8PHxMUaPHl3seXFxcYa3t3eJ+8/16KOPGkCx99OZM2eMyMhIo3bt2tbvG5999pkBGNu3by/2/MaNGxvdunWzfv7KK68Y7u7uxp49e4pt93//93+Gvb29ERsbaxjG//49vby8jJMnTxbb9uabbzaaNGlywdyl/duvWbPGAIxvv/3Wel/R98hzv7e0b9/esFgsxgMPPGC9Ly8vz6hZs2ax/9+Kcp79/dQwDGPdunUGYDz22GPW+879XmEYhd8Dzn5/F+Xp0aNHsTyPPfaYYW9vbyQnJxuGUfjv5+DgYAwcOLDYeC+++KIBlPr/jIjYjk5lFJEy69GjBwEBAYSHhzN06FA8PDyYPXs2YWFhQOFf/IsuQM/PzycpKQkPDw8aNmzIP//8Yx3nl19+wd/fn4cffrjEPs499e5yDB8+HE9PT+vnt956KyEhIfzxxx8AbNmyhb1793LnnXeSlJREYmIiiYmJpKen0717d1asWFHsNCgoPOXSxcXlgvudNWsWBQUFDBkyxDpmYmIiwcHB1K9
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Количество записей в обучающей выборке до аугментации: 2253\n",
"Количество записей в обучающей выборке после oversampling: 42746\n",
"Количество записей в обучающей выборке после undersampling: 737\n",
"\n",
"Распределение salary_in_usd в обучающей выборке:\n",
"salary_in_usd\n",
"150000 58\n",
"100000 58\n",
"120000 53\n",
"160000 52\n",
"130000 48\n",
" ..\n",
"18000 1\n",
"72212 1\n",
"236600 1\n",
"66192 1\n",
"167580 1\n",
"Name: count, Length: 737, dtype: int64\n",
"\n",
"Распределение salary_in_usd в контрольной выборке:\n",
"salary_in_usd\n",
"100000 24\n",
"150000 21\n",
"130000 16\n",
"160000 15\n",
"135000 15\n",
" ..\n",
"122000 1\n",
"20000 1\n",
"63040 1\n",
"68318 1\n",
"125976 1\n",
"Name: count, Length: 365, dtype: int64\n",
"\n",
"Распределение salary_in_usd в тестовой выборке:\n",
"salary_in_usd\n",
"120000 24\n",
"150000 19\n",
"130000 18\n",
"200000 17\n",
"100000 17\n",
" ..\n",
"158677 1\n",
"139500 1\n",
"21669 1\n",
"168400 1\n",
"187000 1\n",
"Name: count, Length: 361, dtype: int64\n",
"\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAwQAAAKqCAYAAACEmpnIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACPKUlEQVR4nOzdeXxMZ/vH8e9MlslCEkvELvaldoqondJWKbqgi6V9tNWF0k30qa2LahVtaXVDaZ+nVMuj1VKUqqLUTu37koSIJJLINnN+f+RnGEmIMSOS+bxfr/Oquc99zrnO6RhzzXXf55gMwzAEAAAAwCOZ8zsAAAAAAPmHhAAAAADwYCQEAAAAgAcjIQAAAAA8GAkBAAAA4MFICAAAAAAPRkIAAAAAeDASAgAAAMCDkRAAAAAAHoyEAAAAAPBgJASApFmzZslkMunvv//Otu7zzz+XyWRSjx49ZLVa8yE6AAAA9yEhAK5iwYIFGjx4sFq3bq1vv/1WXl5e+R0SAACAS5EQALlYtWqV+vbtqzp16ujHH3+Un59ffocEAADgciQEQA62bt2q++67T2XKlNHSpUsVHBycrc93332nJk2ayN/fXyVLltSjjz6qkydPOvQZMGCAihQpokOHDqlLly4KDAxU2bJlNW7cOBmGYe935MgRmUwmTZw4UZMnT1alSpXk7++vtm3baufOndmOvWfPHj3wwAMqXry4/Pz81LRpUy1atCjHc2nXrp1MJlO2ZdasWQ79PvnkE9WtW1cBAQEO/ebPn++wr7p162Y7xsSJE2UymXTkyBF728VhWJe32Ww21a9fP8fjz58/X02bNlXRokUdjj9x4sQcz+vK4/j6+urMmTMO69atW2ffz5XDwf766y/dddddCg4OVkBAgNq2bas///zToU9kZKT8/Pwc2letWiWTyaRVq1bZ2/7880/5+fkpMjIyW3y5Xf8xY8bY+7Rt21YNGjTI8fxq1qypLl26XPUahIeH53iMi8uVvv76a/t7t3jx4urTp4+OHz+eLe66detq06ZNatmypfz9/VW5cmVNnz492/7S0tI0evRoVatWTRaLRRUqVNArr7yitLQ0h34X45kyZUq2fdSqVUsmk0nPPfecQ3t8fLxeeOEFVahQQRaLRdWqVdOECRNks9nsfS7/+3OlunXrql27dvbXF///Xf6+vqhIkSIaMGCA/fXVhhJe1K5duxz3bzKZtHXrVoe+J0+elJeXV7bjDxgwQOHh4Q59jx8/Ln9//2x/hwDAHUgIgCscPHhQd911lywWi5YuXaoyZcpk6zNr1iw99NBD8vLy0vjx4zVo0CD98MMPatWqleLj4x36Wq1W3XXXXQoLC9O7776rJk2aaPTo0Ro9enS2/c6ePVsffvihnn32WUVGRmrnzp3q0KGDYmJi7H127dqlFi1aaPfu3RoxYoTef/99BQYGqkePHlqwYEGO51SrVi3NmTNHc+bM0eTJk7Otnzt3rp555hmFhoZq8uTJmjNnjkaOHHmdV+7a5syZox07dmRrX7dunR566CFZrVa98847ucZ5NV5eXvr6668d2mbOnJljZee3335TmzZtlJiYqNGjR+vtt99WfHy8OnTooA0bNtj7vf3227r33nvVs2dPHT58OMfjHj58WD169NC9996rt99+O8c+5cuXt1//Tz75JNv6xx57TNu3b8+W/G3cuFH79u3To48+es3zb9iwof0YF5c777wzW7+33npL/fr1U/Xq1TVp0iS98MILWrFihdq0aZPtvXvu3Dndc889atKkid59912VL19egwcP1owZM+x9bDabunfvrokTJ6pbt2766KOP1KNHD02ePFm9e/fOdnw/Pz/NnDnToW3t2rU6evRotr4pKSlq27atvv76a/Xr108ffvih7rjjDkVGRmr48OHXvCb5Kafz/Oqrr+Tr65un7UeNGqXU1FR3hAYA2RkAjJkzZxqSjJ9++smoWrWqIcno3Llzjn3T09ONUqVKGXXr1jUuXLhgb//pp58MScaoUaPsbf379zckGc8//7y9zWazGV27djV8fX2NM2fOGIZhGIcPHzYkGf7+/saJEyfsff/66y9DkjFs2DB7W8eOHY169eoZqampDvts2bKlUb169Wzx3nHHHUb79u3try8ea+bMmfa2vn37GiEhIQ7ns3LlSkOS8d1339nb2rZta9x2223ZjvHee+8ZkozDhw/b2y5e04ttqampRsWKFY2777472/EjIyMNSUZUVFS2ON97771sx7vcxeP07dvXqFevnr09OTnZCAoKMh5++GFDkrFx40b7tapevbrRpUsXw2az2funpKQYlStXNu68806H/ScnJxtNmzY1brvtNiMhIcF+XVauXGnEx8cbderUMW6//XYjJSUlx/hatmxp1K1b1/76zJkzhiRj9OjR9rb4+HjDz8/PePXVVx22HTJkiBEYGGgkJSVd9RpUqlTJ6Nq1a7b2Z5991rj8Y/7IkSOGl5eX8dZbbzn027Fjh+Ht7e3Q3rZtW0OS8f7779vb0tLSjIYNGxqlSpUy0tPTDcMwjDlz5hhms9n4448/HPY5ffp0Q5Lx559/2tskGQ888IDh7e1t/P333/b2J554wv7/6dlnn7W3v/HGG0ZgYKCxb98+h32PGDHC8PLyMo4dO2YYxtXfK7fddpvRtm1b++uc3tcXBQYGGv3797e/vvjeuvjeyUnbtm1z3H/fvn2NEiVKGGlpafZ11atXt5/n5cfv37+/UalSJfvrnTt3Gmaz2f535fK/VwDgDlQIgMsMGDBAx48f18MPP6xff/1V3333XbY+f//9t06fPq1nnnnG4dfnrl27qlatWlq8eHG2bS4fBnFxWER6erqWL1/u0K9Hjx4qV66c/XWzZs3UvHlz/fzzz5KkuLg4/fbbb3rooYd0/vx5xcbGKjY2VmfPnlWXLl20f//+bMOW0tPTZbFYrnre58+fV0BAgFvnSUybNk1nz57NsTJy/vx5mc1mhYSEOL3/xx57THv27LEP7/j+++8VHBysjh07OvTbunWr9u/fr4cfflhnz561X8Pk5GR17NhRq1evdhiOEhAQoB9//FFxcXH2KoaUVfnp3bu3zp07p0WLFsnf3z/HuFJTU695XYODg3Xffffpv//9r30omdVq1dy5c9WjRw8FBgY6fV0u98MPP8hms+mhhx6yn3dsbKxKly6t6tWra+XKlQ79vb299dRTT9lf+/r66qmnntLp06e1adMmSVlD52rXrq1atWo57LNDhw6SlG2fYWFh6tq1q/3X85SUFM2bN08DBw7MFu93332n1q1bq1ixYg777tSpk6xWq1avXu3QPyUlxaFfbGxsrncGu/zvz8UlNwkJCYqNjdX58+dz7XOlbt26yWQy2Yfy/fHHHzpx4kSOVZMrRUZGqnHjxnrwwQfzfDwAuBEkBMBl4uLi9PXXX+urr75Sw4YNNXToUCUkJDj0uTi0oWbNmtm2r1WrVrahD2azWVWqVHFoq1GjhiRlGxtcvXr1bPusUaOGvd+BAwdkGIZef/11hYaGOiwXv2ifPn3aYfv4+HgVKVLkqucdERGhU6dOacyYMTp27JhiY2OznfeNSEhI0Ntvv63hw4crLCwsx+PbbDYNHTpUBw8eVGxsrM6dO3ddxwgNDVXXrl3tw1lmzJih/v37y2x2/Jjbv3+/JKl///7ZruEXX3yhtLS0bOeempqq+Ph4LV261D5PIDIyUkuXLlVCQkK2sfKXi42NzXEOypX69eunY8eO6Y8//pAkLV++XDExMXrsscfyfhGuYf/+/TIMQ9WrV8927rt378723ilbtmy2ZOTK9+7+/fu1a9eubPu72O/KfUrSwIED9Z///EdpaWn67rvvVKxYMXsCcWW8S5YsybbvTp065bjv0aNHZ+u7Z8+eHK/F448/nq1vcnJyjn07deqk0NBQBQUFqVixYnrmmWdy7XuRj4+PHn30UYf34/3336+goKCrbrdmzRr9+OOPmjBhQo7zPwDAHbzzOwDgVvLee+/Zf5X77LPP1KJFC0VGRurjjz/O58iyXPzl+qWXXsp1omm1atUcXkd
"text/plain": [
"<Figure size 1000x800 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from imblearn.over_sampling import RandomOverSampler\n",
"\n",
"# Визуализация распределения зарплат в обучающей выборке\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(y_train, bins=30, kde=True, color='blue')\n",
"plt.title('Распределение зарплат в обучающей выборке')\n",
"plt.xlabel('Зарплата в USD')\n",
"plt.ylabel('Частота')\n",
"plt.show()\n",
"\n",
"ros = RandomOverSampler(random_state=42)\n",
"X_train_ros, y_train_ros = ros.fit_resample(X_train, y_train)\n",
"\n",
"# Визуализация распределения после oversampling\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(y_train_ros, bins=30, kde=True, color='green')\n",
"plt.title('Распределение зарплат после oversampling')\n",
"plt.xlabel('Зарплата в USD')\n",
"plt.ylabel('Частота')\n",
"plt.show()\n",
"\n",
"from imblearn.under_sampling import RandomUnderSampler\n",
"\n",
"rus = RandomUnderSampler(random_state=42)\n",
"X_train_rus, y_train_rus = rus.fit_resample(X_train, y_train)\n",
"\n",
"# Визуализация распределения после oversampling\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(y_train_ros, bins=30, kde=True, color='green')\n",
"plt.title('Распределение зарплат после oversampling')\n",
"plt.xlabel('Зарплата в USD')\n",
"plt.ylabel('Частота')\n",
"plt.show()\n",
"\n",
"print(f\"Количество записей в обучающей выборке до аугментации: {len(y_train)}\")\n",
"print(f\"Количество записей в обучающей выборке после oversampling: {len(y_train_ros)}\")\n",
"print(f\"Количество записей в обучающей выборке после undersampling: {len(y_train_rus)}\")\n",
"print()\n",
"\n",
"train_df, val_df = train_test_split(df, test_size=0.4, random_state=42)\n",
"val_df, test_df = train_test_split(val_df, test_size=0.5, random_state=42)\n",
"\n",
"# Функция для проверки распределения\n",
"def check_balance(df, name):\n",
" counts = df['salary_in_usd'].value_counts() # Обращение к столбцу 'salary_in_usd'\n",
" print(f\"Распределение salary_in_usd в {name}:\")\n",
" print(counts)\n",
" print()\n",
"\n",
"check_balance(train_df, \"обучающей выборке\")\n",
"check_balance(val_df, \"контрольной выборке\")\n",
"check_balance(test_df, \"тестовой выборке\")\n",
"print()\n",
"\n",
"# Корреляция\n",
"# Сначала отбираем только числовые столбцы\n",
"numeric_df = df.select_dtypes(include='number')\n",
"correlation_matrix = numeric_df.corr()\n",
"\n",
"# Визуализация корреляционной матрицы\n",
"plt.figure(figsize=(10, 8))\n",
"sns.heatmap(correlation_matrix, annot=True, fmt=\".2f\", cmap='coolwarm', square=True)\n",
"plt.title(\"Корреляция между переменными\")\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Таким образом, мы проанализировали 3 датасета. Посмотрели какие проблемы с ними могут быть связаны, возможные пути их решения. \n",
"Разбили выборки, далее их сбалансировали, с помощью методов OverSampling и UnderSampling. Методы oversampling и undersampling лучше использовать для задач классификации, где целевая переменная — дискретные классы. Для регрессионных задач эти методы напрямую не применимы. Методы аугментации данных для регрессии, такие как SMOTE для регрессии, могут также помочь в увеличении количества обучающих данных и улучшении качества модели."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Вроде бы всё... Вроде бы получилось :)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "mai",
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}