1
0
Fork 0
uczenie-maszynowe/wyk/04_Regresja_logistyczna.ipynb

6386 lines
269 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Uczenie maszynowe\n",
"# 4. Regresja logistyczna"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"**Uwaga**: Wbrew nazwie, *regresja* logistyczna jest algorytmem służącym do rozwiązywania problemów *klasyfikacji* (wcale nie problemów *regresji*!)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Do demonstracji metody regresji ligistycznej wykorzystamy klasyczny zbiór danych <a href=\"https://en.wikipedia.org/wiki/Iris_flower_data_set\">*Iris flower data set*</a>, składający się ze 150 przykładów wartości 4 cech dla 3 gatunków irysów (kosaćców)."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"### *Iris flower data set*\n",
"\n",
"* 150 przykładów\n",
"* 4 cechy\n",
"* 3 kategorie"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"| <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Kosaciec_szczecinkowaty_Iris_setosa.jpg/450px-Kosaciec_szczecinkowaty_Iris_setosa.jpg\"> | <img style=\"float: right;\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Iris_virginica.jpg/736px-Iris_virginica.jpg\"> | <img style=\"float: right;\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Blue_Flag%2C_Ottawa.jpg/600px-Blue_Flag%2C_Ottawa.jpg\"> |\n",
"| :--- | :--- | :--- |\n",
"| *Iris setosa* | *Iris virginica* | *Iris versicolor* |\n",
"| kosaciec szczecinkowy | kosaciec amerykański | kosaciec różnobarwny |\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"4 cechy:\n",
" * długość działek kielicha (*sepal length*, `sl`)\n",
" * szerokość działek kielicha (*sepal width*, `sw`)\n",
" * długość płatka (*petal length*, `pl`)\n",
" * szerokość płatka (*petal width*, `pw`)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## 4.1. Dwuklasowa regresja logistyczna"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Zacznijmy od najprostszego przypadku:\n",
" * ograniczmy się do **2** klas\n",
" * ograniczmy się do **1** zmiennej"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"→ dwuklasowa regresja logistyczna jednej zmiennej"
]
},
{
"cell_type": "code",
"execution_count": 147,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"# Przydatne importy\n",
"\n",
"import numpy as np\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import pandas\n",
"import ipywidgets as widgets\n",
"\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'\n",
"\n",
"from IPython.display import display, Math, Latex\n",
"\n",
"# Przydatne funkcje\n",
"\n",
"def LatexMatrix(matrix):\n",
" \"\"\"Wyświetlanie macierzy w LaTeX-u\"\"\"\n",
" ltx = r'\\left[\\begin{array}'\n",
" m, n = matrix.shape\n",
" ltx += '{' + (\"r\" * n) + '}'\n",
" for i in range(m):\n",
" ltx += r\" & \".join([('%.4f' % j.item()) for j in matrix[i]]) + r\" \\\\ \"\n",
" ltx += r'\\end{array}\\right]'\n",
" return ltx\n",
"\n",
"def h(theta, X):\n",
" \"\"\"Hipoteza (wersja macierzowa)\"\"\"\n",
" return X * theta\n",
"\n",
"def regdots(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 regline(fig, fun, theta, X):\n",
" \"\"\"Wykres krzywej regresji (wersja macierzowa)\"\"\"\n",
" ax = fig.axes[0]\n",
" x0 = np.min(X[:, 1]) - 1.0\n",
" x1 = np.max(X[:, 1]) + 1.0\n",
" L = [x0, x1]\n",
" LX = np.matrix([1, x0, 1, x1]).reshape(2, 2)\n",
" ax.plot(L, fun(theta, LX), linewidth='2',\n",
" label=(r'$y={theta0:.2}{op}{theta1:.2}x$'.format(\n",
" theta0=float(theta[0][0]),\n",
" theta1=(float(theta[1][0]) if theta[1][0] >= 0 else float(-theta[1][0])),\n",
" op='+' if theta[1][0] >= 0 else '-')))\n",
"\n",
"def legend(fig):\n",
" \"\"\"Legenda wykresu\"\"\"\n",
" ax = fig.axes[0]\n",
" handles, labels = ax.get_legend_handles_labels()\n",
" # try-except block is a fix for a bug in Poly3DCollection\n",
" try:\n",
" fig.legend(handles, labels, fontsize='15', loc='lower right')\n",
" except AttributeError:\n",
" pass\n",
"\n",
"def J(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 dJ(theta,X,y):\n",
" \"\"\"Wersja macierzowa gradientu funkcji kosztu\"\"\"\n",
" return 1.0 / len(y) * (X.T * (X * theta - y)) \n",
"\n",
"def GD(fJ, fdJ, theta, X, y, alpha=0.1, eps=10**-3):\n",
" \"\"\"Implementacja algorytmu gradientu prostego za pomocą numpy i macierzy\"\"\"\n",
" current_cost = fJ(theta, X, y)\n",
" while True:\n",
" theta = theta - alpha * fdJ(theta, X, y) # implementacja wzoru\n",
" current_cost, prev_cost = fJ(theta, X, y), current_cost\n",
" if current_cost > 10000:\n",
" break\n",
" if abs(prev_cost - current_cost) <= eps:\n",
" break\n",
" return theta\n",
"\n",
"theta_start = np.matrix([0, 0]).reshape(2, 1)\n",
"\n",
"def threshold(fig, theta):\n",
" \"\"\"Funkcja, która rysuje próg\"\"\"\n",
" x_thr = (0.5 - theta.item(0)) / theta.item(1)\n",
" ax = fig.axes[0]\n",
" ax.plot([x_thr, x_thr], [-1, 2],\n",
" color='orange', linestyle='dashed',\n",
" label=u'próg: $x={:.2F}$'.format(x_thr))"
]
},
{
"cell_type": "code",
"execution_count": 148,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" sl sw pl pw Gatunek\n",
"0 5.2 3.4 1.4 0.2 Iris-setosa\n",
"1 5.1 3.7 1.5 0.4 Iris-setosa\n",
"2 6.7 3.1 5.6 2.4 Iris-virginica\n",
"3 6.5 3.2 5.1 2.0 Iris-virginica\n",
"4 4.9 2.5 4.5 1.7 Iris-virginica\n",
"5 6.0 2.7 5.1 1.6 Iris-versicolor\n"
]
}
],
"source": [
"# Wczytanie pełnych (oryginalnych) danych\n",
"\n",
"data_iris = pandas.read_csv(\"iris.csv\")\n",
"print(data_iris[:6])\n"
]
},
{
"cell_type": "code",
"execution_count": 149,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" dł. płatka Iris setosa?\n",
"0 1.4 1\n",
"1 1.5 1\n",
"2 5.6 0\n",
"3 5.1 0\n",
"4 4.5 0\n",
"5 5.1 0\n"
]
}
],
"source": [
"# Ograniczenie danych do 2 klas i 1 cechy\n",
"\n",
"data_iris_setosa = pandas.DataFrame()\n",
"data_iris_setosa[\"dł. płatka\"] = data_iris[\"pl\"] # \"pl\" oznacza \"petal length\"\n",
"data_iris_setosa[\"Iris setosa?\"] = data_iris[\"Gatunek\"].apply(\n",
" lambda x: 1 if x == \"Iris-setosa\" else 0\n",
")\n",
"print(data_iris_setosa[:6])\n"
]
},
{
"cell_type": "code",
"execution_count": 150,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"# Przygotowanie danych\n",
"m, n_plus_1 = data_iris_setosa.values.shape\n",
"n = n_plus_1 - 1\n",
"Xn = data_iris_setosa.values[:, 0:n].reshape(m, n)\n",
"\n",
"X = np.matrix(np.concatenate((np.ones((m, 1)), Xn), axis=1)).reshape(m, n_plus_1)\n",
"y = np.matrix(data_iris_setosa.values[:, 1]).reshape(m, 1)\n",
"\n",
"# Regresja liniowa\n",
"theta_lin = GD(J, dJ, theta_start, X, y, alpha=0.03, eps=0.000001)\n"
]
},
{
"cell_type": "code",
"execution_count": 151,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"673.940937pt\" height=\"360.619219pt\" viewBox=\"0 0 673.940937 360.619219\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
" <metadata>\n",
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
" <cc:Work>\n",
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
" <dc:date>2022-11-03T15:23:33.850909</dc:date>\n",
" <dc:format>image/svg+xml</dc:format>\n",
" <dc:creator>\n",
" <cc:Agent>\n",
" <dc:title>Matplotlib v3.6.1, https://matplotlib.org/</dc:title>\n",
" </cc:Agent>\n",
" </dc:creator>\n",
" </cc:Work>\n",
" </rdf:RDF>\n",
" </metadata>\n",
" <defs>\n",
" <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 360.619219 \n",
"L 673.940937 360.619219 \n",
"L 673.940937 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"L 52.160938 10.999219 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"PathCollection_1\">\n",
" <defs>\n",
" <path id=\"mee0d9ecbeb\" d=\"M 0 3.535534 \n",
"C 0.937635 3.535534 1.836992 3.163008 2.5 2.5 \n",
"C 3.163008 1.836992 3.535534 0.937635 3.535534 0 \n",
"C 3.535534 -0.937635 3.163008 -1.836992 2.5 -2.5 \n",
"C 1.836992 -3.163008 0.937635 -3.535534 0 -3.535534 \n",
"C -0.937635 -3.535534 -1.836992 -3.163008 -2.5 -2.5 \n",
"C -3.163008 -1.836992 -3.535534 -0.937635 -3.535534 0 \n",
"C -3.535534 0.937635 -3.163008 1.836992 -2.5 2.5 \n",
"C -1.836992 3.163008 -0.937635 3.535534 0 3.535534 \n",
"z\n",
"\" style=\"stroke: #ff0000\"/>\n",
" </defs>\n",
" <g clip-path=\"url(#p04408d3520)\">\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"304.14271\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"311.142203\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"500.128532\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"122.155874\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"318.141697\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"493.129039\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"262.145748\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"535.126001\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"514.12752\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"129.155368\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path id=\"m0e44fa57db\" d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 0 -->\n",
" <g transform=\"translate(48.979688 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
"Q 1547 4250 1301 3770 \n",
"Q 1056 3291 1056 2328 \n",
"Q 1056 1369 1301 889 \n",
"Q 1547 409 2034 409 \n",
"Q 2525 409 2770 889 \n",
"Q 3016 1369 3016 2328 \n",
"Q 3016 3291 2770 3770 \n",
"Q 2525 4250 2034 4250 \n",
"z\n",
"M 2034 4750 \n",
"Q 2819 4750 3233 4129 \n",
"Q 3647 3509 3647 2328 \n",
"Q 3647 1150 3233 529 \n",
"Q 2819 -91 2034 -91 \n",
"Q 1250 -91 836 529 \n",
"Q 422 1150 422 2328 \n",
"Q 422 3509 836 4129 \n",
"Q 1250 4750 2034 4750 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"122.155874\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 1 -->\n",
" <g transform=\"translate(118.974624 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
"L 1825 531 \n",
"L 1825 4091 \n",
"L 703 3866 \n",
"L 703 4441 \n",
"L 1819 4666 \n",
"L 2450 4666 \n",
"L 2450 531 \n",
"L 3481 531 \n",
"L 3481 0 \n",
"L 794 0 \n",
"L 794 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"192.150811\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(188.969561 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
"L 3431 531 \n",
"L 3431 0 \n",
"L 469 0 \n",
"L 469 531 \n",
"Q 828 903 1448 1529 \n",
"Q 2069 2156 2228 2338 \n",
"Q 2531 2678 2651 2914 \n",
"Q 2772 3150 2772 3378 \n",
"Q 2772 3750 2511 3984 \n",
"Q 2250 4219 1831 4219 \n",
"Q 1534 4219 1204 4116 \n",
"Q 875 4013 500 3803 \n",
"L 500 4441 \n",
"Q 881 4594 1212 4672 \n",
"Q 1544 4750 1819 4750 \n",
"Q 2544 4750 2975 4387 \n",
"Q 3406 4025 3406 3419 \n",
"Q 3406 3131 3298 2873 \n",
"Q 3191 2616 2906 2266 \n",
"Q 2828 2175 2409 1742 \n",
"Q 1991 1309 1228 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"262.145748\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 3 -->\n",
" <g transform=\"translate(258.964498 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
"Q 3050 2419 3304 2112 \n",
"Q 3559 1806 3559 1356 \n",
"Q 3559 666 3084 287 \n",
"Q 2609 -91 1734 -91 \n",
"Q 1441 -91 1130 -33 \n",
"Q 819 25 488 141 \n",
"L 488 750 \n",
"Q 750 597 1062 519 \n",
"Q 1375 441 1716 441 \n",
"Q 2309 441 2620 675 \n",
"Q 2931 909 2931 1356 \n",
"Q 2931 1769 2642 2001 \n",
"Q 2353 2234 1838 2234 \n",
"L 1294 2234 \n",
"L 1294 2753 \n",
"L 1863 2753 \n",
"Q 2328 2753 2575 2939 \n",
"Q 2822 3125 2822 3475 \n",
"Q 2822 3834 2567 4026 \n",
"Q 2313 4219 1838 4219 \n",
"Q 1578 4219 1281 4162 \n",
"Q 984 4106 628 3988 \n",
"L 628 4550 \n",
"Q 988 4650 1302 4700 \n",
"Q 1616 4750 1894 4750 \n",
"Q 2613 4750 3031 4423 \n",
"Q 3450 4097 3450 3541 \n",
"Q 3450 3153 3228 2886 \n",
"Q 3006 2619 2597 2516 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_5\">\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"332.140684\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(328.959434 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
"L 825 1625 \n",
"L 2419 1625 \n",
"L 2419 4116 \n",
"z\n",
"M 2253 4666 \n",
"L 3047 4666 \n",
"L 3047 1625 \n",
"L 3713 1625 \n",
"L 3713 1100 \n",
"L 3047 1100 \n",
"L 3047 0 \n",
"L 2419 0 \n",
"L 2419 1100 \n",
"L 313 1100 \n",
"L 313 1709 \n",
"L 2253 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_6\">\n",
" <g id=\"line2d_6\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"402.135621\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 5 -->\n",
" <g transform=\"translate(398.954371 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
"L 3169 4666 \n",
"L 3169 4134 \n",
"L 1269 4134 \n",
"L 1269 2991 \n",
"Q 1406 3038 1543 3061 \n",
"Q 1681 3084 1819 3084 \n",
"Q 2600 3084 3056 2656 \n",
"Q 3513 2228 3513 1497 \n",
"Q 3513 744 3044 326 \n",
"Q 2575 -91 1722 -91 \n",
"Q 1428 -91 1123 -41 \n",
"Q 819 9 494 109 \n",
"L 494 744 \n",
"Q 775 591 1075 516 \n",
"Q 1375 441 1709 441 \n",
"Q 2250 441 2565 725 \n",
"Q 2881 1009 2881 1497 \n",
"Q 2881 1984 2565 2268 \n",
"Q 2250 2553 1709 2553 \n",
"Q 1456 2553 1204 2497 \n",
"Q 953 2441 691 2322 \n",
"L 691 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_7\">\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"472.130558\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 6 -->\n",
" <g transform=\"translate(468.949308 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
"Q 1688 2584 1439 2293 \n",
"Q 1191 2003 1191 1497 \n",
"Q 1191 994 1439 701 \n",
"Q 1688 409 2113 409 \n",
"Q 2538 409 2786 701 \n",
"Q 3034 994 3034 1497 \n",
"Q 3034 2003 2786 2293 \n",
"Q 2538 2584 2113 2584 \n",
"z\n",
"M 3366 4563 \n",
"L 3366 3988 \n",
"Q 3128 4100 2886 4159 \n",
"Q 2644 4219 2406 4219 \n",
"Q 1781 4219 1451 3797 \n",
"Q 1122 3375 1075 2522 \n",
"Q 1259 2794 1537 2939 \n",
"Q 1816 3084 2150 3084 \n",
"Q 2853 3084 3261 2657 \n",
"Q 3669 2231 3669 1497 \n",
"Q 3669 778 3244 343 \n",
"Q 2819 -91 2113 -91 \n",
"Q 1303 -91 875 529 \n",
"Q 447 1150 447 2328 \n",
"Q 447 3434 972 4092 \n",
"Q 1497 4750 2381 4750 \n",
"Q 2619 4750 2861 4703 \n",
"Q 3103 4656 3366 4563 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_8\">\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use xlink:href=\"#m0e44fa57db\" x=\"542.125494\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 7 -->\n",
" <g transform=\"translate(538.944244 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
"L 3525 4666 \n",
"L 3525 4397 \n",
"L 1831 0 \n",
"L 1172 0 \n",
"L 2766 4134 \n",
"L 525 4134 \n",
"L 525 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-37\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- x -->\n",
" <g transform=\"translate(325.681562 350.315781) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
"L 2247 1797 \n",
"L 3578 0 \n",
"L 2900 0 \n",
"L 1881 1375 \n",
"L 863 0 \n",
"L 184 0 \n",
"L 1544 1831 \n",
"L 300 3500 \n",
"L 978 3500 \n",
"L 1906 2253 \n",
"L 2834 3500 \n",
"L 3513 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-78\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_9\">\n",
" <defs>\n",
" <path id=\"mc97f1282ed\" d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(20.878125 325.838437) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
"L 4684 2272 \n",
"L 4684 1741 \n",
"L 678 1741 \n",
"L 678 2272 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
"L 1344 794 \n",
"L 1344 0 \n",
"L 684 0 \n",
"L 684 794 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"270.199219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(20.878125 273.998437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"218.359219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <!-- 0.0 -->\n",
" <g transform=\"translate(29.257813 222.158437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_12\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"166.519219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(29.257813 170.318437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_13\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"114.679219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(29.257813 118.478438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_6\">\n",
" <g id=\"line2d_14\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"62.839219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <!-- 1.5 -->\n",
" <g transform=\"translate(29.257813 66.638438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_7\">\n",
" <g id=\"line2d_15\">\n",
" <g>\n",
" <use xlink:href=\"#mc97f1282ed\" x=\"52.160938\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <!-- 2.0 -->\n",
" <g transform=\"translate(29.257813 14.798438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <!-- Iris setosa? -->\n",
" <g transform=\"translate(14.798438 194.655937) rotate(-90) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-49\" d=\"M 628 4666 \n",
"L 1259 4666 \n",
"L 1259 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
"Q 2534 3019 2420 3045 \n",
"Q 2306 3072 2169 3072 \n",
"Q 1681 3072 1420 2755 \n",
"Q 1159 2438 1159 1844 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1341 3275 1631 3429 \n",
"Q 1922 3584 2338 3584 \n",
"Q 2397 3584 2469 3576 \n",
"Q 2541 3569 2628 3553 \n",
"L 2631 2963 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
"L 1178 3500 \n",
"L 1178 0 \n",
"L 603 0 \n",
"L 603 3500 \n",
"z\n",
"M 603 4863 \n",
"L 1178 4863 \n",
"L 1178 4134 \n",
"L 603 4134 \n",
"L 603 4863 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
"L 2834 2853 \n",
"Q 2591 2978 2328 3040 \n",
"Q 2066 3103 1784 3103 \n",
"Q 1356 3103 1142 2972 \n",
"Q 928 2841 928 2578 \n",
"Q 928 2378 1081 2264 \n",
"Q 1234 2150 1697 2047 \n",
"L 1894 2003 \n",
"Q 2506 1872 2764 1633 \n",
"Q 3022 1394 3022 966 \n",
"Q 3022 478 2636 193 \n",
"Q 2250 -91 1575 -91 \n",
"Q 1294 -91 989 -36 \n",
"Q 684 19 347 128 \n",
"L 347 722 \n",
"Q 666 556 975 473 \n",
"Q 1284 391 1588 391 \n",
"Q 1994 391 2212 530 \n",
"Q 2431 669 2431 922 \n",
"Q 2431 1156 2273 1281 \n",
"Q 2116 1406 1581 1522 \n",
"L 1381 1569 \n",
"Q 847 1681 609 1914 \n",
"Q 372 2147 372 2553 \n",
"Q 372 3047 722 3315 \n",
"Q 1072 3584 1716 3584 \n",
"Q 2034 3584 2315 3537 \n",
"Q 2597 3491 2834 3397 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
"L 3597 1613 \n",
"L 953 1613 \n",
"Q 991 1019 1311 708 \n",
"Q 1631 397 2203 397 \n",
"Q 2534 397 2845 478 \n",
"Q 3156 559 3463 722 \n",
"L 3463 178 \n",
"Q 3153 47 2828 -22 \n",
"Q 2503 -91 2169 -91 \n",
"Q 1331 -91 842 396 \n",
"Q 353 884 353 1716 \n",
"Q 353 2575 817 3079 \n",
"Q 1281 3584 2069 3584 \n",
"Q 2775 3584 3186 3129 \n",
"Q 3597 2675 3597 1894 \n",
"z\n",
"M 3022 2063 \n",
"Q 3016 2534 2758 2815 \n",
"Q 2500 3097 2075 3097 \n",
"Q 1594 3097 1305 2825 \n",
"Q 1016 2553 972 2059 \n",
"L 3022 2063 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
"L 1172 3500 \n",
"L 2356 3500 \n",
"L 2356 3053 \n",
"L 1172 3053 \n",
"L 1172 1153 \n",
"Q 1172 725 1289 603 \n",
"Q 1406 481 1766 481 \n",
"L 2356 481 \n",
"L 2356 0 \n",
"L 1766 0 \n",
"Q 1100 0 847 248 \n",
"Q 594 497 594 1153 \n",
"L 594 3053 \n",
"L 172 3053 \n",
"L 172 3500 \n",
"L 594 3500 \n",
"L 594 4494 \n",
"L 1172 4494 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
"Q 1497 3097 1228 2736 \n",
"Q 959 2375 959 1747 \n",
"Q 959 1119 1226 758 \n",
"Q 1494 397 1959 397 \n",
"Q 2419 397 2687 759 \n",
"Q 2956 1122 2956 1747 \n",
"Q 2956 2369 2687 2733 \n",
"Q 2419 3097 1959 3097 \n",
"z\n",
"M 1959 3584 \n",
"Q 2709 3584 3137 3096 \n",
"Q 3566 2609 3566 1747 \n",
"Q 3566 888 3137 398 \n",
"Q 2709 -91 1959 -91 \n",
"Q 1206 -91 779 398 \n",
"Q 353 888 353 1747 \n",
"Q 353 2609 779 3096 \n",
"Q 1206 3584 1959 3584 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
"Q 1497 1759 1228 1600 \n",
"Q 959 1441 959 1056 \n",
"Q 959 750 1161 570 \n",
"Q 1363 391 1709 391 \n",
"Q 2188 391 2477 730 \n",
"Q 2766 1069 2766 1631 \n",
"L 2766 1759 \n",
"L 2194 1759 \n",
"z\n",
"M 3341 1997 \n",
"L 3341 0 \n",
"L 2766 0 \n",
"L 2766 531 \n",
"Q 2569 213 2275 61 \n",
"Q 1981 -91 1556 -91 \n",
"Q 1019 -91 701 211 \n",
"Q 384 513 384 1019 \n",
"Q 384 1609 779 1909 \n",
"Q 1175 2209 1959 2209 \n",
"L 2766 2209 \n",
"L 2766 2266 \n",
"Q 2766 2663 2505 2880 \n",
"Q 2244 3097 1772 3097 \n",
"Q 1472 3097 1187 3025 \n",
"Q 903 2953 641 2809 \n",
"L 641 3341 \n",
"Q 956 3463 1253 3523 \n",
"Q 1550 3584 1831 3584 \n",
"Q 2591 3584 2966 3190 \n",
"Q 3341 2797 3341 1997 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3f\" d=\"M 1222 794 \n",
"L 1856 794 \n",
"L 1856 0 \n",
"L 1222 0 \n",
"L 1222 794 \n",
"z\n",
"M 1838 1253 \n",
"L 1241 1253 \n",
"L 1241 1734 \n",
"Q 1241 2050 1328 2253 \n",
"Q 1416 2456 1697 2725 \n",
"L 1978 3003 \n",
"Q 2156 3169 2236 3316 \n",
"Q 2316 3463 2316 3616 \n",
"Q 2316 3894 2111 4066 \n",
"Q 1906 4238 1569 4238 \n",
"Q 1322 4238 1042 4128 \n",
"Q 763 4019 459 3809 \n",
"L 459 4397 \n",
"Q 753 4575 1054 4662 \n",
"Q 1356 4750 1678 4750 \n",
"Q 2253 4750 2601 4447 \n",
"Q 2950 4144 2950 3647 \n",
"Q 2950 3409 2837 3195 \n",
"Q 2725 2981 2444 2713 \n",
"L 2169 2444 \n",
"Q 2022 2297 1961 2214 \n",
"Q 1900 2131 1875 2053 \n",
"Q 1856 1988 1847 1894 \n",
"Q 1838 1800 1838 1638 \n",
"L 1838 1253 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-49\"/>\n",
" <use xlink:href=\"#DejaVuSans-72\" x=\"29.492188\"/>\n",
" <use xlink:href=\"#DejaVuSans-69\" x=\"70.605469\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"98.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-20\" x=\"150.488281\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"182.275391\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"234.375\"/>\n",
" <use xlink:href=\"#DejaVuSans-74\" x=\"295.898438\"/>\n",
" <use xlink:href=\"#DejaVuSans-6f\" x=\"335.107422\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"396.289062\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"448.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-3f\" x=\"509.667969\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 52.160938 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 52.160938 10.999219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"legend_1\">\n",
" <g id=\"patch_7\">\n",
" <path d=\"M 575.962812 353.119219 \n",
"L 663.440937 353.119219 \n",
"Q 666.440937 353.119219 666.440937 350.119219 \n",
"L 666.440937 329.602031 \n",
"Q 666.440937 326.602031 663.440937 326.602031 \n",
"L 575.962812 326.602031 \n",
"Q 572.962812 326.602031 572.962812 329.602031 \n",
"L 572.962812 350.119219 \n",
"Q 572.962812 353.119219 575.962812 353.119219 \n",
"z\n",
"\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
" </g>\n",
" <g id=\"PathCollection_2\">\n",
" <g>\n",
" <use xlink:href=\"#mee0d9ecbeb\" x=\"593.962812\" y=\"340.062187\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_18\">\n",
" <!-- Dane -->\n",
" <g transform=\"translate(620.962812 343.999687) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-44\" d=\"M 1259 4147 \n",
"L 1259 519 \n",
"L 2022 519 \n",
"Q 2988 519 3436 956 \n",
"Q 3884 1394 3884 2338 \n",
"Q 3884 3275 3436 3711 \n",
"Q 2988 4147 2022 4147 \n",
"L 1259 4147 \n",
"z\n",
"M 628 4666 \n",
"L 1925 4666 \n",
"Q 3281 4666 3915 4102 \n",
"Q 4550 3538 4550 2338 \n",
"Q 4550 1131 3912 565 \n",
"Q 3275 0 1925 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
"L 3513 0 \n",
"L 2938 0 \n",
"L 2938 2094 \n",
"Q 2938 2591 2744 2837 \n",
"Q 2550 3084 2163 3084 \n",
"Q 1697 3084 1428 2787 \n",
"Q 1159 2491 1159 1978 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1366 3272 1645 3428 \n",
"Q 1925 3584 2291 3584 \n",
"Q 2894 3584 3203 3211 \n",
"Q 3513 2838 3513 2113 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-44\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"77.001953\"/>\n",
" <use xlink:href=\"#DejaVuSans-6e\" x=\"138.28125\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"201.660156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p04408d3520\">\n",
" <rect x=\"52.160938\" y=\"10.999219\" width=\"552.96\" height=\"311.04\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<Figure size 960x540 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = regdots(X, y, \"x\", \"Iris setosa?\")\n",
"legend(fig)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"#### Próba zastosowania regresji liniowej do problemu klasyfikacji\n",
"\n",
"Najpierw z ciekawości sprawdźmy, co otrzymalibyśmy, gdybyśmy zastosowali regresję liniową do problemu klasyfikacji."
]
},
{
"cell_type": "code",
"execution_count": 152,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"673.940937pt\" height=\"360.619219pt\" viewBox=\"0 0 673.940937 360.619219\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
" <metadata>\n",
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
" <cc:Work>\n",
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
" <dc:date>2022-11-03T15:23:34.362318</dc:date>\n",
" <dc:format>image/svg+xml</dc:format>\n",
" <dc:creator>\n",
" <cc:Agent>\n",
" <dc:title>Matplotlib v3.6.1, https://matplotlib.org/</dc:title>\n",
" </cc:Agent>\n",
" </dc:creator>\n",
" </cc:Work>\n",
" </rdf:RDF>\n",
" </metadata>\n",
" <defs>\n",
" <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 360.619219 \n",
"L 673.940937 360.619219 \n",
"L 673.940937 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"L 52.160938 10.999219 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"PathCollection_1\">\n",
" <defs>\n",
" <path id=\"m942accbd7d\" d=\"M 0 3.535534 \n",
"C 0.937635 3.535534 1.836992 3.163008 2.5 2.5 \n",
"C 3.163008 1.836992 3.535534 0.937635 3.535534 0 \n",
"C 3.535534 -0.937635 3.163008 -1.836992 2.5 -2.5 \n",
"C 1.836992 -3.163008 0.937635 -3.535534 0 -3.535534 \n",
"C -0.937635 -3.535534 -1.836992 -3.163008 -2.5 -2.5 \n",
"C -3.163008 -1.836992 -3.535534 -0.937635 -3.535534 0 \n",
"C -3.535534 0.937635 -3.163008 1.836992 -2.5 2.5 \n",
"C -1.836992 3.163008 -0.937635 3.535534 0 3.535534 \n",
"z\n",
"\" style=\"stroke: #ff0000\"/>\n",
" </defs>\n",
" <g clip-path=\"url(#p9e41b11e4b)\">\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"304.14271\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"311.142203\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"500.128532\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"122.155874\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"318.141697\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"493.129039\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"262.145748\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"535.126001\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"514.12752\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"129.155368\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path id=\"m2a54480172\" d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 0 -->\n",
" <g transform=\"translate(48.979688 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
"Q 1547 4250 1301 3770 \n",
"Q 1056 3291 1056 2328 \n",
"Q 1056 1369 1301 889 \n",
"Q 1547 409 2034 409 \n",
"Q 2525 409 2770 889 \n",
"Q 3016 1369 3016 2328 \n",
"Q 3016 3291 2770 3770 \n",
"Q 2525 4250 2034 4250 \n",
"z\n",
"M 2034 4750 \n",
"Q 2819 4750 3233 4129 \n",
"Q 3647 3509 3647 2328 \n",
"Q 3647 1150 3233 529 \n",
"Q 2819 -91 2034 -91 \n",
"Q 1250 -91 836 529 \n",
"Q 422 1150 422 2328 \n",
"Q 422 3509 836 4129 \n",
"Q 1250 4750 2034 4750 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"122.155874\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 1 -->\n",
" <g transform=\"translate(118.974624 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
"L 1825 531 \n",
"L 1825 4091 \n",
"L 703 3866 \n",
"L 703 4441 \n",
"L 1819 4666 \n",
"L 2450 4666 \n",
"L 2450 531 \n",
"L 3481 531 \n",
"L 3481 0 \n",
"L 794 0 \n",
"L 794 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"192.150811\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(188.969561 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
"L 3431 531 \n",
"L 3431 0 \n",
"L 469 0 \n",
"L 469 531 \n",
"Q 828 903 1448 1529 \n",
"Q 2069 2156 2228 2338 \n",
"Q 2531 2678 2651 2914 \n",
"Q 2772 3150 2772 3378 \n",
"Q 2772 3750 2511 3984 \n",
"Q 2250 4219 1831 4219 \n",
"Q 1534 4219 1204 4116 \n",
"Q 875 4013 500 3803 \n",
"L 500 4441 \n",
"Q 881 4594 1212 4672 \n",
"Q 1544 4750 1819 4750 \n",
"Q 2544 4750 2975 4387 \n",
"Q 3406 4025 3406 3419 \n",
"Q 3406 3131 3298 2873 \n",
"Q 3191 2616 2906 2266 \n",
"Q 2828 2175 2409 1742 \n",
"Q 1991 1309 1228 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"262.145748\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 3 -->\n",
" <g transform=\"translate(258.964498 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
"Q 3050 2419 3304 2112 \n",
"Q 3559 1806 3559 1356 \n",
"Q 3559 666 3084 287 \n",
"Q 2609 -91 1734 -91 \n",
"Q 1441 -91 1130 -33 \n",
"Q 819 25 488 141 \n",
"L 488 750 \n",
"Q 750 597 1062 519 \n",
"Q 1375 441 1716 441 \n",
"Q 2309 441 2620 675 \n",
"Q 2931 909 2931 1356 \n",
"Q 2931 1769 2642 2001 \n",
"Q 2353 2234 1838 2234 \n",
"L 1294 2234 \n",
"L 1294 2753 \n",
"L 1863 2753 \n",
"Q 2328 2753 2575 2939 \n",
"Q 2822 3125 2822 3475 \n",
"Q 2822 3834 2567 4026 \n",
"Q 2313 4219 1838 4219 \n",
"Q 1578 4219 1281 4162 \n",
"Q 984 4106 628 3988 \n",
"L 628 4550 \n",
"Q 988 4650 1302 4700 \n",
"Q 1616 4750 1894 4750 \n",
"Q 2613 4750 3031 4423 \n",
"Q 3450 4097 3450 3541 \n",
"Q 3450 3153 3228 2886 \n",
"Q 3006 2619 2597 2516 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_5\">\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"332.140684\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(328.959434 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
"L 825 1625 \n",
"L 2419 1625 \n",
"L 2419 4116 \n",
"z\n",
"M 2253 4666 \n",
"L 3047 4666 \n",
"L 3047 1625 \n",
"L 3713 1625 \n",
"L 3713 1100 \n",
"L 3047 1100 \n",
"L 3047 0 \n",
"L 2419 0 \n",
"L 2419 1100 \n",
"L 313 1100 \n",
"L 313 1709 \n",
"L 2253 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_6\">\n",
" <g id=\"line2d_6\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"402.135621\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 5 -->\n",
" <g transform=\"translate(398.954371 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
"L 3169 4666 \n",
"L 3169 4134 \n",
"L 1269 4134 \n",
"L 1269 2991 \n",
"Q 1406 3038 1543 3061 \n",
"Q 1681 3084 1819 3084 \n",
"Q 2600 3084 3056 2656 \n",
"Q 3513 2228 3513 1497 \n",
"Q 3513 744 3044 326 \n",
"Q 2575 -91 1722 -91 \n",
"Q 1428 -91 1123 -41 \n",
"Q 819 9 494 109 \n",
"L 494 744 \n",
"Q 775 591 1075 516 \n",
"Q 1375 441 1709 441 \n",
"Q 2250 441 2565 725 \n",
"Q 2881 1009 2881 1497 \n",
"Q 2881 1984 2565 2268 \n",
"Q 2250 2553 1709 2553 \n",
"Q 1456 2553 1204 2497 \n",
"Q 953 2441 691 2322 \n",
"L 691 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_7\">\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"472.130558\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 6 -->\n",
" <g transform=\"translate(468.949308 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
"Q 1688 2584 1439 2293 \n",
"Q 1191 2003 1191 1497 \n",
"Q 1191 994 1439 701 \n",
"Q 1688 409 2113 409 \n",
"Q 2538 409 2786 701 \n",
"Q 3034 994 3034 1497 \n",
"Q 3034 2003 2786 2293 \n",
"Q 2538 2584 2113 2584 \n",
"z\n",
"M 3366 4563 \n",
"L 3366 3988 \n",
"Q 3128 4100 2886 4159 \n",
"Q 2644 4219 2406 4219 \n",
"Q 1781 4219 1451 3797 \n",
"Q 1122 3375 1075 2522 \n",
"Q 1259 2794 1537 2939 \n",
"Q 1816 3084 2150 3084 \n",
"Q 2853 3084 3261 2657 \n",
"Q 3669 2231 3669 1497 \n",
"Q 3669 778 3244 343 \n",
"Q 2819 -91 2113 -91 \n",
"Q 1303 -91 875 529 \n",
"Q 447 1150 447 2328 \n",
"Q 447 3434 972 4092 \n",
"Q 1497 4750 2381 4750 \n",
"Q 2619 4750 2861 4703 \n",
"Q 3103 4656 3366 4563 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_8\">\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use xlink:href=\"#m2a54480172\" x=\"542.125494\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 7 -->\n",
" <g transform=\"translate(538.944244 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
"L 3525 4666 \n",
"L 3525 4397 \n",
"L 1831 0 \n",
"L 1172 0 \n",
"L 2766 4134 \n",
"L 525 4134 \n",
"L 525 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-37\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- x -->\n",
" <g transform=\"translate(325.681562 350.315781) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
"L 2247 1797 \n",
"L 3578 0 \n",
"L 2900 0 \n",
"L 1881 1375 \n",
"L 863 0 \n",
"L 184 0 \n",
"L 1544 1831 \n",
"L 300 3500 \n",
"L 978 3500 \n",
"L 1906 2253 \n",
"L 2834 3500 \n",
"L 3513 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-78\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_9\">\n",
" <defs>\n",
" <path id=\"m59e8439963\" d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(20.878125 325.838437) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
"L 4684 2272 \n",
"L 4684 1741 \n",
"L 678 1741 \n",
"L 678 2272 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
"L 1344 794 \n",
"L 1344 0 \n",
"L 684 0 \n",
"L 684 794 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"270.199219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(20.878125 273.998437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"218.359219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <!-- 0.0 -->\n",
" <g transform=\"translate(29.257813 222.158437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_12\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"166.519219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(29.257813 170.318437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_13\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"114.679219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(29.257813 118.478438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_6\">\n",
" <g id=\"line2d_14\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"62.839219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <!-- 1.5 -->\n",
" <g transform=\"translate(29.257813 66.638438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_7\">\n",
" <g id=\"line2d_15\">\n",
" <g>\n",
" <use xlink:href=\"#m59e8439963\" x=\"52.160938\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <!-- 2.0 -->\n",
" <g transform=\"translate(29.257813 14.798438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <!-- Iris setosa? -->\n",
" <g transform=\"translate(14.798438 194.655937) rotate(-90) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-49\" d=\"M 628 4666 \n",
"L 1259 4666 \n",
"L 1259 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
"Q 2534 3019 2420 3045 \n",
"Q 2306 3072 2169 3072 \n",
"Q 1681 3072 1420 2755 \n",
"Q 1159 2438 1159 1844 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1341 3275 1631 3429 \n",
"Q 1922 3584 2338 3584 \n",
"Q 2397 3584 2469 3576 \n",
"Q 2541 3569 2628 3553 \n",
"L 2631 2963 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
"L 1178 3500 \n",
"L 1178 0 \n",
"L 603 0 \n",
"L 603 3500 \n",
"z\n",
"M 603 4863 \n",
"L 1178 4863 \n",
"L 1178 4134 \n",
"L 603 4134 \n",
"L 603 4863 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
"L 2834 2853 \n",
"Q 2591 2978 2328 3040 \n",
"Q 2066 3103 1784 3103 \n",
"Q 1356 3103 1142 2972 \n",
"Q 928 2841 928 2578 \n",
"Q 928 2378 1081 2264 \n",
"Q 1234 2150 1697 2047 \n",
"L 1894 2003 \n",
"Q 2506 1872 2764 1633 \n",
"Q 3022 1394 3022 966 \n",
"Q 3022 478 2636 193 \n",
"Q 2250 -91 1575 -91 \n",
"Q 1294 -91 989 -36 \n",
"Q 684 19 347 128 \n",
"L 347 722 \n",
"Q 666 556 975 473 \n",
"Q 1284 391 1588 391 \n",
"Q 1994 391 2212 530 \n",
"Q 2431 669 2431 922 \n",
"Q 2431 1156 2273 1281 \n",
"Q 2116 1406 1581 1522 \n",
"L 1381 1569 \n",
"Q 847 1681 609 1914 \n",
"Q 372 2147 372 2553 \n",
"Q 372 3047 722 3315 \n",
"Q 1072 3584 1716 3584 \n",
"Q 2034 3584 2315 3537 \n",
"Q 2597 3491 2834 3397 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
"L 3597 1613 \n",
"L 953 1613 \n",
"Q 991 1019 1311 708 \n",
"Q 1631 397 2203 397 \n",
"Q 2534 397 2845 478 \n",
"Q 3156 559 3463 722 \n",
"L 3463 178 \n",
"Q 3153 47 2828 -22 \n",
"Q 2503 -91 2169 -91 \n",
"Q 1331 -91 842 396 \n",
"Q 353 884 353 1716 \n",
"Q 353 2575 817 3079 \n",
"Q 1281 3584 2069 3584 \n",
"Q 2775 3584 3186 3129 \n",
"Q 3597 2675 3597 1894 \n",
"z\n",
"M 3022 2063 \n",
"Q 3016 2534 2758 2815 \n",
"Q 2500 3097 2075 3097 \n",
"Q 1594 3097 1305 2825 \n",
"Q 1016 2553 972 2059 \n",
"L 3022 2063 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
"L 1172 3500 \n",
"L 2356 3500 \n",
"L 2356 3053 \n",
"L 1172 3053 \n",
"L 1172 1153 \n",
"Q 1172 725 1289 603 \n",
"Q 1406 481 1766 481 \n",
"L 2356 481 \n",
"L 2356 0 \n",
"L 1766 0 \n",
"Q 1100 0 847 248 \n",
"Q 594 497 594 1153 \n",
"L 594 3053 \n",
"L 172 3053 \n",
"L 172 3500 \n",
"L 594 3500 \n",
"L 594 4494 \n",
"L 1172 4494 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
"Q 1497 3097 1228 2736 \n",
"Q 959 2375 959 1747 \n",
"Q 959 1119 1226 758 \n",
"Q 1494 397 1959 397 \n",
"Q 2419 397 2687 759 \n",
"Q 2956 1122 2956 1747 \n",
"Q 2956 2369 2687 2733 \n",
"Q 2419 3097 1959 3097 \n",
"z\n",
"M 1959 3584 \n",
"Q 2709 3584 3137 3096 \n",
"Q 3566 2609 3566 1747 \n",
"Q 3566 888 3137 398 \n",
"Q 2709 -91 1959 -91 \n",
"Q 1206 -91 779 398 \n",
"Q 353 888 353 1747 \n",
"Q 353 2609 779 3096 \n",
"Q 1206 3584 1959 3584 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
"Q 1497 1759 1228 1600 \n",
"Q 959 1441 959 1056 \n",
"Q 959 750 1161 570 \n",
"Q 1363 391 1709 391 \n",
"Q 2188 391 2477 730 \n",
"Q 2766 1069 2766 1631 \n",
"L 2766 1759 \n",
"L 2194 1759 \n",
"z\n",
"M 3341 1997 \n",
"L 3341 0 \n",
"L 2766 0 \n",
"L 2766 531 \n",
"Q 2569 213 2275 61 \n",
"Q 1981 -91 1556 -91 \n",
"Q 1019 -91 701 211 \n",
"Q 384 513 384 1019 \n",
"Q 384 1609 779 1909 \n",
"Q 1175 2209 1959 2209 \n",
"L 2766 2209 \n",
"L 2766 2266 \n",
"Q 2766 2663 2505 2880 \n",
"Q 2244 3097 1772 3097 \n",
"Q 1472 3097 1187 3025 \n",
"Q 903 2953 641 2809 \n",
"L 641 3341 \n",
"Q 956 3463 1253 3523 \n",
"Q 1550 3584 1831 3584 \n",
"Q 2591 3584 2966 3190 \n",
"Q 3341 2797 3341 1997 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3f\" d=\"M 1222 794 \n",
"L 1856 794 \n",
"L 1856 0 \n",
"L 1222 0 \n",
"L 1222 794 \n",
"z\n",
"M 1838 1253 \n",
"L 1241 1253 \n",
"L 1241 1734 \n",
"Q 1241 2050 1328 2253 \n",
"Q 1416 2456 1697 2725 \n",
"L 1978 3003 \n",
"Q 2156 3169 2236 3316 \n",
"Q 2316 3463 2316 3616 \n",
"Q 2316 3894 2111 4066 \n",
"Q 1906 4238 1569 4238 \n",
"Q 1322 4238 1042 4128 \n",
"Q 763 4019 459 3809 \n",
"L 459 4397 \n",
"Q 753 4575 1054 4662 \n",
"Q 1356 4750 1678 4750 \n",
"Q 2253 4750 2601 4447 \n",
"Q 2950 4144 2950 3647 \n",
"Q 2950 3409 2837 3195 \n",
"Q 2725 2981 2444 2713 \n",
"L 2169 2444 \n",
"Q 2022 2297 1961 2214 \n",
"Q 1900 2131 1875 2053 \n",
"Q 1856 1988 1847 1894 \n",
"Q 1838 1800 1838 1638 \n",
"L 1838 1253 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-49\"/>\n",
" <use xlink:href=\"#DejaVuSans-72\" x=\"29.492188\"/>\n",
" <use xlink:href=\"#DejaVuSans-69\" x=\"70.605469\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"98.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-20\" x=\"150.488281\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"182.275391\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"234.375\"/>\n",
" <use xlink:href=\"#DejaVuSans-74\" x=\"295.898438\"/>\n",
" <use xlink:href=\"#DejaVuSans-6f\" x=\"335.107422\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"396.289062\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"448.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-3f\" x=\"509.667969\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_16\">\n",
" <path d=\"M 52.160938 90.800709 \n",
"L 605.120937 287.486853 \n",
"\" clip-path=\"url(#p9e41b11e4b)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 52.160938 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 52.160938 10.999219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"legend_1\">\n",
" <g id=\"patch_7\">\n",
" <path d=\"M 505.190937 353.119219 \n",
"L 663.440937 353.119219 \n",
"Q 666.440937 353.119219 666.440937 350.119219 \n",
"L 666.440937 307.554375 \n",
"Q 666.440937 304.554375 663.440937 304.554375 \n",
"L 505.190937 304.554375 \n",
"Q 502.190937 304.554375 502.190937 307.554375 \n",
"L 502.190937 350.119219 \n",
"Q 502.190937 353.119219 505.190937 353.119219 \n",
"z\n",
"\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
" </g>\n",
" <g id=\"PathCollection_2\">\n",
" <g>\n",
" <use xlink:href=\"#m942accbd7d\" x=\"523.190937\" y=\"318.014531\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_18\">\n",
" <!-- Dane -->\n",
" <g transform=\"translate(550.190937 321.952031) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-44\" d=\"M 1259 4147 \n",
"L 1259 519 \n",
"L 2022 519 \n",
"Q 2988 519 3436 956 \n",
"Q 3884 1394 3884 2338 \n",
"Q 3884 3275 3436 3711 \n",
"Q 2988 4147 2022 4147 \n",
"L 1259 4147 \n",
"z\n",
"M 628 4666 \n",
"L 1925 4666 \n",
"Q 3281 4666 3915 4102 \n",
"Q 4550 3538 4550 2338 \n",
"Q 4550 1131 3912 565 \n",
"Q 3275 0 1925 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
"L 3513 0 \n",
"L 2938 0 \n",
"L 2938 2094 \n",
"Q 2938 2591 2744 2837 \n",
"Q 2550 3084 2163 3084 \n",
"Q 1697 3084 1428 2787 \n",
"Q 1159 2491 1159 1978 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1366 3272 1645 3428 \n",
"Q 1925 3584 2291 3584 \n",
"Q 2894 3584 3203 3211 \n",
"Q 3513 2838 3513 2113 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-44\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"77.001953\"/>\n",
" <use xlink:href=\"#DejaVuSans-6e\" x=\"138.28125\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"201.660156\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_17\">\n",
" <path d=\"M 508.190937 338.719219 \n",
"L 523.190937 338.719219 \n",
"L 538.190937 338.719219 \n",
"\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"text_19\">\n",
" <!-- $y=1.2-0.24x$ -->\n",
" <g transform=\"translate(550.190937 343.969219) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-Oblique-79\" d=\"M 1588 -325 \n",
"Q 1188 -997 936 -1164 \n",
"Q 684 -1331 294 -1331 \n",
"L -159 -1331 \n",
"L -63 -850 \n",
"L 269 -850 \n",
"Q 509 -850 678 -719 \n",
"Q 847 -588 1056 -206 \n",
"L 1234 128 \n",
"L 459 3500 \n",
"L 1069 3500 \n",
"L 1650 819 \n",
"L 3256 3500 \n",
"L 3859 3500 \n",
"L 1588 -325 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
"L 4684 2906 \n",
"L 4684 2381 \n",
"L 678 2381 \n",
"L 678 2906 \n",
"z\n",
"M 678 1631 \n",
"L 4684 1631 \n",
"L 4684 1100 \n",
"L 678 1100 \n",
"L 678 1631 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-Oblique-78\" d=\"M 3841 3500 \n",
"L 2234 1784 \n",
"L 3219 0 \n",
"L 2559 0 \n",
"L 1819 1388 \n",
"L 531 0 \n",
"L -166 0 \n",
"L 1556 1844 \n",
"L 641 3500 \n",
"L 1300 3500 \n",
"L 1972 2234 \n",
"L 3144 3500 \n",
"L 3841 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-Oblique-79\" transform=\"translate(0 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(78.662109 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" transform=\"translate(181.933594 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" transform=\"translate(245.556641 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(271.84375 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2212\" transform=\"translate(354.949219 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(458.220703 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" transform=\"translate(521.84375 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(548.130859 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(611.753906 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(675.376953 0.78125)\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p9e41b11e4b\">\n",
" <rect x=\"52.160938\" y=\"10.999219\" width=\"552.96\" height=\"311.04\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<Figure size 960x540 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = regdots(X, y, \"x\", \"Iris setosa?\")\n",
"regline(fig, h, theta_lin, X)\n",
"legend(fig)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"A gdyby tak przyjąć, że klasyfikator zwraca $1$ dla $h(x) > 0.5$ i $0$ w przeciwnym przypadku?"
]
},
{
"cell_type": "code",
"execution_count": 153,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"673.940937pt\" height=\"360.619219pt\" viewBox=\"0 0 673.940937 360.619219\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
" <metadata>\n",
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
" <cc:Work>\n",
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
" <dc:date>2022-11-03T15:23:35.035715</dc:date>\n",
" <dc:format>image/svg+xml</dc:format>\n",
" <dc:creator>\n",
" <cc:Agent>\n",
" <dc:title>Matplotlib v3.6.1, https://matplotlib.org/</dc:title>\n",
" </cc:Agent>\n",
" </dc:creator>\n",
" </cc:Work>\n",
" </rdf:RDF>\n",
" </metadata>\n",
" <defs>\n",
" <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 360.619219 \n",
"L 673.940937 360.619219 \n",
"L 673.940937 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"L 52.160938 10.999219 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"PathCollection_1\">\n",
" <defs>\n",
" <path id=\"m157bc0fcb7\" d=\"M 0 3.535534 \n",
"C 0.937635 3.535534 1.836992 3.163008 2.5 2.5 \n",
"C 3.163008 1.836992 3.535534 0.937635 3.535534 0 \n",
"C 3.535534 -0.937635 3.163008 -1.836992 2.5 -2.5 \n",
"C 1.836992 -3.163008 0.937635 -3.535534 0 -3.535534 \n",
"C -0.937635 -3.535534 -1.836992 -3.163008 -2.5 -2.5 \n",
"C -3.163008 -1.836992 -3.535534 -0.937635 -3.535534 0 \n",
"C -3.535534 0.937635 -3.163008 1.836992 -2.5 2.5 \n",
"C -1.836992 3.163008 -0.937635 3.535534 0 3.535534 \n",
"z\n",
"\" style=\"stroke: #ff0000\"/>\n",
" </defs>\n",
" <g clip-path=\"url(#p49dc3d98f2)\">\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"304.14271\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"311.142203\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"500.128532\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"122.155874\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"318.141697\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"493.129039\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"262.145748\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"535.126001\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"514.12752\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"129.155368\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path id=\"md6feb5c53b\" d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 0 -->\n",
" <g transform=\"translate(48.979688 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
"Q 1547 4250 1301 3770 \n",
"Q 1056 3291 1056 2328 \n",
"Q 1056 1369 1301 889 \n",
"Q 1547 409 2034 409 \n",
"Q 2525 409 2770 889 \n",
"Q 3016 1369 3016 2328 \n",
"Q 3016 3291 2770 3770 \n",
"Q 2525 4250 2034 4250 \n",
"z\n",
"M 2034 4750 \n",
"Q 2819 4750 3233 4129 \n",
"Q 3647 3509 3647 2328 \n",
"Q 3647 1150 3233 529 \n",
"Q 2819 -91 2034 -91 \n",
"Q 1250 -91 836 529 \n",
"Q 422 1150 422 2328 \n",
"Q 422 3509 836 4129 \n",
"Q 1250 4750 2034 4750 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"122.155874\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 1 -->\n",
" <g transform=\"translate(118.974624 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
"L 1825 531 \n",
"L 1825 4091 \n",
"L 703 3866 \n",
"L 703 4441 \n",
"L 1819 4666 \n",
"L 2450 4666 \n",
"L 2450 531 \n",
"L 3481 531 \n",
"L 3481 0 \n",
"L 794 0 \n",
"L 794 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"192.150811\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(188.969561 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
"L 3431 531 \n",
"L 3431 0 \n",
"L 469 0 \n",
"L 469 531 \n",
"Q 828 903 1448 1529 \n",
"Q 2069 2156 2228 2338 \n",
"Q 2531 2678 2651 2914 \n",
"Q 2772 3150 2772 3378 \n",
"Q 2772 3750 2511 3984 \n",
"Q 2250 4219 1831 4219 \n",
"Q 1534 4219 1204 4116 \n",
"Q 875 4013 500 3803 \n",
"L 500 4441 \n",
"Q 881 4594 1212 4672 \n",
"Q 1544 4750 1819 4750 \n",
"Q 2544 4750 2975 4387 \n",
"Q 3406 4025 3406 3419 \n",
"Q 3406 3131 3298 2873 \n",
"Q 3191 2616 2906 2266 \n",
"Q 2828 2175 2409 1742 \n",
"Q 1991 1309 1228 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"262.145748\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 3 -->\n",
" <g transform=\"translate(258.964498 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
"Q 3050 2419 3304 2112 \n",
"Q 3559 1806 3559 1356 \n",
"Q 3559 666 3084 287 \n",
"Q 2609 -91 1734 -91 \n",
"Q 1441 -91 1130 -33 \n",
"Q 819 25 488 141 \n",
"L 488 750 \n",
"Q 750 597 1062 519 \n",
"Q 1375 441 1716 441 \n",
"Q 2309 441 2620 675 \n",
"Q 2931 909 2931 1356 \n",
"Q 2931 1769 2642 2001 \n",
"Q 2353 2234 1838 2234 \n",
"L 1294 2234 \n",
"L 1294 2753 \n",
"L 1863 2753 \n",
"Q 2328 2753 2575 2939 \n",
"Q 2822 3125 2822 3475 \n",
"Q 2822 3834 2567 4026 \n",
"Q 2313 4219 1838 4219 \n",
"Q 1578 4219 1281 4162 \n",
"Q 984 4106 628 3988 \n",
"L 628 4550 \n",
"Q 988 4650 1302 4700 \n",
"Q 1616 4750 1894 4750 \n",
"Q 2613 4750 3031 4423 \n",
"Q 3450 4097 3450 3541 \n",
"Q 3450 3153 3228 2886 \n",
"Q 3006 2619 2597 2516 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_5\">\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"332.140684\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(328.959434 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
"L 825 1625 \n",
"L 2419 1625 \n",
"L 2419 4116 \n",
"z\n",
"M 2253 4666 \n",
"L 3047 4666 \n",
"L 3047 1625 \n",
"L 3713 1625 \n",
"L 3713 1100 \n",
"L 3047 1100 \n",
"L 3047 0 \n",
"L 2419 0 \n",
"L 2419 1100 \n",
"L 313 1100 \n",
"L 313 1709 \n",
"L 2253 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_6\">\n",
" <g id=\"line2d_6\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"402.135621\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 5 -->\n",
" <g transform=\"translate(398.954371 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
"L 3169 4666 \n",
"L 3169 4134 \n",
"L 1269 4134 \n",
"L 1269 2991 \n",
"Q 1406 3038 1543 3061 \n",
"Q 1681 3084 1819 3084 \n",
"Q 2600 3084 3056 2656 \n",
"Q 3513 2228 3513 1497 \n",
"Q 3513 744 3044 326 \n",
"Q 2575 -91 1722 -91 \n",
"Q 1428 -91 1123 -41 \n",
"Q 819 9 494 109 \n",
"L 494 744 \n",
"Q 775 591 1075 516 \n",
"Q 1375 441 1709 441 \n",
"Q 2250 441 2565 725 \n",
"Q 2881 1009 2881 1497 \n",
"Q 2881 1984 2565 2268 \n",
"Q 2250 2553 1709 2553 \n",
"Q 1456 2553 1204 2497 \n",
"Q 953 2441 691 2322 \n",
"L 691 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_7\">\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"472.130558\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 6 -->\n",
" <g transform=\"translate(468.949308 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
"Q 1688 2584 1439 2293 \n",
"Q 1191 2003 1191 1497 \n",
"Q 1191 994 1439 701 \n",
"Q 1688 409 2113 409 \n",
"Q 2538 409 2786 701 \n",
"Q 3034 994 3034 1497 \n",
"Q 3034 2003 2786 2293 \n",
"Q 2538 2584 2113 2584 \n",
"z\n",
"M 3366 4563 \n",
"L 3366 3988 \n",
"Q 3128 4100 2886 4159 \n",
"Q 2644 4219 2406 4219 \n",
"Q 1781 4219 1451 3797 \n",
"Q 1122 3375 1075 2522 \n",
"Q 1259 2794 1537 2939 \n",
"Q 1816 3084 2150 3084 \n",
"Q 2853 3084 3261 2657 \n",
"Q 3669 2231 3669 1497 \n",
"Q 3669 778 3244 343 \n",
"Q 2819 -91 2113 -91 \n",
"Q 1303 -91 875 529 \n",
"Q 447 1150 447 2328 \n",
"Q 447 3434 972 4092 \n",
"Q 1497 4750 2381 4750 \n",
"Q 2619 4750 2861 4703 \n",
"Q 3103 4656 3366 4563 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_8\">\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use xlink:href=\"#md6feb5c53b\" x=\"542.125494\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 7 -->\n",
" <g transform=\"translate(538.944244 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
"L 3525 4666 \n",
"L 3525 4397 \n",
"L 1831 0 \n",
"L 1172 0 \n",
"L 2766 4134 \n",
"L 525 4134 \n",
"L 525 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-37\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- x -->\n",
" <g transform=\"translate(325.681562 350.315781) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
"L 2247 1797 \n",
"L 3578 0 \n",
"L 2900 0 \n",
"L 1881 1375 \n",
"L 863 0 \n",
"L 184 0 \n",
"L 1544 1831 \n",
"L 300 3500 \n",
"L 978 3500 \n",
"L 1906 2253 \n",
"L 2834 3500 \n",
"L 3513 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-78\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_9\">\n",
" <defs>\n",
" <path id=\"m247bff980c\" d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(20.878125 325.838437) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
"L 4684 2272 \n",
"L 4684 1741 \n",
"L 678 1741 \n",
"L 678 2272 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
"L 1344 794 \n",
"L 1344 0 \n",
"L 684 0 \n",
"L 684 794 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"270.199219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(20.878125 273.998437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"218.359219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <!-- 0.0 -->\n",
" <g transform=\"translate(29.257813 222.158437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_12\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"166.519219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(29.257813 170.318437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_13\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"114.679219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(29.257813 118.478438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_6\">\n",
" <g id=\"line2d_14\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"62.839219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <!-- 1.5 -->\n",
" <g transform=\"translate(29.257813 66.638438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_7\">\n",
" <g id=\"line2d_15\">\n",
" <g>\n",
" <use xlink:href=\"#m247bff980c\" x=\"52.160938\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <!-- 2.0 -->\n",
" <g transform=\"translate(29.257813 14.798438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <!-- Iris setosa? -->\n",
" <g transform=\"translate(14.798438 194.655937) rotate(-90) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-49\" d=\"M 628 4666 \n",
"L 1259 4666 \n",
"L 1259 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
"Q 2534 3019 2420 3045 \n",
"Q 2306 3072 2169 3072 \n",
"Q 1681 3072 1420 2755 \n",
"Q 1159 2438 1159 1844 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1341 3275 1631 3429 \n",
"Q 1922 3584 2338 3584 \n",
"Q 2397 3584 2469 3576 \n",
"Q 2541 3569 2628 3553 \n",
"L 2631 2963 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
"L 1178 3500 \n",
"L 1178 0 \n",
"L 603 0 \n",
"L 603 3500 \n",
"z\n",
"M 603 4863 \n",
"L 1178 4863 \n",
"L 1178 4134 \n",
"L 603 4134 \n",
"L 603 4863 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
"L 2834 2853 \n",
"Q 2591 2978 2328 3040 \n",
"Q 2066 3103 1784 3103 \n",
"Q 1356 3103 1142 2972 \n",
"Q 928 2841 928 2578 \n",
"Q 928 2378 1081 2264 \n",
"Q 1234 2150 1697 2047 \n",
"L 1894 2003 \n",
"Q 2506 1872 2764 1633 \n",
"Q 3022 1394 3022 966 \n",
"Q 3022 478 2636 193 \n",
"Q 2250 -91 1575 -91 \n",
"Q 1294 -91 989 -36 \n",
"Q 684 19 347 128 \n",
"L 347 722 \n",
"Q 666 556 975 473 \n",
"Q 1284 391 1588 391 \n",
"Q 1994 391 2212 530 \n",
"Q 2431 669 2431 922 \n",
"Q 2431 1156 2273 1281 \n",
"Q 2116 1406 1581 1522 \n",
"L 1381 1569 \n",
"Q 847 1681 609 1914 \n",
"Q 372 2147 372 2553 \n",
"Q 372 3047 722 3315 \n",
"Q 1072 3584 1716 3584 \n",
"Q 2034 3584 2315 3537 \n",
"Q 2597 3491 2834 3397 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
"L 3597 1613 \n",
"L 953 1613 \n",
"Q 991 1019 1311 708 \n",
"Q 1631 397 2203 397 \n",
"Q 2534 397 2845 478 \n",
"Q 3156 559 3463 722 \n",
"L 3463 178 \n",
"Q 3153 47 2828 -22 \n",
"Q 2503 -91 2169 -91 \n",
"Q 1331 -91 842 396 \n",
"Q 353 884 353 1716 \n",
"Q 353 2575 817 3079 \n",
"Q 1281 3584 2069 3584 \n",
"Q 2775 3584 3186 3129 \n",
"Q 3597 2675 3597 1894 \n",
"z\n",
"M 3022 2063 \n",
"Q 3016 2534 2758 2815 \n",
"Q 2500 3097 2075 3097 \n",
"Q 1594 3097 1305 2825 \n",
"Q 1016 2553 972 2059 \n",
"L 3022 2063 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
"L 1172 3500 \n",
"L 2356 3500 \n",
"L 2356 3053 \n",
"L 1172 3053 \n",
"L 1172 1153 \n",
"Q 1172 725 1289 603 \n",
"Q 1406 481 1766 481 \n",
"L 2356 481 \n",
"L 2356 0 \n",
"L 1766 0 \n",
"Q 1100 0 847 248 \n",
"Q 594 497 594 1153 \n",
"L 594 3053 \n",
"L 172 3053 \n",
"L 172 3500 \n",
"L 594 3500 \n",
"L 594 4494 \n",
"L 1172 4494 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
"Q 1497 3097 1228 2736 \n",
"Q 959 2375 959 1747 \n",
"Q 959 1119 1226 758 \n",
"Q 1494 397 1959 397 \n",
"Q 2419 397 2687 759 \n",
"Q 2956 1122 2956 1747 \n",
"Q 2956 2369 2687 2733 \n",
"Q 2419 3097 1959 3097 \n",
"z\n",
"M 1959 3584 \n",
"Q 2709 3584 3137 3096 \n",
"Q 3566 2609 3566 1747 \n",
"Q 3566 888 3137 398 \n",
"Q 2709 -91 1959 -91 \n",
"Q 1206 -91 779 398 \n",
"Q 353 888 353 1747 \n",
"Q 353 2609 779 3096 \n",
"Q 1206 3584 1959 3584 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
"Q 1497 1759 1228 1600 \n",
"Q 959 1441 959 1056 \n",
"Q 959 750 1161 570 \n",
"Q 1363 391 1709 391 \n",
"Q 2188 391 2477 730 \n",
"Q 2766 1069 2766 1631 \n",
"L 2766 1759 \n",
"L 2194 1759 \n",
"z\n",
"M 3341 1997 \n",
"L 3341 0 \n",
"L 2766 0 \n",
"L 2766 531 \n",
"Q 2569 213 2275 61 \n",
"Q 1981 -91 1556 -91 \n",
"Q 1019 -91 701 211 \n",
"Q 384 513 384 1019 \n",
"Q 384 1609 779 1909 \n",
"Q 1175 2209 1959 2209 \n",
"L 2766 2209 \n",
"L 2766 2266 \n",
"Q 2766 2663 2505 2880 \n",
"Q 2244 3097 1772 3097 \n",
"Q 1472 3097 1187 3025 \n",
"Q 903 2953 641 2809 \n",
"L 641 3341 \n",
"Q 956 3463 1253 3523 \n",
"Q 1550 3584 1831 3584 \n",
"Q 2591 3584 2966 3190 \n",
"Q 3341 2797 3341 1997 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3f\" d=\"M 1222 794 \n",
"L 1856 794 \n",
"L 1856 0 \n",
"L 1222 0 \n",
"L 1222 794 \n",
"z\n",
"M 1838 1253 \n",
"L 1241 1253 \n",
"L 1241 1734 \n",
"Q 1241 2050 1328 2253 \n",
"Q 1416 2456 1697 2725 \n",
"L 1978 3003 \n",
"Q 2156 3169 2236 3316 \n",
"Q 2316 3463 2316 3616 \n",
"Q 2316 3894 2111 4066 \n",
"Q 1906 4238 1569 4238 \n",
"Q 1322 4238 1042 4128 \n",
"Q 763 4019 459 3809 \n",
"L 459 4397 \n",
"Q 753 4575 1054 4662 \n",
"Q 1356 4750 1678 4750 \n",
"Q 2253 4750 2601 4447 \n",
"Q 2950 4144 2950 3647 \n",
"Q 2950 3409 2837 3195 \n",
"Q 2725 2981 2444 2713 \n",
"L 2169 2444 \n",
"Q 2022 2297 1961 2214 \n",
"Q 1900 2131 1875 2053 \n",
"Q 1856 1988 1847 1894 \n",
"Q 1838 1800 1838 1638 \n",
"L 1838 1253 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-49\"/>\n",
" <use xlink:href=\"#DejaVuSans-72\" x=\"29.492188\"/>\n",
" <use xlink:href=\"#DejaVuSans-69\" x=\"70.605469\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"98.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-20\" x=\"150.488281\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"182.275391\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"234.375\"/>\n",
" <use xlink:href=\"#DejaVuSans-74\" x=\"295.898438\"/>\n",
" <use xlink:href=\"#DejaVuSans-6f\" x=\"335.107422\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"396.289062\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"448.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-3f\" x=\"509.667969\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_16\">\n",
" <path d=\"M 52.160938 90.800709 \n",
"L 605.120937 287.486853 \n",
"\" clip-path=\"url(#p49dc3d98f2)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"line2d_17\">\n",
" <path d=\"M 265.034637 322.039219 \n",
"L 265.034637 10.999219 \n",
"\" clip-path=\"url(#p49dc3d98f2)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #ffa500; stroke-width: 1.5\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 52.160938 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 52.160938 10.999219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"legend_1\">\n",
" <g id=\"patch_7\">\n",
" <path d=\"M 505.190937 353.119219 \n",
"L 663.440937 353.119219 \n",
"Q 666.440937 353.119219 666.440937 350.119219 \n",
"L 666.440937 284.904375 \n",
"Q 666.440937 281.904375 663.440937 281.904375 \n",
"L 505.190937 281.904375 \n",
"Q 502.190937 281.904375 502.190937 284.904375 \n",
"L 502.190937 350.119219 \n",
"Q 502.190937 353.119219 505.190937 353.119219 \n",
"z\n",
"\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
" </g>\n",
" <g id=\"PathCollection_2\">\n",
" <g>\n",
" <use xlink:href=\"#m157bc0fcb7\" x=\"523.190937\" y=\"295.364531\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_18\">\n",
" <!-- Dane -->\n",
" <g transform=\"translate(550.190937 299.302031) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-44\" d=\"M 1259 4147 \n",
"L 1259 519 \n",
"L 2022 519 \n",
"Q 2988 519 3436 956 \n",
"Q 3884 1394 3884 2338 \n",
"Q 3884 3275 3436 3711 \n",
"Q 2988 4147 2022 4147 \n",
"L 1259 4147 \n",
"z\n",
"M 628 4666 \n",
"L 1925 4666 \n",
"Q 3281 4666 3915 4102 \n",
"Q 4550 3538 4550 2338 \n",
"Q 4550 1131 3912 565 \n",
"Q 3275 0 1925 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
"L 3513 0 \n",
"L 2938 0 \n",
"L 2938 2094 \n",
"Q 2938 2591 2744 2837 \n",
"Q 2550 3084 2163 3084 \n",
"Q 1697 3084 1428 2787 \n",
"Q 1159 2491 1159 1978 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1366 3272 1645 3428 \n",
"Q 1925 3584 2291 3584 \n",
"Q 2894 3584 3203 3211 \n",
"Q 3513 2838 3513 2113 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-44\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"77.001953\"/>\n",
" <use xlink:href=\"#DejaVuSans-6e\" x=\"138.28125\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"201.660156\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_18\">\n",
" <path d=\"M 508.190937 316.069219 \n",
"L 523.190937 316.069219 \n",
"L 538.190937 316.069219 \n",
"\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"text_19\">\n",
" <!-- $y=1.2-0.24x$ -->\n",
" <g transform=\"translate(550.190937 321.319219) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-Oblique-79\" d=\"M 1588 -325 \n",
"Q 1188 -997 936 -1164 \n",
"Q 684 -1331 294 -1331 \n",
"L -159 -1331 \n",
"L -63 -850 \n",
"L 269 -850 \n",
"Q 509 -850 678 -719 \n",
"Q 847 -588 1056 -206 \n",
"L 1234 128 \n",
"L 459 3500 \n",
"L 1069 3500 \n",
"L 1650 819 \n",
"L 3256 3500 \n",
"L 3859 3500 \n",
"L 1588 -325 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
"L 4684 2906 \n",
"L 4684 2381 \n",
"L 678 2381 \n",
"L 678 2906 \n",
"z\n",
"M 678 1631 \n",
"L 4684 1631 \n",
"L 4684 1100 \n",
"L 678 1100 \n",
"L 678 1631 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-Oblique-78\" d=\"M 3841 3500 \n",
"L 2234 1784 \n",
"L 3219 0 \n",
"L 2559 0 \n",
"L 1819 1388 \n",
"L 531 0 \n",
"L -166 0 \n",
"L 1556 1844 \n",
"L 641 3500 \n",
"L 1300 3500 \n",
"L 1972 2234 \n",
"L 3144 3500 \n",
"L 3841 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-Oblique-79\" transform=\"translate(0 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(78.662109 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" transform=\"translate(181.933594 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" transform=\"translate(245.556641 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(271.84375 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2212\" transform=\"translate(354.949219 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(458.220703 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" transform=\"translate(521.84375 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(548.130859 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(611.753906 0.78125)\"/>\n",
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(675.376953 0.78125)\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_19\">\n",
" <path d=\"M 508.190937 338.719219 \n",
"L 523.190937 338.719219 \n",
"L 538.190937 338.719219 \n",
"\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #ffa500; stroke-width: 1.5\"/>\n",
" </g>\n",
" <g id=\"text_20\">\n",
" <!-- próg: $x=3.04$ -->\n",
" <g transform=\"translate(550.190937 343.969219) scale(0.15 -0.15)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
"L 1159 -1331 \n",
"L 581 -1331 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2969 \n",
"Q 1341 3281 1617 3432 \n",
"Q 1894 3584 2278 3584 \n",
"Q 2916 3584 3314 3078 \n",
"Q 3713 2572 3713 1747 \n",
"Q 3713 922 3314 415 \n",
"Q 2916 -91 2278 -91 \n",
"Q 1894 -91 1617 61 \n",
"Q 1341 213 1159 525 \n",
"z\n",
"M 3116 1747 \n",
"Q 3116 2381 2855 2742 \n",
"Q 2594 3103 2138 3103 \n",
"Q 1681 3103 1420 2742 \n",
"Q 1159 2381 1159 1747 \n",
"Q 1159 1113 1420 752 \n",
"Q 1681 391 2138 391 \n",
"Q 2594 391 2855 752 \n",
"Q 3116 1113 3116 1747 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-f3\" d=\"M 1959 3097 \n",
"Q 1497 3097 1228 2736 \n",
"Q 959 2375 959 1747 \n",
"Q 959 1119 1226 758 \n",
"Q 1494 397 1959 397 \n",
"Q 2419 397 2687 759 \n",
"Q 2956 1122 2956 1747 \n",
"Q 2956 2369 2687 2733 \n",
"Q 2419 3097 1959 3097 \n",
"z\n",
"M 1959 3584 \n",
"Q 2709 3584 3137 3096 \n",
"Q 3566 2609 3566 1747 \n",
"Q 3566 888 3137 398 \n",
"Q 2709 -91 1959 -91 \n",
"Q 1206 -91 779 398 \n",
"Q 353 888 353 1747 \n",
"Q 353 2609 779 3096 \n",
"Q 1206 3584 1959 3584 \n",
"z\n",
"M 2394 5119 \n",
"L 3016 5119 \n",
"L 1998 3944 \n",
"L 1519 3944 \n",
"L 2394 5119 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-67\" d=\"M 2906 1791 \n",
"Q 2906 2416 2648 2759 \n",
"Q 2391 3103 1925 3103 \n",
"Q 1463 3103 1205 2759 \n",
"Q 947 2416 947 1791 \n",
"Q 947 1169 1205 825 \n",
"Q 1463 481 1925 481 \n",
"Q 2391 481 2648 825 \n",
"Q 2906 1169 2906 1791 \n",
"z\n",
"M 3481 434 \n",
"Q 3481 -459 3084 -895 \n",
"Q 2688 -1331 1869 -1331 \n",
"Q 1566 -1331 1297 -1286 \n",
"Q 1028 -1241 775 -1147 \n",
"L 775 -588 \n",
"Q 1028 -725 1275 -790 \n",
"Q 1522 -856 1778 -856 \n",
"Q 2344 -856 2625 -561 \n",
"Q 2906 -266 2906 331 \n",
"L 2906 616 \n",
"Q 2728 306 2450 153 \n",
"Q 2172 0 1784 0 \n",
"Q 1141 0 747 490 \n",
"Q 353 981 353 1791 \n",
"Q 353 2603 747 3093 \n",
"Q 1141 3584 1784 3584 \n",
"Q 2172 3584 2450 3431 \n",
"Q 2728 3278 2906 2969 \n",
"L 2906 3500 \n",
"L 3481 3500 \n",
"L 3481 434 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3a\" d=\"M 750 794 \n",
"L 1409 794 \n",
"L 1409 0 \n",
"L 750 0 \n",
"L 750 794 \n",
"z\n",
"M 750 3309 \n",
"L 1409 3309 \n",
"L 1409 2516 \n",
"L 750 2516 \n",
"L 750 3309 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-70\" transform=\"translate(0 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-72\" transform=\"translate(63.476562 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-f3\" transform=\"translate(104.589844 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-67\" transform=\"translate(165.771484 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-3a\" transform=\"translate(229.248047 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-20\" transform=\"translate(262.939453 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(294.726562 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(373.388672 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-33\" transform=\"translate(476.660156 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" transform=\"translate(540.283203 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(572.070312 0.015625)\"/>\n",
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(635.693359 0.015625)\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p49dc3d98f2\">\n",
" <rect x=\"52.160938\" y=\"10.999219\" width=\"552.96\" height=\"311.04\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<Figure size 960x540 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = regdots(X, y, \"x\", \"Iris setosa?\")\n",
"theta_lin = GD(J, dJ, theta_start, X, y, alpha=0.03, eps=0.000001)\n",
"regline(fig, h, theta_lin, X)\n",
"threshold(\n",
" fig, theta_lin\n",
") # pomarańczowa linia oznacza granicę między klasą \"1\" a klasą \"0\" wyznaczoną przez próg \"h(x) = 0.5\"\n",
"legend(fig)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
" * Krzywa regresji liniowej jest niezbyt dopasowana do danych klasyfikacyjnych.\n",
" * Zastosowanie progu $y = 0.5$ nie zawsze pomaga uzyskać sensowny rezultat.\n",
" * $h(x)$ może przyjmować wartości mniejsze od $0$ i większe od $1$ jak interpretować takie wyniki?\n",
"\n",
"Wniosek: w przypadku problemów klasyfikacyjnych regresja liniowa nie wydaje się najlepszym rozwiązaniem."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Wprowadźmy zatem pewne modyfikacje do naszego modelu."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Zdefiniujmy następującą funkcję, którą będziemy nazywać funkcją *logistyczną* (albo *sigmoidalną*):"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Funkcja logistyczna (sigmoidalna)**:\n",
"\n",
"$$g(x) = \\dfrac{1}{1+e^{-x}}$$"
]
},
{
"cell_type": "code",
"execution_count": 154,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"def logistic(x):\n",
" \"\"\"Funkcja logistyczna\"\"\"\n",
" return 1.0 / (1.0 + np.exp(-x))\n"
]
},
{
"cell_type": "code",
"execution_count": 155,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"\n",
"def plot_logistic():\n",
" \"\"\"Wykres funkcji logistycznej\"\"\"\n",
" x = np.linspace(-5, 5, 200)\n",
" y = logistic(x)\n",
" fig = plt.figure(figsize=(7, 5))\n",
" ax = fig.add_subplot(111)\n",
" plt.ylim(-0.1, 1.1)\n",
" ax.plot(x, y, linewidth=\"2\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Wykres funkcji logistycznej $g(x) = \\dfrac{1}{1+e^{-x}}$:"
]
},
{
"cell_type": "code",
"execution_count": 156,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"427.903125pt\" height=\"308.278125pt\" viewBox=\"0 0 427.903125 308.278125\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
" <metadata>\n",
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
" <cc:Work>\n",
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
" <dc:date>2022-11-03T15:23:35.446636</dc:date>\n",
" <dc:format>image/svg+xml</dc:format>\n",
" <dc:creator>\n",
" <cc:Agent>\n",
" <dc:title>Matplotlib v3.6.1, https://matplotlib.org/</dc:title>\n",
" </cc:Agent>\n",
" </dc:creator>\n",
" </cc:Work>\n",
" </rdf:RDF>\n",
" </metadata>\n",
" <defs>\n",
" <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 308.278125 \n",
"L 427.903125 308.278125 \n",
"L 427.903125 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 30.103125 284.4 \n",
"L 420.703125 284.4 \n",
"L 420.703125 7.2 \n",
"L 30.103125 7.2 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path id=\"m25ab07bfe9\" d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m25ab07bfe9\" x=\"83.366761\" y=\"284.4\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(75.995668 298.998438) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
"L 4684 2272 \n",
"L 4684 1741 \n",
"L 678 1741 \n",
"L 678 2272 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
"L 825 1625 \n",
"L 2419 1625 \n",
"L 2419 4116 \n",
"z\n",
"M 2253 4666 \n",
"L 3047 4666 \n",
"L 3047 1625 \n",
"L 3713 1625 \n",
"L 3713 1100 \n",
"L 3047 1100 \n",
"L 3047 0 \n",
"L 2419 0 \n",
"L 2419 1100 \n",
"L 313 1100 \n",
"L 313 1709 \n",
"L 2253 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-34\" x=\"83.789062\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use xlink:href=\"#m25ab07bfe9\" x=\"154.384943\" y=\"284.4\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(147.013849 298.998438) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
"L 3431 531 \n",
"L 3431 0 \n",
"L 469 0 \n",
"L 469 531 \n",
"Q 828 903 1448 1529 \n",
"Q 2069 2156 2228 2338 \n",
"Q 2531 2678 2651 2914 \n",
"Q 2772 3150 2772 3378 \n",
"Q 2772 3750 2511 3984 \n",
"Q 2250 4219 1831 4219 \n",
"Q 1534 4219 1204 4116 \n",
"Q 875 4013 500 3803 \n",
"L 500 4441 \n",
"Q 881 4594 1212 4672 \n",
"Q 1544 4750 1819 4750 \n",
"Q 2544 4750 2975 4387 \n",
"Q 3406 4025 3406 3419 \n",
"Q 3406 3131 3298 2873 \n",
"Q 3191 2616 2906 2266 \n",
"Q 2828 2175 2409 1742 \n",
"Q 1991 1309 1228 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use xlink:href=\"#m25ab07bfe9\" x=\"225.403125\" y=\"284.4\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 0 -->\n",
" <g transform=\"translate(222.221875 298.998438) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
"Q 1547 4250 1301 3770 \n",
"Q 1056 3291 1056 2328 \n",
"Q 1056 1369 1301 889 \n",
"Q 1547 409 2034 409 \n",
"Q 2525 409 2770 889 \n",
"Q 3016 1369 3016 2328 \n",
"Q 3016 3291 2770 3770 \n",
"Q 2525 4250 2034 4250 \n",
"z\n",
"M 2034 4750 \n",
"Q 2819 4750 3233 4129 \n",
"Q 3647 3509 3647 2328 \n",
"Q 3647 1150 3233 529 \n",
"Q 2819 -91 2034 -91 \n",
"Q 1250 -91 836 529 \n",
"Q 422 1150 422 2328 \n",
"Q 422 3509 836 4129 \n",
"Q 1250 4750 2034 4750 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use xlink:href=\"#m25ab07bfe9\" x=\"296.421307\" y=\"284.4\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(293.240057 298.998438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_5\">\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use xlink:href=\"#m25ab07bfe9\" x=\"367.439489\" y=\"284.4\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(364.258239 298.998438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_6\">\n",
" <defs>\n",
" <path id=\"m1a74b5cf4c\" d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"261.3\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 0.0 -->\n",
" <g transform=\"translate(7.2 265.099219) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
"L 1344 794 \n",
"L 1344 0 \n",
"L 684 0 \n",
"L 684 794 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"215.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 0.2 -->\n",
" <g transform=\"translate(7.2 218.899219) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"168.9\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 0.4 -->\n",
" <g transform=\"translate(7.2 172.699219) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-34\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_9\">\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"122.7\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- 0.6 -->\n",
" <g transform=\"translate(7.2 126.499219) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
"Q 1688 2584 1439 2293 \n",
"Q 1191 2003 1191 1497 \n",
"Q 1191 994 1439 701 \n",
"Q 1688 409 2113 409 \n",
"Q 2538 409 2786 701 \n",
"Q 3034 994 3034 1497 \n",
"Q 3034 2003 2786 2293 \n",
"Q 2538 2584 2113 2584 \n",
"z\n",
"M 3366 4563 \n",
"L 3366 3988 \n",
"Q 3128 4100 2886 4159 \n",
"Q 2644 4219 2406 4219 \n",
"Q 1781 4219 1451 3797 \n",
"Q 1122 3375 1075 2522 \n",
"Q 1259 2794 1537 2939 \n",
"Q 1816 3084 2150 3084 \n",
"Q 2853 3084 3261 2657 \n",
"Q 3669 2231 3669 1497 \n",
"Q 3669 778 3244 343 \n",
"Q 2819 -91 2113 -91 \n",
"Q 1303 -91 875 529 \n",
"Q 447 1150 447 2328 \n",
"Q 447 3434 972 4092 \n",
"Q 1497 4750 2381 4750 \n",
"Q 2619 4750 2861 4703 \n",
"Q 3103 4656 3366 4563 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-36\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"76.5\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 0.8 -->\n",
" <g transform=\"translate(7.2 80.299219) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-38\" d=\"M 2034 2216 \n",
"Q 1584 2216 1326 1975 \n",
"Q 1069 1734 1069 1313 \n",
"Q 1069 891 1326 650 \n",
"Q 1584 409 2034 409 \n",
"Q 2484 409 2743 651 \n",
"Q 3003 894 3003 1313 \n",
"Q 3003 1734 2745 1975 \n",
"Q 2488 2216 2034 2216 \n",
"z\n",
"M 1403 2484 \n",
"Q 997 2584 770 2862 \n",
"Q 544 3141 544 3541 \n",
"Q 544 4100 942 4425 \n",
"Q 1341 4750 2034 4750 \n",
"Q 2731 4750 3128 4425 \n",
"Q 3525 4100 3525 3541 \n",
"Q 3525 3141 3298 2862 \n",
"Q 3072 2584 2669 2484 \n",
"Q 3125 2378 3379 2068 \n",
"Q 3634 1759 3634 1313 \n",
"Q 3634 634 3220 271 \n",
"Q 2806 -91 2034 -91 \n",
"Q 1263 -91 848 271 \n",
"Q 434 634 434 1313 \n",
"Q 434 1759 690 2068 \n",
"Q 947 2378 1403 2484 \n",
"z\n",
"M 1172 3481 \n",
"Q 1172 3119 1398 2916 \n",
"Q 1625 2713 2034 2713 \n",
"Q 2441 2713 2670 2916 \n",
"Q 2900 3119 2900 3481 \n",
"Q 2900 3844 2670 4047 \n",
"Q 2441 4250 2034 4250 \n",
"Q 1625 4250 1398 4047 \n",
"Q 1172 3844 1172 3481 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-38\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_6\">\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use xlink:href=\"#m1a74b5cf4c\" x=\"30.103125\" y=\"30.3\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(7.2 34.099219) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
"L 1825 531 \n",
"L 1825 4091 \n",
"L 703 3866 \n",
"L 703 4441 \n",
"L 1819 4666 \n",
"L 2450 4666 \n",
"L 2450 531 \n",
"L 3481 531 \n",
"L 3481 0 \n",
"L 794 0 \n",
"L 794 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_12\">\n",
" <path d=\"M 47.85767 259.753951 \n",
"L 60.348305 259.108374 \n",
"L 71.054564 258.34701 \n",
"L 79.976446 257.517332 \n",
"L 88.898328 256.459493 \n",
"L 96.035834 255.409328 \n",
"L 103.17334 254.13854 \n",
"L 110.310845 252.604196 \n",
"L 115.663975 251.25085 \n",
"L 121.017104 249.697874 \n",
"L 126.370233 247.919437 \n",
"L 131.723363 245.887543 \n",
"L 137.076492 243.572232 \n",
"L 142.429621 240.941951 \n",
"L 147.78275 237.964115 \n",
"L 151.351503 235.769576 \n",
"L 154.920256 233.39639 \n",
"L 158.489009 230.835312 \n",
"L 162.057762 228.077622 \n",
"L 165.626515 225.115347 \n",
"L 169.195268 221.941503 \n",
"L 172.76402 218.550362 \n",
"L 176.332773 214.937724 \n",
"L 179.901526 211.101203 \n",
"L 183.470279 207.040502 \n",
"L 188.823408 200.534323 \n",
"L 194.176538 193.547064 \n",
"L 199.529667 186.111224 \n",
"L 204.882796 178.274355 \n",
"L 212.020302 167.311054 \n",
"L 220.942184 153.045498 \n",
"L 238.785948 124.288946 \n",
"L 245.923454 113.325645 \n",
"L 251.276583 105.488776 \n",
"L 256.629712 98.052936 \n",
"L 261.982842 91.065677 \n",
"L 267.335971 84.559498 \n",
"L 272.6891 78.55248 \n",
"L 276.257853 74.828075 \n",
"L 279.826606 71.326604 \n",
"L 283.395359 68.044738 \n",
"L 286.964112 64.97748 \n",
"L 290.532865 62.118438 \n",
"L 294.101617 59.460103 \n",
"L 297.67037 56.994098 \n",
"L 301.239123 54.711416 \n",
"L 306.592252 51.610419 \n",
"L 311.945382 48.867937 \n",
"L 317.298511 46.451207 \n",
"L 322.65164 44.328257 \n",
"L 328.00477 42.468548 \n",
"L 333.357899 40.843398 \n",
"L 338.711028 39.42624 \n",
"L 345.848534 37.818516 \n",
"L 352.98604 36.48612 \n",
"L 360.123545 35.384473 \n",
"L 369.045427 34.274255 \n",
"L 377.96731 33.403129 \n",
"L 388.673568 32.603446 \n",
"L 401.164203 31.925164 \n",
"L 402.94858 31.846049 \n",
"L 402.94858 31.846049 \n",
"\" clip-path=\"url(#pb1a53d966d)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path d=\"M 30.103125 284.4 \n",
"L 30.103125 7.2 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 420.703125 284.4 \n",
"L 420.703125 7.2 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 30.103125 284.4 \n",
"L 420.703125 284.4 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 30.103125 7.2 \n",
"L 420.703125 7.2 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"pb1a53d966d\">\n",
" <rect x=\"30.103125\" y=\"7.2\" width=\"390.6\" height=\"277.2\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<Figure size 700x500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot_logistic()\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Funkcja logistyczna przekształca zbiór liczb rzeczywistych $\\mathbb{R}$ w przedział otwarty $(0, 1)$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Funkcja regresji logistycznej dla pojedynczego przykładu o cechach wyrażonych wektorem $x$:\n",
"\n",
"$$h_\\theta(x) = g(\\theta^T \\, x) = \\dfrac{1}{1 + e^{-\\theta^T x}}$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Dla całej macierzy cech $X$:\n",
"\n",
"$$h_\\theta(X) = g(X \\, \\theta) = \\dfrac{1}{1 + e^{-X \\theta}}$$"
]
},
{
"cell_type": "code",
"execution_count": 157,
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"def h(theta, X):\n",
" \"\"\"Funkcja regresji logistcznej\"\"\"\n",
" return 1.0 / (1.0 + np.exp(-X * theta))\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Funkcja kosztu dla regresji logistycznej:\n",
"\n",
"$$J(\\theta) = -\\dfrac{1}{m} \\left( \\sum_{i=1}^{m} y^{(i)} \\log h_\\theta( x^{(i)} ) + \\left( 1 - y^{(i)} \\right) \\log \\left( 1 - h_\\theta (x^{(i)}) \\right) \\right)$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Gradient dla regresji logistycznej (wersja macierzowa):\n",
"\n",
"$$\\nabla J(\\theta) = \\frac{1}{|\\vec y|} X^T \\left( h_\\theta(X) - \\vec y \\right)$$\n",
"\n",
"(Jedyna różnica między gradientem dla regresji logistycznej a gradientem dla regresji liniowej to postać $h_\\theta$)."
]
},
{
"cell_type": "code",
"execution_count": 158,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"def J(h, theta, X, y):\n",
" \"\"\"Funkcja kosztu dla regresji logistycznej\"\"\"\n",
" m = len(y)\n",
" h_val = h(theta, X)\n",
" s1 = np.multiply(y, np.log(h_val))\n",
" s2 = np.multiply((1 - y), np.log(1 - h_val))\n",
" return -np.sum(s1 + s2, axis=0) / m\n"
]
},
{
"cell_type": "code",
"execution_count": 159,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"def dJ(h, theta, X, y):\n",
" \"\"\"Gradient dla regresji logistycznej\"\"\"\n",
" return 1.0 / len(y) * (X.T * (h(theta, X) - y))\n"
]
},
{
"cell_type": "code",
"execution_count": 160,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"def GD(h, fJ, fdJ, theta, X, y, alpha=0.01, eps=10**-3, max_steps=10000):\n",
" \"\"\"Metoda gradientu prostego dla regresji logistycznej\"\"\"\n",
" curr_cost = fJ(h, theta, X, y)\n",
" history = [[curr_cost, theta]]\n",
" while True:\n",
" # oblicz nowe theta\n",
" theta = theta - alpha * fdJ(h, theta, X, y)\n",
" # raportuj poziom błędu\n",
" prev_cost = curr_cost\n",
" curr_cost = fJ(h, theta, X, y)\n",
" # kryteria stopu\n",
" if abs(prev_cost - curr_cost) <= eps:\n",
" break\n",
" if len(history) > max_steps:\n",
" break\n",
" history.append([curr_cost, theta])\n",
" return theta, history\n"
]
},
{
"cell_type": "code",
"execution_count": 161,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Koszt: [[0.05755617]]\n",
"theta = [[ 5.02530461]\n",
" [-1.99174803]]\n"
]
}
],
"source": [
"# Uruchomienie metody gradientu prostego dla regresji logistycznej\n",
"theta_best, history = GD(\n",
" h, J, dJ, theta_start, X, y, alpha=0.1, eps=10**-7, max_steps=1000\n",
")\n",
"print(f\"Koszt: {history[-1][0]}\")\n",
"print(f\"theta = {theta_best}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 162,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"def scalar_logistic_regression_function(theta, x):\n",
" \"\"\"Funkcja regresji logistycznej (wersja skalarna)\"\"\"\n",
" return 1.0 / (1.0 + np.exp(-(theta.item(0) + theta.item(1) * x)))\n",
"\n",
"\n",
"def threshold_val(fig, x_thr):\n",
" \"\"\"Rysowanie progu\"\"\"\n",
" ax = fig.axes[0]\n",
" ax.plot(\n",
" [x_thr, x_thr],\n",
" [-1, 2],\n",
" color=\"orange\",\n",
" linestyle=\"dashed\",\n",
" label=\"próg: $x={:.2F}$\".format(x_thr),\n",
" )\n",
"\n",
"\n",
"def logistic_regline(fig, theta, X):\n",
" \"\"\"Wykres krzywej regresji logistycznej\"\"\"\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 = scalar_logistic_regression_function(theta, Arg)\n",
" ax.plot(Arg, Val, linewidth=\"2\")\n"
]
},
{
"cell_type": "code",
"execution_count": 163,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"612.320937pt\" height=\"359.595469pt\" viewBox=\"0 0 612.320937 359.595469\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
" <metadata>\n",
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
" <cc:Work>\n",
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
" <dc:date>2022-11-03T15:23:36.128355</dc:date>\n",
" <dc:format>image/svg+xml</dc:format>\n",
" <dc:creator>\n",
" <cc:Agent>\n",
" <dc:title>Matplotlib v3.6.1, https://matplotlib.org/</dc:title>\n",
" </cc:Agent>\n",
" </dc:creator>\n",
" </cc:Work>\n",
" </rdf:RDF>\n",
" </metadata>\n",
" <defs>\n",
" <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 359.595469 \n",
"L 612.320937 359.595469 \n",
"L 612.320937 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"L 52.160938 10.999219 \n",
"z\n",
"\" style=\"fill: #ffffff\"/>\n",
" </g>\n",
" <g id=\"PathCollection_1\">\n",
" <defs>\n",
" <path id=\"m5ac1b2fb92\" d=\"M 0 3.535534 \n",
"C 0.937635 3.535534 1.836992 3.163008 2.5 2.5 \n",
"C 3.163008 1.836992 3.535534 0.937635 3.535534 0 \n",
"C 3.535534 -0.937635 3.163008 -1.836992 2.5 -2.5 \n",
"C 1.836992 -3.163008 0.937635 -3.535534 0 -3.535534 \n",
"C -0.937635 -3.535534 -1.836992 -3.163008 -2.5 -2.5 \n",
"C -3.163008 -1.836992 -3.535534 -0.937635 -3.535534 0 \n",
"C -3.535534 0.937635 -3.163008 1.836992 -2.5 2.5 \n",
"C -1.836992 3.163008 -0.937635 3.535534 0 3.535534 \n",
"z\n",
"\" style=\"stroke: #ff0000\"/>\n",
" </defs>\n",
" <g clip-path=\"url(#p1e70a97f54)\">\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"297.143216\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"304.14271\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"311.142203\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"500.128532\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"185.151317\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"423.134102\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"381.13714\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"339.140178\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"122.155874\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"388.136634\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"353.139165\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"318.141697\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"479.130051\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"493.129039\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"409.135115\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"262.145748\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"521.127013\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"416.134608\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"360.138659\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"367.138153\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"171.15233\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"444.132583\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"283.144229\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"402.135621\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"535.126001\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"346.139672\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"514.12752\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"164.152836\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"395.136127\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"143.154355\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"465.131064\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"472.130558\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"325.141191\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"332.140684\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"157.153343\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"374.137646\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"129.155368\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"437.133089\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"136.154862\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"150.153849\" y=\"114.679219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"458.13157\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"430.133596\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" <use xlink:href=\"#m5ac1b2fb92\" x=\"451.132077\" y=\"218.359219\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path id=\"m2c5e7385b4\" d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 0 -->\n",
" <g transform=\"translate(48.979688 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
"Q 1547 4250 1301 3770 \n",
"Q 1056 3291 1056 2328 \n",
"Q 1056 1369 1301 889 \n",
"Q 1547 409 2034 409 \n",
"Q 2525 409 2770 889 \n",
"Q 3016 1369 3016 2328 \n",
"Q 3016 3291 2770 3770 \n",
"Q 2525 4250 2034 4250 \n",
"z\n",
"M 2034 4750 \n",
"Q 2819 4750 3233 4129 \n",
"Q 3647 3509 3647 2328 \n",
"Q 3647 1150 3233 529 \n",
"Q 2819 -91 2034 -91 \n",
"Q 1250 -91 836 529 \n",
"Q 422 1150 422 2328 \n",
"Q 422 3509 836 4129 \n",
"Q 1250 4750 2034 4750 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"122.155874\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 1 -->\n",
" <g transform=\"translate(118.974624 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
"L 1825 531 \n",
"L 1825 4091 \n",
"L 703 3866 \n",
"L 703 4441 \n",
"L 1819 4666 \n",
"L 2450 4666 \n",
"L 2450 531 \n",
"L 3481 531 \n",
"L 3481 0 \n",
"L 794 0 \n",
"L 794 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"192.150811\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 2 -->\n",
" <g transform=\"translate(188.969561 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
"L 3431 531 \n",
"L 3431 0 \n",
"L 469 0 \n",
"L 469 531 \n",
"Q 828 903 1448 1529 \n",
"Q 2069 2156 2228 2338 \n",
"Q 2531 2678 2651 2914 \n",
"Q 2772 3150 2772 3378 \n",
"Q 2772 3750 2511 3984 \n",
"Q 2250 4219 1831 4219 \n",
"Q 1534 4219 1204 4116 \n",
"Q 875 4013 500 3803 \n",
"L 500 4441 \n",
"Q 881 4594 1212 4672 \n",
"Q 1544 4750 1819 4750 \n",
"Q 2544 4750 2975 4387 \n",
"Q 3406 4025 3406 3419 \n",
"Q 3406 3131 3298 2873 \n",
"Q 3191 2616 2906 2266 \n",
"Q 2828 2175 2409 1742 \n",
"Q 1991 1309 1228 531 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"262.145748\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 3 -->\n",
" <g transform=\"translate(258.964498 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
"Q 3050 2419 3304 2112 \n",
"Q 3559 1806 3559 1356 \n",
"Q 3559 666 3084 287 \n",
"Q 2609 -91 1734 -91 \n",
"Q 1441 -91 1130 -33 \n",
"Q 819 25 488 141 \n",
"L 488 750 \n",
"Q 750 597 1062 519 \n",
"Q 1375 441 1716 441 \n",
"Q 2309 441 2620 675 \n",
"Q 2931 909 2931 1356 \n",
"Q 2931 1769 2642 2001 \n",
"Q 2353 2234 1838 2234 \n",
"L 1294 2234 \n",
"L 1294 2753 \n",
"L 1863 2753 \n",
"Q 2328 2753 2575 2939 \n",
"Q 2822 3125 2822 3475 \n",
"Q 2822 3834 2567 4026 \n",
"Q 2313 4219 1838 4219 \n",
"Q 1578 4219 1281 4162 \n",
"Q 984 4106 628 3988 \n",
"L 628 4550 \n",
"Q 988 4650 1302 4700 \n",
"Q 1616 4750 1894 4750 \n",
"Q 2613 4750 3031 4423 \n",
"Q 3450 4097 3450 3541 \n",
"Q 3450 3153 3228 2886 \n",
"Q 3006 2619 2597 2516 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_5\">\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"332.140684\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 4 -->\n",
" <g transform=\"translate(328.959434 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
"L 825 1625 \n",
"L 2419 1625 \n",
"L 2419 4116 \n",
"z\n",
"M 2253 4666 \n",
"L 3047 4666 \n",
"L 3047 1625 \n",
"L 3713 1625 \n",
"L 3713 1100 \n",
"L 3047 1100 \n",
"L 3047 0 \n",
"L 2419 0 \n",
"L 2419 1100 \n",
"L 313 1100 \n",
"L 313 1709 \n",
"L 2253 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_6\">\n",
" <g id=\"line2d_6\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"402.135621\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 5 -->\n",
" <g transform=\"translate(398.954371 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
"L 3169 4666 \n",
"L 3169 4134 \n",
"L 1269 4134 \n",
"L 1269 2991 \n",
"Q 1406 3038 1543 3061 \n",
"Q 1681 3084 1819 3084 \n",
"Q 2600 3084 3056 2656 \n",
"Q 3513 2228 3513 1497 \n",
"Q 3513 744 3044 326 \n",
"Q 2575 -91 1722 -91 \n",
"Q 1428 -91 1123 -41 \n",
"Q 819 9 494 109 \n",
"L 494 744 \n",
"Q 775 591 1075 516 \n",
"Q 1375 441 1709 441 \n",
"Q 2250 441 2565 725 \n",
"Q 2881 1009 2881 1497 \n",
"Q 2881 1984 2565 2268 \n",
"Q 2250 2553 1709 2553 \n",
"Q 1456 2553 1204 2497 \n",
"Q 953 2441 691 2322 \n",
"L 691 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_7\">\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"472.130558\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 6 -->\n",
" <g transform=\"translate(468.949308 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
"Q 1688 2584 1439 2293 \n",
"Q 1191 2003 1191 1497 \n",
"Q 1191 994 1439 701 \n",
"Q 1688 409 2113 409 \n",
"Q 2538 409 2786 701 \n",
"Q 3034 994 3034 1497 \n",
"Q 3034 2003 2786 2293 \n",
"Q 2538 2584 2113 2584 \n",
"z\n",
"M 3366 4563 \n",
"L 3366 3988 \n",
"Q 3128 4100 2886 4159 \n",
"Q 2644 4219 2406 4219 \n",
"Q 1781 4219 1451 3797 \n",
"Q 1122 3375 1075 2522 \n",
"Q 1259 2794 1537 2939 \n",
"Q 1816 3084 2150 3084 \n",
"Q 2853 3084 3261 2657 \n",
"Q 3669 2231 3669 1497 \n",
"Q 3669 778 3244 343 \n",
"Q 2819 -91 2113 -91 \n",
"Q 1303 -91 875 529 \n",
"Q 447 1150 447 2328 \n",
"Q 447 3434 972 4092 \n",
"Q 1497 4750 2381 4750 \n",
"Q 2619 4750 2861 4703 \n",
"Q 3103 4656 3366 4563 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_8\">\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use xlink:href=\"#m2c5e7385b4\" x=\"542.125494\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 7 -->\n",
" <g transform=\"translate(538.944244 336.637656) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
"L 3525 4666 \n",
"L 3525 4397 \n",
"L 1831 0 \n",
"L 1172 0 \n",
"L 2766 4134 \n",
"L 525 4134 \n",
"L 525 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-37\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- x -->\n",
" <g transform=\"translate(325.681562 350.315781) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
"L 2247 1797 \n",
"L 3578 0 \n",
"L 2900 0 \n",
"L 1881 1375 \n",
"L 863 0 \n",
"L 184 0 \n",
"L 1544 1831 \n",
"L 300 3500 \n",
"L 978 3500 \n",
"L 1906 2253 \n",
"L 2834 3500 \n",
"L 3513 3500 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-78\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_9\">\n",
" <defs>\n",
" <path id=\"m01e7f1c04d\" d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </defs>\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"322.039219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(20.878125 325.838437) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
"L 4684 2272 \n",
"L 4684 1741 \n",
"L 678 1741 \n",
"L 678 2272 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
"L 1344 794 \n",
"L 1344 0 \n",
"L 684 0 \n",
"L 684 794 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"270.199219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(20.878125 273.998437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"179.199219\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"218.359219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <!-- 0.0 -->\n",
" <g transform=\"translate(29.257813 222.158437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_12\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"166.519219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <!-- 0.5 -->\n",
" <g transform=\"translate(29.257813 170.318437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_13\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"114.679219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <!-- 1.0 -->\n",
" <g transform=\"translate(29.257813 118.478437) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_6\">\n",
" <g id=\"line2d_14\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"62.839219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <!-- 1.5 -->\n",
" <g transform=\"translate(29.257813 66.638438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_7\">\n",
" <g id=\"line2d_15\">\n",
" <g>\n",
" <use xlink:href=\"#m01e7f1c04d\" x=\"52.160938\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <!-- 2.0 -->\n",
" <g transform=\"translate(29.257813 14.798438) scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
" <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
" <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <!-- Iris setosa? -->\n",
" <g transform=\"translate(14.798438 194.655937) rotate(-90) scale(0.1 -0.1)\">\n",
" <defs>\n",
" <path id=\"DejaVuSans-49\" d=\"M 628 4666 \n",
"L 1259 4666 \n",
"L 1259 0 \n",
"L 628 0 \n",
"L 628 4666 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
"Q 2534 3019 2420 3045 \n",
"Q 2306 3072 2169 3072 \n",
"Q 1681 3072 1420 2755 \n",
"Q 1159 2438 1159 1844 \n",
"L 1159 0 \n",
"L 581 0 \n",
"L 581 3500 \n",
"L 1159 3500 \n",
"L 1159 2956 \n",
"Q 1341 3275 1631 3429 \n",
"Q 1922 3584 2338 3584 \n",
"Q 2397 3584 2469 3576 \n",
"Q 2541 3569 2628 3553 \n",
"L 2631 2963 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
"L 1178 3500 \n",
"L 1178 0 \n",
"L 603 0 \n",
"L 603 3500 \n",
"z\n",
"M 603 4863 \n",
"L 1178 4863 \n",
"L 1178 4134 \n",
"L 603 4134 \n",
"L 603 4863 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
"L 2834 2853 \n",
"Q 2591 2978 2328 3040 \n",
"Q 2066 3103 1784 3103 \n",
"Q 1356 3103 1142 2972 \n",
"Q 928 2841 928 2578 \n",
"Q 928 2378 1081 2264 \n",
"Q 1234 2150 1697 2047 \n",
"L 1894 2003 \n",
"Q 2506 1872 2764 1633 \n",
"Q 3022 1394 3022 966 \n",
"Q 3022 478 2636 193 \n",
"Q 2250 -91 1575 -91 \n",
"Q 1294 -91 989 -36 \n",
"Q 684 19 347 128 \n",
"L 347 722 \n",
"Q 666 556 975 473 \n",
"Q 1284 391 1588 391 \n",
"Q 1994 391 2212 530 \n",
"Q 2431 669 2431 922 \n",
"Q 2431 1156 2273 1281 \n",
"Q 2116 1406 1581 1522 \n",
"L 1381 1569 \n",
"Q 847 1681 609 1914 \n",
"Q 372 2147 372 2553 \n",
"Q 372 3047 722 3315 \n",
"Q 1072 3584 1716 3584 \n",
"Q 2034 3584 2315 3537 \n",
"Q 2597 3491 2834 3397 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
"L 3597 1613 \n",
"L 953 1613 \n",
"Q 991 1019 1311 708 \n",
"Q 1631 397 2203 397 \n",
"Q 2534 397 2845 478 \n",
"Q 3156 559 3463 722 \n",
"L 3463 178 \n",
"Q 3153 47 2828 -22 \n",
"Q 2503 -91 2169 -91 \n",
"Q 1331 -91 842 396 \n",
"Q 353 884 353 1716 \n",
"Q 353 2575 817 3079 \n",
"Q 1281 3584 2069 3584 \n",
"Q 2775 3584 3186 3129 \n",
"Q 3597 2675 3597 1894 \n",
"z\n",
"M 3022 2063 \n",
"Q 3016 2534 2758 2815 \n",
"Q 2500 3097 2075 3097 \n",
"Q 1594 3097 1305 2825 \n",
"Q 1016 2553 972 2059 \n",
"L 3022 2063 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
"L 1172 3500 \n",
"L 2356 3500 \n",
"L 2356 3053 \n",
"L 1172 3053 \n",
"L 1172 1153 \n",
"Q 1172 725 1289 603 \n",
"Q 1406 481 1766 481 \n",
"L 2356 481 \n",
"L 2356 0 \n",
"L 1766 0 \n",
"Q 1100 0 847 248 \n",
"Q 594 497 594 1153 \n",
"L 594 3053 \n",
"L 172 3053 \n",
"L 172 3500 \n",
"L 594 3500 \n",
"L 594 4494 \n",
"L 1172 4494 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
"Q 1497 3097 1228 2736 \n",
"Q 959 2375 959 1747 \n",
"Q 959 1119 1226 758 \n",
"Q 1494 397 1959 397 \n",
"Q 2419 397 2687 759 \n",
"Q 2956 1122 2956 1747 \n",
"Q 2956 2369 2687 2733 \n",
"Q 2419 3097 1959 3097 \n",
"z\n",
"M 1959 3584 \n",
"Q 2709 3584 3137 3096 \n",
"Q 3566 2609 3566 1747 \n",
"Q 3566 888 3137 398 \n",
"Q 2709 -91 1959 -91 \n",
"Q 1206 -91 779 398 \n",
"Q 353 888 353 1747 \n",
"Q 353 2609 779 3096 \n",
"Q 1206 3584 1959 3584 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
"Q 1497 1759 1228 1600 \n",
"Q 959 1441 959 1056 \n",
"Q 959 750 1161 570 \n",
"Q 1363 391 1709 391 \n",
"Q 2188 391 2477 730 \n",
"Q 2766 1069 2766 1631 \n",
"L 2766 1759 \n",
"L 2194 1759 \n",
"z\n",
"M 3341 1997 \n",
"L 3341 0 \n",
"L 2766 0 \n",
"L 2766 531 \n",
"Q 2569 213 2275 61 \n",
"Q 1981 -91 1556 -91 \n",
"Q 1019 -91 701 211 \n",
"Q 384 513 384 1019 \n",
"Q 384 1609 779 1909 \n",
"Q 1175 2209 1959 2209 \n",
"L 2766 2209 \n",
"L 2766 2266 \n",
"Q 2766 2663 2505 2880 \n",
"Q 2244 3097 1772 3097 \n",
"Q 1472 3097 1187 3025 \n",
"Q 903 2953 641 2809 \n",
"L 641 3341 \n",
"Q 956 3463 1253 3523 \n",
"Q 1550 3584 1831 3584 \n",
"Q 2591 3584 2966 3190 \n",
"Q 3341 2797 3341 1997 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" <path id=\"DejaVuSans-3f\" d=\"M 1222 794 \n",
"L 1856 794 \n",
"L 1856 0 \n",
"L 1222 0 \n",
"L 1222 794 \n",
"z\n",
"M 1838 1253 \n",
"L 1241 1253 \n",
"L 1241 1734 \n",
"Q 1241 2050 1328 2253 \n",
"Q 1416 2456 1697 2725 \n",
"L 1978 3003 \n",
"Q 2156 3169 2236 3316 \n",
"Q 2316 3463 2316 3616 \n",
"Q 2316 3894 2111 4066 \n",
"Q 1906 4238 1569 4238 \n",
"Q 1322 4238 1042 4128 \n",
"Q 763 4019 459 3809 \n",
"L 459 4397 \n",
"Q 753 4575 1054 4662 \n",
"Q 1356 4750 1678 4750 \n",
"Q 2253 4750 2601 4447 \n",
"Q 2950 4144 2950 3647 \n",
"Q 2950 3409 2837 3195 \n",
"Q 2725 2981 2444 2713 \n",
"L 2169 2444 \n",
"Q 2022 2297 1961 2214 \n",
"Q 1900 2131 1875 2053 \n",
"Q 1856 1988 1847 1894 \n",
"Q 1838 1800 1838 1638 \n",
"L 1838 1253 \n",
"z\n",
"\" transform=\"scale(0.015625)\"/>\n",
" </defs>\n",
" <use xlink:href=\"#DejaVuSans-49\"/>\n",
" <use xlink:href=\"#DejaVuSans-72\" x=\"29.492188\"/>\n",
" <use xlink:href=\"#DejaVuSans-69\" x=\"70.605469\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"98.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-20\" x=\"150.488281\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"182.275391\"/>\n",
" <use xlink:href=\"#DejaVuSans-65\" x=\"234.375\"/>\n",
" <use xlink:href=\"#DejaVuSans-74\" x=\"295.898438\"/>\n",
" <use xlink:href=\"#DejaVuSans-6f\" x=\"335.107422\"/>\n",
" <use xlink:href=\"#DejaVuSans-73\" x=\"396.289062\"/>\n",
" <use xlink:href=\"#DejaVuSans-61\" x=\"448.388672\"/>\n",
" <use xlink:href=\"#DejaVuSans-3f\" x=\"509.667969\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"line2d_16\">\n",
" <path d=\"M 52.160938 115.355908 \n",
"L 59.160431 115.503861 \n",
"L 66.159925 115.683847 \n",
"L 73.159419 115.902649 \n",
"L 80.158912 116.168415 \n",
"L 87.158406 116.490891 \n",
"L 94.1579 116.881693 \n",
"L 101.157393 117.354583 \n",
"L 108.156887 117.925757 \n",
"L 115.156381 118.614123 \n",
"L 122.155874 119.441523 \n",
"L 129.155368 120.432866 \n",
"L 136.154862 121.6161 \n",
"L 143.154355 123.021934 \n",
"L 150.153849 124.683215 \n",
"L 157.153343 126.633825 \n",
"L 164.152836 128.907005 \n",
"L 171.15233 131.533009 \n",
"L 178.151824 134.536101 \n",
"L 185.151317 137.931 \n",
"L 192.150811 141.719085 \n",
"L 199.150305 145.884864 \n",
"L 206.149798 150.393356 \n",
"L 213.149292 155.189132 \n",
"L 220.148786 160.197602 \n",
"L 227.148279 165.328805 \n",
"L 234.147773 170.483452 \n",
"L 241.147267 175.560437 \n",
"L 248.14676 180.464632 \n",
"L 255.146254 185.113739 \n",
"L 262.145748 189.443178 \n",
"L 269.145241 193.408533 \n",
"L 276.144735 196.985563 \n",
"L 283.144229 200.168266 \n",
"L 290.143722 202.965677 \n",
"L 297.143216 205.398123 \n",
"L 304.14271 207.493505 \n",
"L 311.142203 209.284021 \n",
"L 318.141697 210.803505 \n",
"L 325.141191 212.085449 \n",
"L 332.140684 213.161652 \n",
"L 339.140178 214.061388 \n",
"L 346.139672 214.810985 \n",
"L 353.139165 215.433692 \n",
"L 360.138659 215.949744 \n",
"L 367.138153 216.376558 \n",
"L 374.137646 216.728984 \n",
"L 381.13714 217.019589 \n",
"L 388.136634 217.25895 \n",
"L 395.136127 217.45592 \n",
"L 402.135621 217.617883 \n",
"L 409.135115 217.750978 \n",
"L 416.134608 217.860294 \n",
"L 423.134102 217.950041 \n",
"L 430.133596 218.023696 \n",
"L 437.133089 218.084129 \n",
"L 444.132583 218.1337 \n",
"L 451.132077 218.174355 \n",
"L 458.13157 218.207691 \n",
"L 465.131064 218.235023 \n",
"L 472.130558 218.25743 \n",
"L 479.130051 218.275798 \n",
"L 486.129545 218.290853 \n",
"L 493.129039 218.303193 \n",
"L 500.128532 218.313306 \n",
"L 507.128026 218.321595 \n",
"L 514.12752 218.328387 \n",
"L 521.127013 218.333954 \n",
"L 528.126507 218.338516 \n",
"L 535.126001 218.342254 \n",
"L 542.125494 218.345317 \n",
"L 549.124988 218.347827 \n",
"L 556.124482 218.349884 \n",
"L 563.123975 218.35157 \n",
"L 570.123469 218.352951 \n",
"L 577.122963 218.354083 \n",
"L 584.122456 218.355011 \n",
"L 591.12195 218.35577 \n",
"L 598.121444 218.356393 \n",
"\" clip-path=\"url(#p1e70a97f54)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 2; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"line2d_17\">\n",
" <path d=\"M 227.148279 322.039219 \n",
"L 227.148279 10.999219 \n",
"\" clip-path=\"url(#p1e70a97f54)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #ffa500; stroke-width: 1.5\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 52.160938 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 605.120937 322.039219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 52.160938 322.039219 \n",
"L 605.120937 322.039219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 52.160938 10.999219 \n",
"L 605.120937 10.999219 \n",
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p1e70a97f54\">\n",
" <rect x=\"52.160938\" y=\"10.999219\" width=\"552.96\" height=\"311.04\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<Figure size 960x540 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = regdots(X, y, xlabel=\"x\", ylabel=\"Iris setosa?\")\n",
"logistic_regline(fig, theta_best, X)\n",
"threshold_val(fig, 2.5)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Traktujemy wartość $h_\\theta(x)$ jako prawdopodobieństwo, że cecha przyjmie wartość pozytywną:\n",
"\n",
"$$ h_\\theta(x) = P(y = 1 \\, | \\, x; \\theta) $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Jeżeli $h_\\theta(x) > 0.5$, to dla takiego $x$ będziemy przewidywać wartość $y = 1$.\n",
"W przeciwnym wypadku uprzewidzimy $y = 0$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Dlaczego możemy traktować wartość funkcji regresji logistycznej jako prawdopodobieństwo?\n",
"\n",
"Można o tym poczytać w zewnętrznych źródłach, np. https://towardsdatascience.com/logit-of-logistic-regression-understanding-the-fundamentals-f384152a33d1"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Dwuklasowa regresja logistyczna: więcej cech"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Jak postąpić, jeżeli będziemy mieli więcej niż jedną cechę $x$?\n",
"\n",
"Weźmy teraz wszystkie cechy występujące w zbiorze *Iris*:\n",
"* długość płatków (`pl`, *petal length*)\n",
"* szerokość płatków (`pw`, *petal width*)\n",
"* długość działek kielicha (`sl`, *sepal length*)\n",
"* szerokość działek kielicha (`sw`, *sepal width*)"
]
},
{
"cell_type": "code",
"execution_count": 164,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" pl pw sl sw Iris setosa?\n",
"0 1.4 0.2 5.2 3.4 1\n",
"1 1.5 0.4 5.1 3.7 1\n",
"2 5.6 2.4 6.7 3.1 0\n",
"3 5.1 2.0 6.5 3.2 0\n",
"4 4.5 1.7 4.9 2.5 0\n",
"5 5.1 1.6 6.0 2.7 0\n"
]
}
],
"source": [
"data_iris_setosa_multi = pandas.DataFrame()\n",
"for feature in [\"pl\", \"pw\", \"sl\", \"sw\"]:\n",
" data_iris_setosa_multi[feature] = data_iris[feature]\n",
"data_iris_setosa_multi[\"Iris setosa?\"] = data_iris[\"Gatunek\"].apply(\n",
" lambda x: 1 if x == \"Iris-setosa\" else 0\n",
")\n",
"print(data_iris_setosa_multi[:6])\n"
]
},
{
"cell_type": "code",
"execution_count": 165,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[1. 1.4 0.2 5.2 3.4]\n",
" [1. 1.5 0.4 5.1 3.7]\n",
" [1. 5.6 2.4 6.7 3.1]\n",
" [1. 5.1 2. 6.5 3.2]\n",
" [1. 4.5 1.7 4.9 2.5]\n",
" [1. 5.1 1.6 6. 2.7]]\n",
"[[1.]\n",
" [1.]\n",
" [0.]\n",
" [0.]\n",
" [0.]\n",
" [0.]]\n"
]
}
],
"source": [
"# Przygotowanie danych\n",
"m, n_plus_1 = data_iris_setosa_multi.values.shape\n",
"n = n_plus_1 - 1\n",
"Xn = data_iris_setosa_multi.values[:, 0:n].reshape(m, n)\n",
"\n",
"X = np.matrix(np.concatenate((np.ones((m, 1)), Xn), axis=1)).reshape(m, n_plus_1)\n",
"y = np.matrix(data_iris_setosa_multi.values[:, n]).reshape(m, 1)\n",
"\n",
"print(X[:6])\n",
"print(y[:6])\n"
]
},
{
"cell_type": "code",
"execution_count": 166,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"# Podział danych na zbiór trenujący i testowy\n",
"XTrain, XTest = X[:100], X[100:]\n",
"yTrain, yTest = y[:100], y[100:]\n",
"\n",
"# Macierz parametrów początkowych\n",
"theta_start = np.ones(5).reshape(5, 1)\n"
]
},
{
"cell_type": "code",
"execution_count": 167,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Koszt: [[0.006797]]\n",
"theta = [[ 1.11414027]\n",
" [-2.89324615]\n",
" [-0.66543637]\n",
" [ 0.14887292]\n",
" [ 2.13284493]]\n"
]
}
],
"source": [
"theta_best, history = GD(\n",
" h, J, dJ, theta_start, XTrain, yTrain, alpha=0.1, eps=10**-7, max_steps=1000\n",
")\n",
"print(f\"Koszt: {history[-1][0]}\")\n",
"print(f\"theta = {theta_best}\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Funkcja decyzyjna regresji logistycznej\n",
"\n",
"Funkcja decyzyjna mówi o tym, kiedy nasz algorytm będzie przewidywał $y = 1$, a kiedy $y = 0$:\n",
"\n",
"$$ c(x) := \\left\\{ \n",
"\\begin{array}{ll}\n",
"1, & \\mbox{gdy } P(y=1 \\, | \\, x; \\theta) > 0.5 \\\\\n",
"0 & \\mbox{w przeciwnym przypadku}\n",
"\\end{array}\\right.\n",
"$$\n",
"\n",
"$$ P(y=1 \\,| \\, x; \\theta) = h_\\theta(x) $$"
]
},
{
"cell_type": "code",
"execution_count": 168,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"theta = [[ 1.11414027]\n",
" [-2.89324615]\n",
" [-0.66543637]\n",
" [ 0.14887292]\n",
" [ 2.13284493]]\n",
"x0 = [[1. 6.3 1.8 7.3 2.9]]\n",
"h(x0) = 1.606143695982487e-05\n",
"c(x0) = (0, 1.606143695982487e-05)\n"
]
}
],
"source": [
"def classifyBi(theta, X):\n",
" \"\"\"Funkcja decyzyjna regresji logistycznej\"\"\"\n",
" prob = h(theta, X).item()\n",
" return (1, prob) if prob > 0.5 else (0, prob)\n",
"\n",
"\n",
"print(f\"theta = {theta_best}\")\n",
"print(f\"x0 = {XTest[0]}\")\n",
"print(f\"h(x0) = {h(theta_best, XTest[0]).item()}\")\n",
"print(f\"c(x0) = {classifyBi(theta_best, XTest[0])}\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Obliczmy teraz skuteczność modelu (więcej na ten temat na następnym wykładzie, poświęconym metodom ewaluacji)."
]
},
{
"cell_type": "code",
"execution_count": 169,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 <=> 0 -- prob: 0.0000\n",
"1 <=> 1 -- prob: 0.9816\n",
"0 <=> 0 -- prob: 0.0001\n",
"0 <=> 0 -- prob: 0.0005\n",
"0 <=> 0 -- prob: 0.0001\n",
"1 <=> 1 -- prob: 0.9936\n",
"0 <=> 0 -- prob: 0.0059\n",
"0 <=> 0 -- prob: 0.0992\n",
"0 <=> 0 -- prob: 0.0001\n",
"0 <=> 0 -- prob: 0.0001\n",
"\n",
"Accuracy: 1.0\n"
]
}
],
"source": [
"correct = 0\n",
"for i, rest in enumerate(yTest):\n",
" cls, prob = classifyBi(theta_best, XTest[i])\n",
" if i < 10:\n",
" print(f\"{yTest[i].item():1.0f} <=> {cls} -- prob: {prob:6.4f}\")\n",
" correct += cls == yTest[i].item()\n",
"accuracy = correct / len(XTest)\n",
"\n",
"print(f\"\\nAccuracy: {accuracy}\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## 4.2. Wieloklasowa regresja logistyczna"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Przykład: wszystkie cechy ze zbioru *Iris*, wszystkie 3 klasy ze zbioru *Iris*."
]
},
{
"cell_type": "code",
"execution_count": 170,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"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>sl</th>\n",
" <th>sw</th>\n",
" <th>pl</th>\n",
" <th>pw</th>\n",
" <th>Gatunek</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>5.2</td>\n",
" <td>3.4</td>\n",
" <td>1.4</td>\n",
" <td>0.2</td>\n",
" <td>Iris-setosa</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>5.1</td>\n",
" <td>3.7</td>\n",
" <td>1.5</td>\n",
" <td>0.4</td>\n",
" <td>Iris-setosa</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>6.7</td>\n",
" <td>3.1</td>\n",
" <td>5.6</td>\n",
" <td>2.4</td>\n",
" <td>Iris-virginica</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>6.5</td>\n",
" <td>3.2</td>\n",
" <td>5.1</td>\n",
" <td>2.0</td>\n",
" <td>Iris-virginica</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4.9</td>\n",
" <td>2.5</td>\n",
" <td>4.5</td>\n",
" <td>1.7</td>\n",
" <td>Iris-virginica</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>6.0</td>\n",
" <td>2.7</td>\n",
" <td>5.1</td>\n",
" <td>1.6</td>\n",
" <td>Iris-versicolor</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" sl sw pl pw Gatunek\n",
"0 5.2 3.4 1.4 0.2 Iris-setosa\n",
"1 5.1 3.7 1.5 0.4 Iris-setosa\n",
"2 6.7 3.1 5.6 2.4 Iris-virginica\n",
"3 6.5 3.2 5.1 2.0 Iris-virginica\n",
"4 4.9 2.5 4.5 1.7 Iris-virginica\n",
"5 6.0 2.7 5.1 1.6 Iris-versicolor"
]
},
"execution_count": 170,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas\n",
"\n",
"data_iris = pandas.read_csv(\"iris.csv\")\n",
"data_iris[:6]\n"
]
},
{
"cell_type": "code",
"execution_count": 171,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"X = [[1. 5.2 3.4 1.4 0.2]\n",
" [1. 5.1 3.7 1.5 0.4]\n",
" [1. 6.7 3.1 5.6 2.4]\n",
" [1. 6.5 3.2 5.1 2. ]]\n",
"y = [['Iris-setosa']\n",
" ['Iris-setosa']\n",
" ['Iris-virginica']\n",
" ['Iris-virginica']]\n"
]
}
],
"source": [
"# Przygotowanie danych\n",
"\n",
"import numpy as np\n",
"\n",
"features = [\"sl\", \"sw\", \"pl\", \"pw\"]\n",
"m = len(data_iris)\n",
"X = np.matrix(data_iris[features])\n",
"X0 = np.ones(m).reshape(m, 1)\n",
"X = np.hstack((X0, X))\n",
"y = np.matrix(data_iris[[\"Gatunek\"]]).reshape(m, 1)\n",
"\n",
"print(\"X = \", X[:4])\n",
"print(\"y = \", y[:4])\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Zamieńmy etykiety tekstowe w tablicy $y$ na wektory jednostkowe (*one-hot vectors*):\n",
"\n",
"$$\n",
"\\begin{array}{ccc}\n",
"\\mbox{\"Iris-setosa\"} & \\mapsto & \\left[ \\begin{array}{ccc} 1 & 0 & 0 \\\\ \\end{array} \\right] \\\\\n",
"\\mbox{\"Iris-virginica\"} & \\mapsto & \\left[ \\begin{array}{ccc} 0 & 1 & 0 \\\\ \\end{array} \\right] \\\\\n",
"\\mbox{\"Iris-versicolor\"} & \\mapsto & \\left[ \\begin{array}{ccc} 0 & 0 & 1 \\\\ \\end{array} \\right] \\\\\n",
"\\end{array}\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Wówczas zamiast wektora $y$ otrzymamy macierz $Y$:\n",
"\n",
"$$\n",
"y \\; = \\;\n",
"\\left[\n",
"\\begin{array}{c}\n",
"y^{(1)} \\\\\n",
"y^{(2)} \\\\\n",
"y^{(3)} \\\\\n",
"y^{(4)} \\\\\n",
"y^{(5)} \\\\\n",
"\\vdots \\\\\n",
"\\end{array}\n",
"\\right]\n",
"\\; = \\;\n",
"\\left[\n",
"\\begin{array}{c}\n",
"\\mbox{\"Iris-setosa\"} \\\\\n",
"\\mbox{\"Iris-setosa\"} \\\\\n",
"\\mbox{\"Iris-virginica\"} \\\\\n",
"\\mbox{\"Iris-versicolor\"} \\\\\n",
"\\mbox{\"Iris-virginica\"} \\\\\n",
"\\vdots \\\\\n",
"\\end{array}\n",
"\\right]\n",
"\\quad \\mapsto \\quad\n",
"Y \\; = \\;\n",
"\\left[\n",
"\\begin{array}{ccc}\n",
"1 & 0 & 0 \\\\\n",
"1 & 0 & 0 \\\\\n",
"0 & 1 & 0 \\\\\n",
"0 & 0 & 1 \\\\\n",
"0 & 1 & 0 \\\\\n",
"\\vdots & \\vdots & \\vdots \\\\\n",
"\\end{array}\n",
"\\right]\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 172,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"def mapY(y, cls):\n",
" m = len(y)\n",
" yBi = np.matrix(np.zeros(m)).reshape(m, 1)\n",
" yBi[y == cls] = 1.0\n",
" return yBi\n",
"\n",
"\n",
"def indicatorMatrix(y):\n",
" classes = np.unique(y.tolist())\n",
" m = len(y)\n",
" k = len(classes)\n",
" Y = np.matrix(np.zeros((m, k)))\n",
" for i, cls in enumerate(classes):\n",
" Y[:, i] = mapY(y, cls)\n",
" return Y\n",
"\n",
"\n",
"# Macierz jednostkowa\n",
"Y = indicatorMatrix(y)\n"
]
},
{
"cell_type": "code",
"execution_count": 173,
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"outputs": [],
"source": [
"# Podział danych na zbiór trenujący i testowy\n",
"XTrain, XTest = X[:100], X[100:]\n",
"YTrain, YTest = Y[:100], Y[100:]\n",
"\n",
"# Macierz parametrów początkowych - niech skłąda się z samych jedynek\n",
"theta_start = np.ones(5).reshape(5, 1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Regresja logistyczna jest metodą rozwiązywania problemów klasyfikacji **dwuklasowej**."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Aby znaleźć rozwiązanie problemu klasyfikacji **wieloklasowej** metodą regresji logistycznej, trzeba przekształcić problem na zbiór problemów klasyfikacji dwuklasowej."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Alternatywnie, można użyć **wielomianowej regresji logistycznej** (zob. https://machinelearningmastery.com/multinomial-logistic-regression-with-python)."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Od regresji logistycznej dwuklasowej do wieloklasowej\n",
"\n",
"* Irysy są przydzielone do trzech klas: _Iris-setosa_ (0), _Iris-versicolor_ (1), _Iris-virginica_ (2).\n",
"* Wiemy, jak stworzyć klasyfikatory dwuklasowe typu _Iris-setosa_ vs. _Nie-Iris-setosa_ (tzw. *one-vs-all*).\n",
"* Możemy stworzyć trzy klasyfikatory $h_{\\theta_1}, h_{\\theta_2}, h_{\\theta_3}$ (otrzymując trzy zestawy parametrów $\\theta$) i wybrać klasę o najwyższym prawdopodobieństwie."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Pomoże nam w tym funkcja *softmax*, która jest uogólnieniem funkcji logistycznej na większą liczbę wymiarów."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"### Funkcja _softmax_\n",
"\n",
"Odpowiednikiem funkcji logistycznej dla wieloklasowej regresji logistycznej jest funkcja $\\mathrm{softmax}$:\n",
"\n",
"$$ \\textrm{softmax} \\colon \\mathbb{R}^k \\to [0,1]^k $$\n",
"\n",
"$$ \\textrm{softmax}(z_1,z_2,\\dots,z_k) = \\left( \\dfrac{e^{z_1}}{\\sum_{i=1}^{k}e^{z_i}}, \\dfrac{e^{z_2}}{\\sum_{i=1}^{k}e^{z_i}}, \\ldots, \\dfrac{e^{z_k}}{\\sum_{i=1}^{k}e^{z_i}} \\right) $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"$$ \\textrm{softmax}( \\left[ \\begin{array}{c} \\theta_1^T x \\\\ \\theta_2^T x \\\\ \\vdots \\\\ \\theta_k^T x \\end{array} \\right] ) = \\left[ \\begin{array}{c} P(y=1 \\, | \\, x;\\theta_1,\\ldots,\\theta_k) \\\\ P(y=2 \\, | \\, x;\\theta_1,\\ldots,\\theta_k) \\\\ \\vdots \\\\ P(y=k \\, | \\, x;\\theta_1,\\ldots,\\theta_k) \\end{array} \\right] $$"
]
},
{
"cell_type": "code",
"execution_count": 174,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"def softmax(X):\n",
" \"\"\"Funkcja softmax (wersja macierzowa)\"\"\"\n",
" return np.exp(X) / np.sum(np.exp(X))\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Wartości funkcji $\\mathrm{softmax}$ sumują się do 1:"
]
},
{
"cell_type": "code",
"execution_count": 175,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.9999999999999999\n"
]
}
],
"source": [
"Z = np.matrix([[2.1, 0.5, 0.8, 0.9, 3.2]])\n",
"P = softmax(Z)\n",
"print(np.sum(P))\n"
]
},
{
"cell_type": "code",
"execution_count": 176,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"def multiple_binary_classifiers(X, Y):\n",
" n = X.shape[1]\n",
" thetas = []\n",
" # Dla każdej klasy wytrenujmy osobny klasyfikator dwuklasowy.\n",
" for c in range(Y.shape[1]):\n",
" YBi = Y[:, c]\n",
" theta = np.matrix(np.random.random(n)).reshape(n, 1)\n",
" # Macierz parametrów theta obliczona dla każdej klasy osobno.\n",
" theta_best, history = GD(h, J, dJ, theta, X, YBi, alpha=0.1, eps=10**-4)\n",
" thetas.append(theta_best)\n",
" return thetas\n"
]
},
{
"cell_type": "code",
"execution_count": 177,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Otrzymana macierz parametrów theta dla klasy 0:\n",
" [[ 0.30877778]\n",
" [-0.16504776]\n",
" [ 1.92701194]\n",
" [-1.83418434]\n",
" [-0.50458444]] \n",
"\n",
"Otrzymana macierz parametrów theta dla klasy 1:\n",
" [[ 0.93723385]\n",
" [-0.13501701]\n",
" [-0.8448612 ]\n",
" [ 0.77823106]\n",
" [-0.95577092]] \n",
"\n",
"Otrzymana macierz parametrów theta dla klasy 2:\n",
" [[-0.72237014]\n",
" [-1.56606505]\n",
" [-1.71063165]\n",
" [ 2.21207268]\n",
" [ 2.78489436]] \n",
"\n"
]
}
],
"source": [
"# Macierze theta dla każdej klasy\n",
"thetas = multiple_binary_classifiers(XTrain, YTrain)\n",
"for c, theta in enumerate(thetas):\n",
" print(f\"Otrzymana macierz parametrów theta dla klasy {c}:\\n\", theta, \"\\n\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"### Funkcja decyzyjna wieloklasowej regresji logistycznej\n",
"\n",
"$$ c = \\mathop{\\textrm{arg}\\,\\textrm{max}}_{i \\in \\{1, \\ldots ,k\\}} P(y=i|x;\\theta_1,\\ldots,\\theta_k) $$"
]
},
{
"cell_type": "code",
"execution_count": 178,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"def classify(thetas, X, debug=False):\n",
" regs = np.array([(X * theta).item() for theta in thetas])\n",
" if debug:\n",
" print(\"Po zastosowaniu regresji: \", regs)\n",
" probs = softmax(regs)\n",
" if debug:\n",
" print(\"Otrzymane prawdopodobieństwa: \", np.around(probs, decimals=3))\n",
" result = np.argmax(probs)\n",
" if debug:\n",
" print(\"Wybrana klasa: \", result)\n",
" return result\n"
]
},
{
"cell_type": "code",
"execution_count": 179,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dla x = [[1. 7.3 2.9 6.3 1.8]]:\n",
"Po zastosowaniu regresji: [-7.77134959 0.68398021 1.83339097]\n",
"Otrzymane prawdopodobieństwa: [0. 0.241 0.759]\n",
"Wybrana klasa: 2\n",
"Obliczone y = 2\n",
"Oczekiwane y = 2\n",
"\n",
"Dla x = [[1. 4.8 3. 1.4 0.3]]:\n",
"Po zastosowaniu regresji: [ 2.57835094 -1.4426392 -9.43900726]\n",
"Otrzymane prawdopodobieństwa: [0.982 0.018 0. ]\n",
"Wybrana klasa: 0\n",
"Obliczone y = 0\n",
"Oczekiwane y = 0\n",
"\n",
"Dla x = [[1. 7.1 3. 5.9 2.1]]:\n",
"Po zastosowaniu regresji: [-6.96334044 0.0284738 1.92618005]\n",
"Otrzymane prawdopodobieństwa: [0. 0.13 0.87]\n",
"Wybrana klasa: 2\n",
"Obliczone y = 2\n",
"Oczekiwane y = 2\n",
"\n",
"Dla x = [[1. 5.9 3. 5.1 1.8]]:\n",
"Po zastosowaniu regresji: [-5.14656032 -0.14535936 1.20033165]\n",
"Otrzymane prawdopodobieństwa: [0.001 0.206 0.792]\n",
"Wybrana klasa: 2\n",
"Obliczone y = 2\n",
"Oczekiwane y = 2\n",
"\n"
]
}
],
"source": [
"for i in range(4):\n",
" print(f\"Dla x = {XTest[i]}:\")\n",
" YPredicted = classify(thetas, XTest[i], debug=True)\n",
" print(f\"Obliczone y = {YPredicted}\")\n",
" print(f\"Oczekiwane y = {np.argmax(YTest[i])}\")\n",
" print()\n"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.6"
},
"livereveal": {
"start_slideshow_at": "selected",
"theme": "white"
},
"vscode": {
"interpreter": {
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}