2022-06-12 17:45:18 +02:00
|
|
|
|
{
|
|
|
|
|
"cells": [
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"slideshow": {
|
|
|
|
|
"slide_type": "slide"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"source": [
|
|
|
|
|
"# Regresja wielomianowa"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 137,
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"slideshow": {
|
|
|
|
|
"slide_type": "notes"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"import ipywidgets as widgets\n",
|
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
|
|
|
|
"import numpy as np\n",
|
|
|
|
|
"import pandas\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"%matplotlib inline"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 138,
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"slideshow": {
|
|
|
|
|
"slide_type": "notes"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"# Przydatne funkcje\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def cost(theta, X, y):\n",
|
|
|
|
|
" \"\"\"Wersja macierzowa funkcji kosztu\"\"\"\n",
|
|
|
|
|
" m = len(y)\n",
|
|
|
|
|
" J = 1.0 / (2.0 * m) * ((X * theta - y).T * (X * theta - y))\n",
|
|
|
|
|
" return J.item()\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def gradient(theta, X, y):\n",
|
|
|
|
|
" \"\"\"Wersja macierzowa gradientu funkcji kosztu\"\"\"\n",
|
|
|
|
|
" return 1.0 / len(y) * (X.T * (X * theta - y)) \n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def gradient_descent(fJ, fdJ, theta, X, y, alpha=0.1, eps=10**-7):\n",
|
|
|
|
|
" \"\"\"Algorytm gradientu prostego (wersja macierzowa)\"\"\"\n",
|
|
|
|
|
" current_cost = fJ(theta, X, y)\n",
|
|
|
|
|
" logs = [[current_cost, theta]]\n",
|
|
|
|
|
" while True:\n",
|
|
|
|
|
" theta = theta - alpha * fdJ(theta, X, y)\n",
|
|
|
|
|
" current_cost, prev_cost = fJ(theta, X, y), current_cost\n",
|
|
|
|
|
" if abs(prev_cost - current_cost) > 10**15:\n",
|
|
|
|
|
" print('Algorithm does not converge!')\n",
|
|
|
|
|
" break\n",
|
|
|
|
|
" if abs(prev_cost - current_cost) <= eps:\n",
|
|
|
|
|
" break\n",
|
|
|
|
|
" logs.append([current_cost, theta]) \n",
|
|
|
|
|
" return theta, logs\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def plot_data(X, y, xlabel, ylabel):\n",
|
|
|
|
|
" \"\"\"Wykres danych (wersja macierzowa)\"\"\"\n",
|
|
|
|
|
" fig = plt.figure(figsize=(16*.6, 9*.6))\n",
|
|
|
|
|
" ax = fig.add_subplot(111)\n",
|
|
|
|
|
" fig.subplots_adjust(left=0.1, right=0.9, bottom=0.1, top=0.9)\n",
|
|
|
|
|
" ax.scatter([X[:, 1]], [y], c='r', s=50, label='Dane')\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" ax.set_xlabel(xlabel)\n",
|
|
|
|
|
" ax.set_ylabel(ylabel)\n",
|
|
|
|
|
" ax.margins(.05, .05)\n",
|
|
|
|
|
" plt.ylim(y.min() - 1, y.max() + 1)\n",
|
|
|
|
|
" plt.xlim(np.min(X[:, 1]) - 1, np.max(X[:, 1]) + 1)\n",
|
|
|
|
|
" return fig\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def plot_fun(fig, fun, X):\n",
|
|
|
|
|
" \"\"\"Wykres funkcji `fun`\"\"\"\n",
|
|
|
|
|
" ax = fig.axes[0]\n",
|
|
|
|
|
" x0 = np.min(X[:, 1]) - 1.0\n",
|
|
|
|
|
" x1 = np.max(X[:, 1]) + 1.0\n",
|
|
|
|
|
" Arg = np.arange(x0, x1, 0.1)\n",
|
|
|
|
|
" Val = fun(Arg)\n",
|
|
|
|
|
" return ax.plot(Arg, Val, linewidth='2')"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 139,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"def MSE(Y_true, Y_pred):\n",
|
|
|
|
|
" return np.square(np.subtract(Y_true,Y_pred)).mean()"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 140,
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"slideshow": {
|
|
|
|
|
"slide_type": "fragment"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"# Funkcja regresji wielomianowej\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def h_poly(Theta, x):\n",
|
|
|
|
|
" \"\"\"Funkcja wielomianowa\"\"\"\n",
|
|
|
|
|
" return sum(theta * np.power(x, i) for i, theta in enumerate(Theta.tolist()))\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def get_poly_data(data, deg):\n",
|
|
|
|
|
" m, n_plus_1 = data.shape\n",
|
|
|
|
|
" n = n_plus_1 - 1\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" X1 = data[:, 0:n]\n",
|
|
|
|
|
" X1 /= np.amax(X1, axis=0)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" Xs = [np.ones((m, 1)), X1]\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" for i in range(2, deg+1):\n",
|
|
|
|
|
" Xn = np.power(X1, i)\n",
|
|
|
|
|
" Xn /= np.amax(Xn, axis=0)\n",
|
|
|
|
|
" Xs.append(Xn)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" X = np.matrix(np.concatenate(Xs, axis=1)).reshape(m, deg * n + 1)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" y = np.matrix(data[:, -1]).reshape(m, 1)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" return X, y\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"\n",
|
2022-06-15 20:06:32 +02:00
|
|
|
|
"def polynomial_regression(X, y, n):\n",
|
2022-06-12 17:45:18 +02:00
|
|
|
|
" \"\"\"Funkcja regresji wielomianowej\"\"\"\n",
|
|
|
|
|
" theta_start = np.matrix([0] * (n+1)).reshape(n+1, 1)\n",
|
|
|
|
|
" theta, logs = gradient_descent(cost, gradient, theta_start, X, y)\n",
|
|
|
|
|
" return lambda x: h_poly(theta, x)"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 141,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"def predict_values(model, data, n):\n",
|
|
|
|
|
" x, y = get_poly_data(np.array(data), n)\n",
|
|
|
|
|
" preprocessed_x = []\n",
|
|
|
|
|
" for i in x:\n",
|
|
|
|
|
" preprocessed_x.append(i.item(1))\n",
|
|
|
|
|
" return y, model(preprocessed_x), MSE(y, model(preprocessed_x))\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def plot_and_mse(data, data_test, n):\n",
|
|
|
|
|
" x, y = get_poly_data(np.array(data), n)\n",
|
|
|
|
|
" model = polynomial_regression(x, y, n)\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" fig = plot_data(x, y, xlabel='x', ylabel='y')\n",
|
|
|
|
|
" plot_fun(fig, polynomial_regression(x, y, n), x)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" y_true, Y_pred, mse = predict_values(model, data_test, n)\n",
|
|
|
|
|
" print(f'Wielomian {n} stopnia, MSE = {mse}')"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 152,
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"slideshow": {
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"slide_type": "notes"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"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>sqrMetres</th>\n",
|
|
|
|
|
" <th>price</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </thead>\n",
|
|
|
|
|
" <tbody>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>49</th>\n",
|
|
|
|
|
" <td>37</td>\n",
|
|
|
|
|
" <td>338000.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1171</th>\n",
|
|
|
|
|
" <td>90</td>\n",
|
|
|
|
|
" <td>855000.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>368</th>\n",
|
|
|
|
|
" <td>16</td>\n",
|
|
|
|
|
" <td>399000.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1206</th>\n",
|
|
|
|
|
" <td>58</td>\n",
|
|
|
|
|
" <td>359602.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1500</th>\n",
|
|
|
|
|
" <td>20</td>\n",
|
|
|
|
|
" <td>424977.14</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>...</th>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>50</th>\n",
|
|
|
|
|
" <td>78</td>\n",
|
|
|
|
|
" <td>420000.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>396</th>\n",
|
|
|
|
|
" <td>52</td>\n",
|
|
|
|
|
" <td>275000.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1367</th>\n",
|
|
|
|
|
" <td>55</td>\n",
|
|
|
|
|
" <td>192750.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>771</th>\n",
|
|
|
|
|
" <td>62</td>\n",
|
|
|
|
|
" <td>558745.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>337</th>\n",
|
|
|
|
|
" <td>55</td>\n",
|
|
|
|
|
" <td>246330.00</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </tbody>\n",
|
|
|
|
|
"</table>\n",
|
|
|
|
|
"<p>1674 rows × 2 columns</p>\n",
|
|
|
|
|
"</div>"
|
|
|
|
|
],
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"text/plain": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" sqrMetres price\n",
|
|
|
|
|
"49 37 338000.00\n",
|
|
|
|
|
"1171 90 855000.00\n",
|
|
|
|
|
"368 16 399000.00\n",
|
|
|
|
|
"1206 58 359602.00\n",
|
|
|
|
|
"1500 20 424977.14\n",
|
|
|
|
|
"... ... ...\n",
|
|
|
|
|
"50 78 420000.00\n",
|
|
|
|
|
"396 52 275000.00\n",
|
|
|
|
|
"1367 55 192750.00\n",
|
|
|
|
|
"771 62 558745.00\n",
|
|
|
|
|
"337 55 246330.00\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"\n",
|
|
|
|
|
"[1674 rows x 2 columns]"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 152,
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"metadata": {},
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"output_type": "execute_result"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"# Wczytanie danych (mieszkania) przy pomocy biblioteki pandas\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"alldata = pandas.read_csv('data_flats.tsv', header=0, sep='\\t',\n",
|
|
|
|
|
" usecols=['price', 'rooms', 'sqrMetres'])\n",
|
|
|
|
|
"alldata = alldata[['sqrMetres', 'price']]\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"alldata = alldata.sample(frac=1)\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"alldata"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 153,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"# alldata = np.matrix(alldata[['sqrMetres', 'price']])\n",
|
|
|
|
|
"data_train = alldata[0:1600]\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"data_test = alldata[1600:]\n",
|
|
|
|
|
"data_train = np.matrix(data_train).astype(float)\n",
|
|
|
|
|
"data_test = np.matrix(data_test).astype(float)"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 144,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"Wielomian 1 stopnia, MSE = 41910519165.43458\n",
|
|
|
|
|
"Wielomian 2 stopnia, MSE = 60658890503.01548\n",
|
|
|
|
|
"Wielomian 3 stopnia, MSE = 63228721451.021095\n"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAFvCAYAAADkPtfiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAA/wElEQVR4nO3deXSW9Z3//9fnzkoWdhBIALVEkKVgYKy2aBWqldQ1sUO/7el26Nhva/ud1pk5XX490575TqvTOafTmVHHcZge63ynlg43KK1Yq4C1WDcSUMJmEK3cCfuaBBKyfH5/fO4shntN7vu+7uX5OCcn4bquXPcnVwJ58VneH2OtFQAAALzj87oBAAAAuY5ABgAA4DECGQAAgMcIZAAAAB4jkAEAAHiMQAYAAOCxjAxkxpifGWOOGmMaY7z+z40xu40xu4wxv0h2+wAAAOJhMrEOmTHmekltkh631s6Pcm2VpF9JWmatPWWMmWytPZqKdgIAAMQiI3vIrLUvSjo5+Jgx5gPGmN8aY+qNMX8wxswJnvoLSQ9Za08FP5cwBgAA0kpGBrIwHpX0dWvtYkl/Lenh4PErJF1hjHnJGPOKMeYWz1oIAAAQQr7XDUgEY0yZpA9L+h9jTN/houD7fElVkm6QVCnpRWPMAmvt6RQ3EwAAIKSsCGRyPX2nrbWLQpwLSHrVWtsl6R1jzFtyAe31FLYPAAAgrKwYsrTWnpULW5+UJOMsDJ5+Uq53TMaYiXJ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U5NUVSWtXCmVl3vdKgDwhIklWwUr6t8s6YuSlkj6laT/tNa+ndzmXWzJkiV227ZtqX5
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAFvCAYAAADkPtfiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABVf0lEQVR4nO3dd3hUZdoG8PudzKRNQigJhBRKIITem4Ko2LFiISwWdLEuFiy76vbPLSq7FhTQVdwVG6JiBwsKFgSB0DsJoaQBCYFk0pOZ9/vjnSExTE1m5ky5f9fFNXDOmTMPk/bkLc8jpJQgIiIiIu3otA6AiIiIKNwxISMiIiLSGBMyIiIiIo0xISMiIiLSGBMyIiIiIo0xISMiIiLSWFAmZEKI/wohjgshdrp5/TQhxG4hxC4hxDu+jo+IiIjIEyIY65AJISYBqALwhpRysItrMwG8B2CylPKkEKKrlPK4P+IkIiIickdQjpBJKX8AUN7ymBCijxDiSyHEJiHEj0KI/tZTdwBYIKU8aX0ukzEiIiIKKEGZkDnwCoD7pJSjADwCYKH1eD8A/YQQPwkhfhZCXKpZhERERER26LUOwBuEEHEAzgbwvhDCdjjK+qgHkAngPABpAH4QQgyRUp7yc5hEREREdoVEQgY10ndKSjnczrlCAOullI0ADgoh9kMlaBv9GB8RERGRQyExZSmlrIRKtm4AAKEMs57+GGp0DEKIRKgpzHwNwiQiIiKyKygTMiHEE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9eNTINOACt3H0N5dYPW4RAREQApJd5ar6YrbxzH0TE
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
2022-06-12 17:45:18 +02:00
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAFvCAYAAADkPtfiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABSkUlEQVR4nO3dd3hUZdrH8e8z6Q0UCC10CCAgoCAqYtdVsVcU14q662JBt+i6+66uuhZ2dXVXsLGuZS0outiwrliwIEVAepOaAKGnkDrP+8dJTAwzyUwykzPl97muXJOcc+bMzSSQm6fct7HWIiIiIiLu8bgdgIiIiEi8U0ImIiIi4jIlZCIiIiIuU0ImIiIi4jIlZCIiIiIuU0ImIiIi4rKoTMiMMc8YY7YZYxYHeP1FxpilxpglxpiXwh2fiIiISDBMNNYhM8YcAxQBz1trBzVybS7wKnCCtXaXMaa9tXZbS8QpIiIiEoioHCGz1n4O7Kx7zBjT2xjzvjFmnjHmC2NM/+pT1wKTrLW7qp+rZExEREQiSlQmZH48BdxorR0G/AaYXH28L9DXGPOlMeYbY8yprkUoIiIi4kOi2wGEgjEmExgJvGaMqTmcUv2YCOQCxwFdgM+NMQdba3e3cJgiIiIiPsVEQoYz0rfbWjvUx7lNwGxrbQXwgzFmJU6CNqcF4xMRERHxKyamLK21e3GSrQsBjGNI9enpOKNjGGPa4UxhrnUhTBERERGfojIhM8a8DHwN9DP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nwnIbtoeNdGrhaJTeHcZXkUcBnwvTFmQfWxO4BuANbaJ4AZwGh
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"for n in range(1, 4):\n",
|
|
|
|
|
" plot_and_mse(data_train, data_test, n) "
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 145,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"# Ilość nauki do oceny"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 154,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"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>number_courses</th>\n",
|
|
|
|
|
" <th>time_study</th>\n",
|
|
|
|
|
" <th>Marks</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </thead>\n",
|
|
|
|
|
" <tbody>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>0</th>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>4.508</td>\n",
|
|
|
|
|
" <td>19.202</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>1</th>\n",
|
|
|
|
|
" <td>4</td>\n",
|
|
|
|
|
" <td>0.096</td>\n",
|
|
|
|
|
" <td>7.734</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>2</th>\n",
|
|
|
|
|
" <td>4</td>\n",
|
|
|
|
|
" <td>3.133</td>\n",
|
|
|
|
|
" <td>13.811</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>3</th>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>7.909</td>\n",
|
|
|
|
|
" <td>53.018</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>4</th>\n",
|
|
|
|
|
" <td>8</td>\n",
|
|
|
|
|
" <td>7.811</td>\n",
|
|
|
|
|
" <td>55.299</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>...</th>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>95</th>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>3.561</td>\n",
|
|
|
|
|
" <td>19.128</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>96</th>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>0.301</td>\n",
|
|
|
|
|
" <td>5.609</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>97</th>\n",
|
|
|
|
|
" <td>4</td>\n",
|
|
|
|
|
" <td>7.163</td>\n",
|
|
|
|
|
" <td>41.444</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>98</th>\n",
|
|
|
|
|
" <td>7</td>\n",
|
|
|
|
|
" <td>0.309</td>\n",
|
|
|
|
|
" <td>12.027</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>99</th>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>6.335</td>\n",
|
|
|
|
|
" <td>32.357</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </tbody>\n",
|
|
|
|
|
"</table>\n",
|
|
|
|
|
"<p>100 rows × 3 columns</p>\n",
|
|
|
|
|
"</div>"
|
|
|
|
|
],
|
|
|
|
|
"text/plain": [
|
|
|
|
|
" number_courses time_study Marks\n",
|
|
|
|
|
"0 3 4.508 19.202\n",
|
|
|
|
|
"1 4 0.096 7.734\n",
|
|
|
|
|
"2 4 3.133 13.811\n",
|
|
|
|
|
"3 6 7.909 53.018\n",
|
|
|
|
|
"4 8 7.811 55.299\n",
|
|
|
|
|
".. ... ... ...\n",
|
|
|
|
|
"95 6 3.561 19.128\n",
|
|
|
|
|
"96 3 0.301 5.609\n",
|
|
|
|
|
"97 4 7.163 41.444\n",
|
|
|
|
|
"98 7 0.309 12.027\n",
|
|
|
|
|
"99 3 6.335 32.357\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"[100 rows x 3 columns]"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 154,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"output_type": "execute_result"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"data_marks_all = pandas.read_csv('Student_Marks.csv')\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"data_marks_all"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 155,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"outputs": [],
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"source": [
|
|
|
|
|
"data_marks_all = data_marks_all[['time_study', 'Marks']]\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"# data_marks_all = data_marks_all.sample(frac=1)\n",
|
|
|
|
|
"data_marks_train = data_marks_all[0:70]\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"data_marks_test = data_marks_all[70:]\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"data_marks_train = np.matrix(data_marks_train).astype(float)\n",
|
|
|
|
|
"data_marks_test = np.matrix(data_marks_test).astype(float)"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 156,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"Wielomian 1 stopnia, MSE = 383.05506630630464\n",
|
|
|
|
|
"Wielomian 2 stopnia, MSE = 394.48126522686164\n",
|
|
|
|
|
"Wielomian 3 stopnia, MSE = 392.8631214454169\n"
|
|
|
|
|
]
|
2022-06-18 11:52:01 +02:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmAAAAFkCAYAAACHEodbAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAA7jUlEQVR4nO3deXxU9f3v8dd3spJJ2PcAAhJBFIKKW029LnWLuyzpblt69VbbXzWoqNXaqnUH673WtpZqbW1rADcquFWxijtYIpuSgKLsO0wCWed7/ziJCWFmMpPMzJmZvJ+PB49J5pw583EM8OH7/ZzPx1hrEREREZH48bgdgIiIiEhXowRMREREJM6UgImIiIjEmRIwERERkThTAiYiIiISZ0rAREREROIs3e0AwtG3b187fPhwt8MQEZEUtHlvDTuqaslK91DQPw9j3I5IksnSpUt3WGv7Rfq6pEjAhg8fzpIlS9wOQ0REUsx763byrT+9xxBjePaqrzF+SE+3Q5IkY4xZ35HXJUUCJiIiScDng7IyqKiAggIoKYG8PLejCqqqtoHr5pZjLVx9xiglXxJXSsBERKTzFi+G4mLw+6G6GrxeKC2FhQuhqMjt6AK684VVbNh9gKPzu/OzM0a5HY50MSrCFxGRzvH5nOTL53OSL3Aem5+vqnI3vgBe/2QrT334JZnpHmZNnUBGmv46lPjST5yIiHROWZmz8hWI3+8cTyC7q+uY8fRyAK4/ezRHDEjcbVJJXUrARESkcyoqWla+2qquhsrK+MYTgrWWW55bwXZfLScM782Pika4HZJ0UUrARESkcwoKnJqvQLxeGJU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:00
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmAAAAFkCAYAAACHEodbAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABLVklEQVR4nO3deXxU5dn/8c89k30jLGEL+74KalBRXEDrgntdcK1taW2ttqV0gbY+T/u0/qq1m1itVWlr3SpW3MV9A5RdQFZJ2CFA2DNJyDr3748zITFM9sycmcn3/XrxmuScM5PLMYQr932d6zLWWkREREQkfDxuByAiIiLS3igBExEREQkzJWAiIiIiYaYETERERCTMlICJiIiIhJkSMBEREZEwi3M7gKbo0qWL7devn9thiIhIG9m0z0dZpZ9+nVNJT4qKf4pEglqxYsUBa21Wc58XFd/1/fr1Y/ny5W6HISIibSCvwMcFf55Ph+R4lt99AfFebcZI9DLGbG/J86IiARMRkSjg88GcOZCbC4MHw5QpkJ5+wmVvrtkLwFdGdFPyJe2WEjAREWm9hQth8mTw+6G4GFJTYfp0mDcPJkz40qXz1joJ2OTR3d2IVCQi6FcPERFpHZ/PSb58Pif5Auex+nhR0fFLtx4oZsOeQtIT4zhrUBeXAhZxnxIwERFpnTlznJWvYPx+53zAm2v3AHDBiG4kxnnDEZ1IRFICJiIirZObW7PyVVdxMeTlHf903honAbtklLYfpX1TAiYiIq0zeLBT8xVMaioMGgTAjoMlrN1dSGqCl3OGNPuufZGYogRMRERaZ8oU8NTzz4nH45ynZvvx/OHdSIrX9qO0b0rARESkddLTnbsd09NrVsJ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"<Figure size 691.2x388.8 with 1 Axes>"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmAAAAFkCAYAAACHEodbAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABAcUlEQVR4nO3deXiU1d3/8feZLIRMAgESIIQlbAYoCAoqCiruimvrElvbqg8ttdrF0gXbp33ap+3zq0sXbbW1llq7Kak7Iu6gAi4syqpAwh4gQFgn+zLn98c9QxZmss+az+u6ck1y3/dMDkOAD+d87+8x1lpEREREJHxckR6AiIiISHejACYiIiISZgpgIiIiImGmACYiIiISZgpgIiIiImGmACYiIiISZomRHkBbZGZm2tzc3EgPQ0REOqmmzsvm/R5cxjAuuxfGRHpEIp2zevXqUmttVnufFxMBLDc3l1WrVkV6GCIi0klPLN/Oz176hCsnZPPILadHejginWaM2dmR58VEABMRkRjg8UBBARQWwujRkJ8P6elNLnlr0wEALhrbPxIjFIkaCmAiItJ5y5bBzJng9UJ5ObjdMGcOLFoE06cD4Kmq5YNth3AZuCBPAUy6NxXhi4hI53g8TvjyeJzwBc6j/3hZGQDvbimltt4yZVhf+riTIzhgkchTABMRkc4pKHBmvgLxep3zwFuf7ge0/CgCCmAiItJZhYUNM1/NlZdDURF19V4Wb3bqvy4eNyCMgxOJTgpgIiLSOaNHOzVfgbjdMGoUH+06ytGKWoZnuhmZlRbe8YlEIQUwERHpnPx8cAX558Tlgvz8huXHMVp+FAEFMBER6az0d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|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"for n in range(1, 4):\n",
|
|
|
|
|
" plot_and_mse(data_marks, data_marks_test, n) "
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 149,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"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>age</th>\n",
|
|
|
|
|
" <th>sex</th>\n",
|
|
|
|
|
" <th>bmi</th>\n",
|
|
|
|
|
" <th>children</th>\n",
|
|
|
|
|
" <th>smoker</th>\n",
|
|
|
|
|
" <th>region</th>\n",
|
|
|
|
|
" <th>charges</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </thead>\n",
|
|
|
|
|
" <tbody>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>238</th>\n",
|
|
|
|
|
" <td>19</td>\n",
|
|
|
|
|
" <td>male</td>\n",
|
|
|
|
|
" <td>29.070</td>\n",
|
|
|
|
|
" <td>0</td>\n",
|
|
|
|
|
" <td>yes</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>northwest</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>17352.68030</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>809</th>\n",
|
|
|
|
|
" <td>25</td>\n",
|
|
|
|
|
" <td>male</td>\n",
|
|
|
|
|
" <td>25.840</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>no</td>\n",
|
|
|
|
|
" <td>northeast</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>3309.79260</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1053</th>\n",
|
|
|
|
|
" <td>47</td>\n",
|
|
|
|
|
" <td>male</td>\n",
|
|
|
|
|
" <td>29.800</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>yes</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>southwest</td>\n",
|
|
|
|
|
" <td>25309.48900</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>1177</th>\n",
|
|
|
|
|
" <td>40</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>female</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>27.400</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>no</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>southwest</td>\n",
|
|
|
|
|
" <td>6496.88600</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>964</th>\n",
|
|
|
|
|
" <td>52</td>\n",
|
|
|
|
|
" <td>male</td>\n",
|
|
|
|
|
" <td>36.765</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>no</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>northwest</td>\n",
|
|
|
|
|
" <td>26467.09737</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>...</th>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" <td>...</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>374</th>\n",
|
|
|
|
|
" <td>20</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>male</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>33.330</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>0</td>\n",
|
|
|
|
|
" <td>no</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>southeast</td>\n",
|
|
|
|
|
" <td>1391.52870</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>950</th>\n",
|
|
|
|
|
" <td>57</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>male</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>18.335</td>\n",
|
|
|
|
|
" <td>0</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>no</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>northeast</td>\n",
|
|
|
|
|
" <td>11534.87265</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>954</th>\n",
|
|
|
|
|
" <td>34</td>\n",
|
|
|
|
|
" <td>male</td>\n",
|
|
|
|
|
" <td>27.835</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>yes</td>\n",
|
|
|
|
|
" <td>northwest</td>\n",
|
|
|
|
|
" <td>20009.63365</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>521</th>\n",
|
|
|
|
|
" <td>32</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>female</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>44.220</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>0</td>\n",
|
|
|
|
|
" <td>no</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>southeast</td>\n",
|
|
|
|
|
" <td>3994.17780</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <th>963</th>\n",
|
|
|
|
|
" <td>46</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" <td>male</td>\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
" <td>24.795</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>no</td>\n",
|
|
|
|
|
" <td>northeast</td>\n",
|
|
|
|
|
" <td>9500.57305</td>\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </tbody>\n",
|
|
|
|
|
"</table>\n",
|
|
|
|
|
"<p>1338 rows × 7 columns</p>\n",
|
|
|
|
|
"</div>"
|
|
|
|
|
],
|
|
|
|
|
"text/plain": [
|
|
|
|
|
" age sex bmi children smoker region charges\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"238 19 male 29.070 0 yes northwest 17352.68030\n",
|
|
|
|
|
"809 25 male 25.840 1 no northeast 3309.79260\n",
|
|
|
|
|
"1053 47 male 29.800 3 yes southwest 25309.48900\n",
|
|
|
|
|
"1177 40 female 27.400 1 no southwest 6496.88600\n",
|
|
|
|
|
"964 52 male 36.765 2 no northwest 26467.09737\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"... ... ... ... ... ... ... ...\n",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"374 20 male 33.330 0 no southeast 1391.52870\n",
|
|
|
|
|
"950 57 male 18.335 0 no northeast 11534.87265\n",
|
|
|
|
|
"954 34 male 27.835 1 yes northwest 20009.63365\n",
|
|
|
|
|
"521 32 female 44.220 0 no southeast 3994.17780\n",
|
|
|
|
|
"963 46 male 24.795 3 no northeast 9500.57305\n",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"\n",
|
|
|
|
|
"[1338 rows x 7 columns]"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 149,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"output_type": "execute_result"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"data_ins = pandas.read_csv('insurance.csv')\n",
|
|
|
|
|
"data_ins = data_ins.sample(frac=1)\n",
|
|
|
|
|
"data_ins"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 150,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"outputs": [],
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"source": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"data_ins = data_ins[['age', 'charges']]\n",
|
|
|
|
|
"data_ins_train = data_ins[0:1200]\n",
|
|
|
|
|
"data_ins_test = data_ins[1200:]\n",
|
|
|
|
|
"data_ins_train = np.matrix(data_ins_train).astype(float)\n",
|
|
|
|
|
"data_ins_test = np.matrix(data_ins_test).astype(float)"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"execution_count": 151,
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"Wielomian 1 stopnia, MSE = 146688971.1828306\n",
|
|
|
|
|
"Wielomian 2 stopnia, MSE = 146881616.236919\n",
|
|
|
|
|
"Wielomian 3 stopnia, MSE = 146891792.9142127\n"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 11:52:01 +02:00
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnMAAAFkCAYAAABLi72wAAAAOXRFWH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5CMdF5/PxgD3d2Rr11aCn19UFHhzqmuducPDkJX1+Hnq6+uSNzyLpjLVwrmRCTjli2D66+P3J6suhpuvz1zGbvxBpJe56VTpt+vyAiSbDCnDhAiIumWyz6zLS1uliySwUH3fKzz0kl9dUUyTsGciEi65bLPbLyBpNd56aS+uiIZp2BORCTdctlnNt5A0uu8srL0jUd9dUUyTsGciEi6ZbrPbCDg9uXddJN7DN/3Fm8g6XVeb2/iY6qsdO9LfXVFsk4JECIimbJvX/r7zA7PQK2qct9ffjmcfXZiZUKGXysVd94Jl10GS5bAxo3wiU/AqafCzp2qOScSJ2WzxknBnIgUrFgZqFVVUFzsgrZTTokvkNy3D5Yvd0WBk5mRC6msdPfu64OenkOfU805kbgkG8xlup2XiIikS6wM1FCdt/nzXQmSeMqB1NRAebmrH5dKMHfgQPTnQrN+oXFp2VUkrbRnTkSkUMSbgXrgAFx7bfw15OK9rjHxXS+avr6h0igikjYK5kRECoVXBmq4/n743e/ckuzatalft6zM7Xf7znfiu3803d3wxhvJv15EItIyq4iMbplsDh/t2snes7nZ7W2LR1+f+4pnadPrumVlcPPN7nHzZhgYiO/+0Xz0UWqvF5HDKJgTkdErUm/SG29Mz0b9aNdeutRlfCZzz9pa9/prr41/HKGuD17750IlRCJlwA4fb0WFe01xcXKB3YQJib9
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"text/plain": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
]
|
|
|
|
|
},
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnMAAAFkCAYAAABLi72wAAA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lziww02ygdSMCciKZfpPrOxBpKhzmtqAmOgri70tQsLobERSkrcOR6PO7+5GWprDzxffXVFYpZ1wVy2UjAnIik3YwZMmRK6PZnHA9Onpy5jN9ZAMtJ5yZTqzyvSgSQazKkDhIhIsmWyz+ycOW6WLJTmZvd6tPOSSX11RVJOwZyISLJlss9srIFkpPOSSX11RVJOwZyISLJlss9srIFkpPOKipI3HvXVFUk5BXMiIsmW6j6zXq/bl3frre4xeN9brIFkpPMaGuIfU2mp+1zqqysSVUNTM7c/9SFLP9+dlOspAUJEJFWqq5PfZ7ZtBmpZmXt+0UVw2mnxlQlpe632eOABuPBCmDoVVq2CQw6B0aNh+3bVnBMJsqumgR/9bSnvrN/FwB6lvHTzqRTmu/+xUjZrjBTMiUjOipaBWlYG+fkuaBs1KrZAsroaZs50RYETmZELKC11925shPr61q+p5pwIAGu3efm3R5bwxa5a+nYpYcakMRxZ2fXL1xMN5lLdzktERJIlWgZqoM7b+PGuBEks5UDKy6G42NWPa08wt39/+NcCs36BcWnZVTqhf63ezvV/fw9vXRNHVXZlxqQx9OlSkpRra8+ciEiuiDUDdf9+uP762GvIxXpdY2K7XjiNjS2lUUQ6kVlvrud7j7yLt66J8Uf15bEfnpS0QA4UzImI5I5IGajBmprg0Ufdkuzixe2/blGR2+/2s5/Fdv9w6urgo48Sf79IjmnyNfPLeSv4xbyV+JotN5x+KPdffiy
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
|
|
|
|
},
|
|
|
|
|
{
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"data": {
|
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnMAAAFkCAYAAABLi72wAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bG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KVlVhERiUz9biUFGpsst8/+CIBrRh5MpwrtlUuUgjkREQlP/W4lRR5fuI5lm3xUtS9VXblW0jKriIiEpn63kiK7axv43XPLAbhp1EBKCvM9HlF2UzAnIiKhqd+tpMgDr61mi6+WI3q045tDD/J6OFlPwZyIiISmfreSApt31vDAa6sBuO2sweTlGY9HlP0UzImISGjqdysp8Ltnl7O3vpFRh3Xj2D4dvB5Om6BgTkREQlO/W0myJRt2MP3ddRTmGyaMHuT1cNoMZbOKSGZRGYzMEehr2zKbNS9P/W4lbtZafuMvEHzZ8D706RRm1lfipmBORDKHymBkHvW7lSR5efkW/rNqG+1KC/nxqVqiTyYFcyKSGYLLYAQENt+PGeMCCgUQ3lC/W2mlhsYmfjNnGQDXndKf9mVFHo+obdGeORHJDCqDIdJmPfLOWlZt2UXvjmVcfnwfr4fT5iiYE5HMoDIYIm2Sr6aePz6/AoAJowZRVKDQI9n0iYpIZlAZDJE2adIrH7Ntdx3H9jmQUUO6eT2cNknBnIhkBpXBEGlz1n2xh7/P+wSA/zpzMMaoQHAqpDSYM8Z8aoz5wBjzvjFmgf9YB2PM88aYlf7HA/3HjTHmT8aYVcaYxcaYo4OuM85//kpjzLig48f4r7/K/1r9VyKSrQJlMCorm2foysubjyv5QSTr/PbZ5dQ
|
|
|
|
|
"text/plain": [
|
|
|
|
|
"<Figure size 691.2x388.8 with 1 Axes>"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {
|
|
|
|
|
"needs_background": "light"
|
|
|
|
|
},
|
|
|
|
|
"output_type": "display_data"
|
2022-06-18 11:52:01 +02:00
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
2022-06-18 12:59:24 +02:00
|
|
|
|
"for n in range(1, 4):\n",
|
|
|
|
|
" plot_and_mse(data_ins_train, data_ins_test, n) "
|
2022-06-12 17:45:18 +02:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"author": "Paweł Skórzewski",
|
|
|
|
|
"celltoolbar": "Slideshow",
|
|
|
|
|
"email": "pawel.skorzewski@amu.edu.pl",
|
|
|
|
|
"kernelspec": {
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"display_name": "Python 3 (ipykernel)",
|
2022-06-12 17:45:18 +02:00
|
|
|
|
"language": "python",
|
|
|
|
|
"name": "python3"
|
|
|
|
|
},
|
|
|
|
|
"lang": "pl",
|
|
|
|
|
"language_info": {
|
|
|
|
|
"codemirror_mode": {
|
|
|
|
|
"name": "ipython",
|
|
|
|
|
"version": 3
|
|
|
|
|
},
|
|
|
|
|
"file_extension": ".py",
|
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
|
"name": "python",
|
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
|
"pygments_lexer": "ipython3",
|
2022-06-18 11:52:01 +02:00
|
|
|
|
"version": "3.8.12"
|
2022-06-12 17:45:18 +02:00
|
|
|
|
},
|
|
|
|
|
"livereveal": {
|
|
|
|
|
"start_slideshow_at": "selected",
|
|
|
|
|
"theme": "white"
|
|
|
|
|
},
|
|
|
|
|
"subtitle": "5.Regresja wielomianowa. Problem nadmiernego dopasowania[wykład]",
|
|
|
|
|
"title": "Uczenie maszynowe",
|
|
|
|
|
"year": "2021"
|
|
|
|
|
},
|
|
|
|
|
"nbformat": 4,
|
|
|
|
|
"nbformat_minor": 4
|
2022-06-18 11:52:01 +02:00
|
|
|
|
}
|