2670 lines
122 KiB
Plaintext
2670 lines
122 KiB
Plaintext
{
|
||
"cells": [
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 35,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.107372Z",
|
||
"start_time": "2021-03-22T05:32:53.400242Z"
|
||
},
|
||
"tags": [
|
||
"remove_output"
|
||
]
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"import seaborn as sns\n",
|
||
"import matplotlib.pyplot as plt\n",
|
||
"import numpy as np\n",
|
||
"from tqdm.autonotebook import tqdm\n",
|
||
"import pandas as pd"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 36,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.114216Z",
|
||
"start_time": "2021-03-22T05:32:54.109474Z"
|
||
},
|
||
"tags": [
|
||
"remove_cell"
|
||
]
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"%matplotlib inline\n",
|
||
"import matplotlib_inline\n",
|
||
"matplotlib_inline.backend_inline.set_matplotlib_formats('svg')"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 37,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.669963Z",
|
||
"start_time": "2021-03-22T05:32:54.116147Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"import torch"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 38,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.676062Z",
|
||
"start_time": "2021-03-22T05:32:54.671481Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"torch_scalar = torch.tensor(3.14)\n",
|
||
"torch_vector = torch.tensor([1, 2, 3, 4])\n",
|
||
"torch_matrix = torch.tensor([[1, 2,],\n",
|
||
" [3, 4,],\n",
|
||
" [5, 6,], \n",
|
||
" [7, 8,]])\n",
|
||
"#You don't have to format it like I did, thats just for clarity\n",
|
||
"torch_tensor3d = torch.tensor([\n",
|
||
" [\n",
|
||
" [ 1, 2, 3], \n",
|
||
" [ 4, 5, 6],\n",
|
||
" ],\n",
|
||
" [\n",
|
||
" [ 7, 8, 9], \n",
|
||
" [10, 11, 12],\n",
|
||
" ],\n",
|
||
" [\n",
|
||
" [13, 14, 15], \n",
|
||
" [16, 17, 18],\n",
|
||
" ],\n",
|
||
" [\n",
|
||
" [19, 20, 21], \n",
|
||
" [22, 23, 24],\n",
|
||
" ]\n",
|
||
" ])"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 39,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.688664Z",
|
||
"start_time": "2021-03-22T05:32:54.677220Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"torch.Size([])\n",
|
||
"torch.Size([4])\n",
|
||
"torch.Size([4, 2])\n",
|
||
"torch.Size([4, 2, 3])\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"print(torch_scalar.shape)\n",
|
||
"print(torch_vector.shape)\n",
|
||
"print(torch_matrix.shape)\n",
|
||
"print(torch_tensor3d.shape)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 40,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.694456Z",
|
||
"start_time": "2021-03-22T05:32:54.690164Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"[[0.13200003 0.0054197 0.24716025 0.08458665]\n",
|
||
" [0.51738806 0.517676 0.33316974 0.07034239]\n",
|
||
" [0.53272871 0.51833686 0.73074206 0.82302625]\n",
|
||
" [0.37334327 0.59914251 0.82853404 0.51186258]]\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"x_np = np.random.random((4,4))\n",
|
||
"print(x_np)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 41,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.701736Z",
|
||
"start_time": "2021-03-22T05:32:54.697048Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([[0.1320, 0.0054, 0.2472, 0.0846],\n",
|
||
" [0.5174, 0.5177, 0.3332, 0.0703],\n",
|
||
" [0.5327, 0.5183, 0.7307, 0.8230],\n",
|
||
" [0.3733, 0.5991, 0.8285, 0.5119]], dtype=torch.float64)\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"x_pt = torch.tensor(x_np)\n",
|
||
"print(x_pt)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 42,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.708524Z",
|
||
"start_time": "2021-03-22T05:32:54.703648Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"float64 torch.float64\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"print(x_np.dtype, x_pt.dtype)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 43,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.715713Z",
|
||
"start_time": "2021-03-22T05:32:54.710165Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"float32 torch.float32\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"#Lets force them to be 32-bit floats\n",
|
||
"x_np = np.asarray(x_np, dtype=np.float32)\n",
|
||
"x_pt = torch.tensor(x_np, dtype=torch.float32)\n",
|
||
"print(x_np.dtype, x_pt.dtype)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 44,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.722368Z",
|
||
"start_time": "2021-03-22T05:32:54.717373Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"[[False False False False]\n",
|
||
" [ True True False False]\n",
|
||
" [ True True True True]\n",
|
||
" [False True True True]]\n",
|
||
"bool\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"b_np = (x_np > 0.5)\n",
|
||
"print(b_np)\n",
|
||
"print(b_np.dtype)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 45,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.729593Z",
|
||
"start_time": "2021-03-22T05:32:54.724132Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([[False, False, False, False],\n",
|
||
" [ True, True, False, False],\n",
|
||
" [ True, True, True, True],\n",
|
||
" [False, True, True, True]])\n",
|
||
"torch.bool\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"b_pt = (x_pt > 0.5)\n",
|
||
"print(b_pt)\n",
|
||
"print(b_pt.dtype)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 46,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.737835Z",
|
||
"start_time": "2021-03-22T05:32:54.730952Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"np.float32(6.8254595)"
|
||
]
|
||
},
|
||
"execution_count": 46,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"np.sum(x_np)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 47,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.743037Z",
|
||
"start_time": "2021-03-22T05:32:54.739198Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"tensor(6.8255)"
|
||
]
|
||
},
|
||
"execution_count": 47,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"torch.sum(x_pt)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 48,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.747879Z",
|
||
"start_time": "2021-03-22T05:32:54.744383Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"array([[0.13200003, 0.51738805, 0.53272873, 0.37334326],\n",
|
||
" [0.0054197 , 0.517676 , 0.5183369 , 0.5991425 ],\n",
|
||
" [0.24716026, 0.33316973, 0.73074204, 0.82853407],\n",
|
||
" [0.08458665, 0.07034239, 0.82302624, 0.5118626 ]], dtype=float32)"
|
||
]
|
||
},
|
||
"execution_count": 48,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"np.transpose(x_np)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 49,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.755058Z",
|
||
"start_time": "2021-03-22T05:32:54.749723Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"tensor([[0.1320, 0.5174, 0.5327, 0.3733],\n",
|
||
" [0.0054, 0.5177, 0.5183, 0.5991],\n",
|
||
" [0.2472, 0.3332, 0.7307, 0.8285],\n",
|
||
" [0.0846, 0.0703, 0.8230, 0.5119]])"
|
||
]
|
||
},
|
||
"execution_count": 49,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"torch.transpose(x_pt, 0, 1)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 50,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:54.763796Z",
|
||
"start_time": "2021-03-22T05:32:54.756945Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"torch.Size([3, 2, 4])\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"print(torch.transpose(torch_tensor3d, 0, 2).shape)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 51,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:59.532902Z",
|
||
"start_time": "2021-03-22T05:32:54.765163Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"import timeit\n",
|
||
"x = torch.rand(2**11, 2**11)\n",
|
||
"time_cpu = timeit.timeit(\"x@x\", globals=globals(), number=100)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 52,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:32:59.578188Z",
|
||
"start_time": "2021-03-22T05:32:59.539627Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"Is CUDA available? : True\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"print(\"Is CUDA available? :\", torch.cuda.is_available())\n",
|
||
"device = torch.device(\"cuda\")"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 53,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:01.740576Z",
|
||
"start_time": "2021-03-22T05:32:59.580308Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"x = x.to(device)\n",
|
||
"time_gpu = timeit.timeit(\"x@x\", globals=globals(), number=100)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 54,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:01.957208Z",
|
||
"start_time": "2021-03-22T05:33:01.750393Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"[tensor(1), tensor(2)]\n",
|
||
"[tensor(1, device='cuda:0'), tensor(2, device='cuda:0')]\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"def moveTo(obj, device):\n",
|
||
" \"\"\"\n",
|
||
" obj: the python object to move to a device, or to move its contents to a device\n",
|
||
" device: the compute device to move objects to\n",
|
||
" \"\"\"\n",
|
||
" if isinstance(obj, list):\n",
|
||
" return [moveTo(x, device) for x in obj]\n",
|
||
" elif isinstance(obj, tuple):\n",
|
||
" return tuple(moveTo(list(obj), device))\n",
|
||
" elif isinstance(obj, set):\n",
|
||
" return set(moveTo(list(obj), device))\n",
|
||
" elif isinstance(obj, dict):\n",
|
||
" to_ret = dict()\n",
|
||
" for key, value in obj.items():\n",
|
||
" to_ret[moveTo(key, device)] = moveTo(value, device)\n",
|
||
" return to_ret\n",
|
||
" elif hasattr(obj, \"to\"):\n",
|
||
" return obj.to(device)\n",
|
||
" else:\n",
|
||
" return obj\n",
|
||
" \n",
|
||
"some_tensors = [torch.tensor(1), torch.tensor(2)]\n",
|
||
"print(some_tensors)\n",
|
||
"print(moveTo(some_tensors, device))"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 55,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.498610Z",
|
||
"start_time": "2021-03-22T05:33:01.960934Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"<Axes: >"
|
||
]
|
||
},
|
||
"execution_count": 55,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
},
|
||
{
|
||
"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=\"391.245pt\" height=\"297.190125pt\" viewBox=\"0 0 391.245 297.190125\" 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>2026-01-13T20:15:58.092532</dc:date>\n",
|
||
" <dc:format>image/svg+xml</dc:format>\n",
|
||
" <dc:creator>\n",
|
||
" <cc:Agent>\n",
|
||
" <dc:title>Matplotlib v3.10.7, 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 297.190125 \n",
|
||
"L 391.245 297.190125 \n",
|
||
"L 391.245 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 26.925 273.312 \n",
|
||
"L 384.045 273.312 \n",
|
||
"L 384.045 7.2 \n",
|
||
"L 26.925 7.2 \n",
|
||
"z\n",
|
||
"\" style=\"fill: #ffffff\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"FillBetweenPolyCollection_1\"/>\n",
|
||
" <g id=\"matplotlib.axis_1\">\n",
|
||
" <g id=\"xtick_1\">\n",
|
||
" <g id=\"line2d_1\">\n",
|
||
" <defs>\n",
|
||
" <path id=\"ma0e1805e84\" 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=\"#ma0e1805e84\" x=\"63.448636\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_1\">\n",
|
||
" <!-- −6 -->\n",
|
||
" <g transform=\"translate(56.077543 287.910437) 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-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-2212\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-36\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_2\">\n",
|
||
" <g id=\"line2d_2\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"104.030455\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_2\">\n",
|
||
" <!-- −4 -->\n",
|
||
" <g transform=\"translate(96.659361 287.910437) 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-2212\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_3\">\n",
|
||
" <g id=\"line2d_3\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"144.612273\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_3\">\n",
|
||
" <!-- −2 -->\n",
|
||
" <g transform=\"translate(137.241179 287.910437) 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\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_4\">\n",
|
||
" <g id=\"line2d_4\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"185.194091\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_4\">\n",
|
||
" <!-- 0 -->\n",
|
||
" <g transform=\"translate(182.012841 287.910437) 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_5\">\n",
|
||
" <g id=\"line2d_5\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"225.775909\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_5\">\n",
|
||
" <!-- 2 -->\n",
|
||
" <g transform=\"translate(222.594659 287.910437) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_6\">\n",
|
||
" <g id=\"line2d_6\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"266.357727\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_6\">\n",
|
||
" <!-- 4 -->\n",
|
||
" <g transform=\"translate(263.176477 287.910437) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_7\">\n",
|
||
" <g id=\"line2d_7\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#ma0e1805e84\" x=\"306.939545\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_7\">\n",
|
||
" <!-- 6 -->\n",
|
||
" <g transform=\"translate(303.758295 287.910437) scale(0.1 -0.1)\">\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=\"#ma0e1805e84\" x=\"347.521364\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_8\">\n",
|
||
" <!-- 8 -->\n",
|
||
" <g transform=\"translate(344.340114 287.910437) 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-38\"/>\n",
|
||
" </g>\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=\"m896a207479\" 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=\"#m896a207479\" x=\"26.925\" y=\"261.223619\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_9\">\n",
|
||
" <!-- 0 -->\n",
|
||
" <g transform=\"translate(13.5625 265.022837) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_2\">\n",
|
||
" <g id=\"line2d_10\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"231.356011\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_10\">\n",
|
||
" <!-- 10 -->\n",
|
||
" <g transform=\"translate(7.2 235.15523) 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-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_3\">\n",
|
||
" <g id=\"line2d_11\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"201.488404\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_11\">\n",
|
||
" <!-- 20 -->\n",
|
||
" <g transform=\"translate(7.2 205.287623) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_4\">\n",
|
||
" <g id=\"line2d_12\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"171.620797\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_12\">\n",
|
||
" <!-- 30 -->\n",
|
||
" <g transform=\"translate(7.2 175.420016) 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",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_5\">\n",
|
||
" <g id=\"line2d_13\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"141.75319\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_13\">\n",
|
||
" <!-- 40 -->\n",
|
||
" <g transform=\"translate(7.2 145.552408) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_6\">\n",
|
||
" <g id=\"line2d_14\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"111.885582\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_14\">\n",
|
||
" <!-- 50 -->\n",
|
||
" <g transform=\"translate(7.2 115.684801) 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",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_7\">\n",
|
||
" <g id=\"line2d_15\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"82.017975\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_15\">\n",
|
||
" <!-- 60 -->\n",
|
||
" <g transform=\"translate(7.2 85.817194) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_8\">\n",
|
||
" <g id=\"line2d_16\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"52.150368\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_16\">\n",
|
||
" <!-- 70 -->\n",
|
||
" <g transform=\"translate(7.2 55.949587) 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",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_9\">\n",
|
||
" <g id=\"line2d_17\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m896a207479\" x=\"26.925\" y=\"22.282761\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_17\">\n",
|
||
" <!-- 80 -->\n",
|
||
" <g transform=\"translate(7.2 26.081979) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-38\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_18\">\n",
|
||
" <path d=\"M 43.157727 19.296 \n",
|
||
"L 46.437066 27.906745 \n",
|
||
"L 49.716405 36.361463 \n",
|
||
"L 52.995744 44.660153 \n",
|
||
"L 56.275083 52.802817 \n",
|
||
"L 59.554421 60.789454 \n",
|
||
"L 62.83376 68.620063 \n",
|
||
"L 66.113099 76.294646 \n",
|
||
"L 69.392438 83.813201 \n",
|
||
"L 72.671777 91.175729 \n",
|
||
"L 75.951116 98.38223 \n",
|
||
"L 79.230455 105.432704 \n",
|
||
"L 82.509793 112.327151 \n",
|
||
"L 85.789132 119.065571 \n",
|
||
"L 89.068471 125.647964 \n",
|
||
"L 92.34781 132.07433 \n",
|
||
"L 95.627149 138.344668 \n",
|
||
"L 98.906488 144.45898 \n",
|
||
"L 102.185826 150.417264 \n",
|
||
"L 105.465165 156.219521 \n",
|
||
"L 108.744504 161.865752 \n",
|
||
"L 112.023843 167.355955 \n",
|
||
"L 115.303182 172.690131 \n",
|
||
"L 118.582521 177.86828 \n",
|
||
"L 121.86186 182.890402 \n",
|
||
"L 125.141198 187.756497 \n",
|
||
"L 128.420537 192.466564 \n",
|
||
"L 131.699876 197.020605 \n",
|
||
"L 134.979215 201.418619 \n",
|
||
"L 138.258554 205.660605 \n",
|
||
"L 141.537893 209.746564 \n",
|
||
"L 144.817231 213.676497 \n",
|
||
"L 148.09657 217.450402 \n",
|
||
"L 151.375909 221.06828 \n",
|
||
"L 154.655248 224.530131 \n",
|
||
"L 157.934587 227.835955 \n",
|
||
"L 161.213926 230.985752 \n",
|
||
"L 164.493264 233.979521 \n",
|
||
"L 167.772603 236.817264 \n",
|
||
"L 171.051942 239.49898 \n",
|
||
"L 174.331281 242.024668 \n",
|
||
"L 177.61062 244.39433 \n",
|
||
"L 180.889959 246.607964 \n",
|
||
"L 184.169298 248.665571 \n",
|
||
"L 187.448636 250.567151 \n",
|
||
"L 190.727975 252.312704 \n",
|
||
"L 194.007314 253.90223 \n",
|
||
"L 197.286653 255.335729 \n",
|
||
"L 200.565992 256.613201 \n",
|
||
"L 203.845331 257.734646 \n",
|
||
"L 207.124669 258.700063 \n",
|
||
"L 210.404008 259.509454 \n",
|
||
"L 213.683347 260.162817 \n",
|
||
"L 216.962686 260.660153 \n",
|
||
"L 220.242025 261.001463 \n",
|
||
"L 223.521364 261.186745 \n",
|
||
"L 226.800702 261.216 \n",
|
||
"L 230.080041 261.089228 \n",
|
||
"L 233.35938 260.806429 \n",
|
||
"L 236.638719 260.367603 \n",
|
||
"L 239.918058 259.772749 \n",
|
||
"L 243.197397 259.021869 \n",
|
||
"L 246.476736 258.114962 \n",
|
||
"L 249.756074 257.052027 \n",
|
||
"L 253.035413 255.833065 \n",
|
||
"L 256.314752 254.458077 \n",
|
||
"L 259.594091 252.927061 \n",
|
||
"L 262.87343 251.240018 \n",
|
||
"L 266.152769 249.396948 \n",
|
||
"L 269.432107 247.397851 \n",
|
||
"L 272.711446 245.242727 \n",
|
||
"L 275.990785 242.931576 \n",
|
||
"L 279.270124 240.464397 \n",
|
||
"L 282.549463 237.841192 \n",
|
||
"L 285.828802 235.061959 \n",
|
||
"L 289.10814 232.1267 \n",
|
||
"L 292.387479 229.035413 \n",
|
||
"L 295.666818 225.788099 \n",
|
||
"L 298.946157 222.384758 \n",
|
||
"L 302.225496 218.825391 \n",
|
||
"L 305.504835 215.109995 \n",
|
||
"L 308.784174 211.238573 \n",
|
||
"L 312.063512 207.211124 \n",
|
||
"L 315.342851 203.027648 \n",
|
||
"L 318.62219 198.688144 \n",
|
||
"L 321.901529 194.192614 \n",
|
||
"L 325.180868 189.541056 \n",
|
||
"L 328.460207 184.733472 \n",
|
||
"L 331.739545 179.76986 \n",
|
||
"L 335.018884 174.650221 \n",
|
||
"L 338.298223 169.374555 \n",
|
||
"L 341.577562 163.942862 \n",
|
||
"L 344.856901 158.355142 \n",
|
||
"L 348.13624 152.611395 \n",
|
||
"L 351.415579 146.711621 \n",
|
||
"L 354.694917 140.655819 \n",
|
||
"L 357.974256 134.443991 \n",
|
||
"L 361.253595 128.076135 \n",
|
||
"L 364.532934 121.552253 \n",
|
||
"L 367.812273 114.872343 \n",
|
||
"\" clip-path=\"url(#p674c4daeaf)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"patch_3\">\n",
|
||
" <path d=\"M 26.925 273.312 \n",
|
||
"L 26.925 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 384.045 273.312 \n",
|
||
"L 384.045 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 26.925 273.312 \n",
|
||
"L 384.045 273.312 \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 26.925 7.2 \n",
|
||
"L 384.045 7.2 \n",
|
||
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"legend_1\">\n",
|
||
" <g id=\"patch_7\">\n",
|
||
" <path d=\"M 278.345 30.7 \n",
|
||
"L 377.045 30.7 \n",
|
||
"Q 379.045 30.7 379.045 28.7 \n",
|
||
"L 379.045 14.2 \n",
|
||
"Q 379.045 12.2 377.045 12.2 \n",
|
||
"L 278.345 12.2 \n",
|
||
"Q 276.345 12.2 276.345 14.2 \n",
|
||
"L 276.345 28.7 \n",
|
||
"Q 276.345 30.7 278.345 30.7 \n",
|
||
"z\n",
|
||
"\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_19\">\n",
|
||
" <path d=\"M 280.345 21.120312 \n",
|
||
"L 290.345 21.120312 \n",
|
||
"L 300.345 21.120312 \n",
|
||
"\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_18\">\n",
|
||
" <!-- $f(x)=(x-2)^2$ -->\n",
|
||
" <g transform=\"translate(308.345 24.620312) scale(0.1 -0.1)\">\n",
|
||
" <defs>\n",
|
||
" <path id=\"DejaVuSans-Oblique-66\" d=\"M 3059 4863 \n",
|
||
"L 2969 4384 \n",
|
||
"L 2419 4384 \n",
|
||
"Q 2106 4384 1964 4261 \n",
|
||
"Q 1822 4138 1753 3809 \n",
|
||
"L 1691 3500 \n",
|
||
"L 2638 3500 \n",
|
||
"L 2553 3053 \n",
|
||
"L 1606 3053 \n",
|
||
"L 1013 0 \n",
|
||
"L 434 0 \n",
|
||
"L 1031 3053 \n",
|
||
"L 481 3053 \n",
|
||
"L 563 3500 \n",
|
||
"L 1113 3500 \n",
|
||
"L 1159 3744 \n",
|
||
"Q 1278 4363 1576 4613 \n",
|
||
"Q 1875 4863 2516 4863 \n",
|
||
"L 3059 4863 \n",
|
||
"z\n",
|
||
"\" transform=\"scale(0.015625)\"/>\n",
|
||
" <path id=\"DejaVuSans-28\" d=\"M 1984 4856 \n",
|
||
"Q 1566 4138 1362 3434 \n",
|
||
"Q 1159 2731 1159 2009 \n",
|
||
"Q 1159 1288 1364 580 \n",
|
||
"Q 1569 -128 1984 -844 \n",
|
||
"L 1484 -844 \n",
|
||
"Q 1016 -109 783 600 \n",
|
||
"Q 550 1309 550 2009 \n",
|
||
"Q 550 2706 781 3412 \n",
|
||
"Q 1013 4119 1484 4856 \n",
|
||
"L 1984 4856 \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",
|
||
" <path id=\"DejaVuSans-29\" d=\"M 513 4856 \n",
|
||
"L 1013 4856 \n",
|
||
"Q 1481 4119 1714 3412 \n",
|
||
"Q 1947 2706 1947 2009 \n",
|
||
"Q 1947 1309 1714 600 \n",
|
||
"Q 1481 -109 1013 -844 \n",
|
||
"L 513 -844 \n",
|
||
"Q 928 -128 1133 580 \n",
|
||
"Q 1338 1288 1338 2009 \n",
|
||
"Q 1338 2731 1133 3434 \n",
|
||
"Q 928 4138 513 4856 \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",
|
||
" </defs>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-66\" transform=\"translate(0 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-28\" transform=\"translate(35.205078 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(74.21875 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-29\" transform=\"translate(133.398438 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(191.894531 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-28\" transform=\"translate(295.166016 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(334.179688 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-2212\" transform=\"translate(412.841797 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(516.113281 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-29\" transform=\"translate(579.736328 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(619.707031 39.046875) scale(0.7)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <defs>\n",
|
||
" <clipPath id=\"p674c4daeaf\">\n",
|
||
" <rect x=\"26.925\" y=\"7.2\" width=\"357.12\" height=\"266.112\"/>\n",
|
||
" </clipPath>\n",
|
||
" </defs>\n",
|
||
"</svg>\n"
|
||
],
|
||
"text/plain": [
|
||
"<Figure size 640x480 with 1 Axes>"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
}
|
||
],
|
||
"source": [
|
||
"def f(x):\n",
|
||
" return torch.pow((x-2.0), 2)\n",
|
||
"\n",
|
||
"x_axis_vals = np.linspace(-7,9,100) \n",
|
||
"y_axis_vals = f(torch.tensor(x_axis_vals)).numpy()\n",
|
||
"\n",
|
||
"sns.lineplot(x=x_axis_vals, y=y_axis_vals, label='$f(x)=(x-2)^2$')"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 56,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.866511Z",
|
||
"start_time": "2021-03-22T05:33:02.501436Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"<Axes: >"
|
||
]
|
||
},
|
||
"execution_count": 56,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
},
|
||
{
|
||
"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=\"399.624687pt\" height=\"297.190125pt\" viewBox=\"0 0 399.624687 297.190125\" 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>2026-01-13T20:15:58.198134</dc:date>\n",
|
||
" <dc:format>image/svg+xml</dc:format>\n",
|
||
" <dc:creator>\n",
|
||
" <cc:Agent>\n",
|
||
" <dc:title>Matplotlib v3.10.7, 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 297.190125 \n",
|
||
"L 399.624687 297.190125 \n",
|
||
"L 399.624687 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 35.304688 273.312 \n",
|
||
"L 392.424688 273.312 \n",
|
||
"L 392.424688 7.2 \n",
|
||
"L 35.304688 7.2 \n",
|
||
"z\n",
|
||
"\" style=\"fill: #ffffff\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"FillBetweenPolyCollection_1\"/>\n",
|
||
" <g id=\"FillBetweenPolyCollection_2\"/>\n",
|
||
" <g id=\"FillBetweenPolyCollection_3\"/>\n",
|
||
" <g id=\"matplotlib.axis_1\">\n",
|
||
" <g id=\"xtick_1\">\n",
|
||
" <g id=\"line2d_1\">\n",
|
||
" <defs>\n",
|
||
" <path id=\"mc8e19cfe9e\" 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=\"#mc8e19cfe9e\" x=\"71.828324\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_1\">\n",
|
||
" <!-- −6 -->\n",
|
||
" <g transform=\"translate(64.45723 287.910437) 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-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-2212\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-36\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_2\">\n",
|
||
" <g id=\"line2d_2\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"112.410142\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_2\">\n",
|
||
" <!-- −4 -->\n",
|
||
" <g transform=\"translate(105.039048 287.910437) 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-2212\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_3\">\n",
|
||
" <g id=\"line2d_3\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"152.99196\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_3\">\n",
|
||
" <!-- −2 -->\n",
|
||
" <g transform=\"translate(145.620866 287.910437) 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\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_4\">\n",
|
||
" <g id=\"line2d_4\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"193.573778\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_4\">\n",
|
||
" <!-- 0 -->\n",
|
||
" <g transform=\"translate(190.392528 287.910437) 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_5\">\n",
|
||
" <g id=\"line2d_5\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"234.155597\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_5\">\n",
|
||
" <!-- 2 -->\n",
|
||
" <g transform=\"translate(230.974347 287.910437) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_6\">\n",
|
||
" <g id=\"line2d_6\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"274.737415\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_6\">\n",
|
||
" <!-- 4 -->\n",
|
||
" <g transform=\"translate(271.556165 287.910437) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"xtick_7\">\n",
|
||
" <g id=\"line2d_7\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#mc8e19cfe9e\" x=\"315.319233\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_7\">\n",
|
||
" <!-- 6 -->\n",
|
||
" <g transform=\"translate(312.137983 287.910437) scale(0.1 -0.1)\">\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=\"#mc8e19cfe9e\" x=\"355.901051\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_8\">\n",
|
||
" <!-- 8 -->\n",
|
||
" <g transform=\"translate(352.719801 287.910437) 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-38\"/>\n",
|
||
" </g>\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=\"m0577ed6c04\" 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=\"#m0577ed6c04\" x=\"35.304688\" y=\"266.103273\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_9\">\n",
|
||
" <!-- −20 -->\n",
|
||
" <g transform=\"translate(7.2 269.902491) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-2212\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(83.789062 0)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(147.412109 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_2\">\n",
|
||
" <g id=\"line2d_10\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m0577ed6c04\" x=\"35.304688\" y=\"217.230545\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_10\">\n",
|
||
" <!-- 0 -->\n",
|
||
" <g transform=\"translate(21.942187 221.029764) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_3\">\n",
|
||
" <g id=\"line2d_11\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m0577ed6c04\" x=\"35.304688\" y=\"168.357818\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_11\">\n",
|
||
" <!-- 20 -->\n",
|
||
" <g transform=\"translate(15.579687 172.157037) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_4\">\n",
|
||
" <g id=\"line2d_12\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m0577ed6c04\" x=\"35.304688\" y=\"119.485091\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_12\">\n",
|
||
" <!-- 40 -->\n",
|
||
" <g transform=\"translate(15.579687 123.28431) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_5\">\n",
|
||
" <g id=\"line2d_13\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m0577ed6c04\" x=\"35.304688\" y=\"70.612364\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_13\">\n",
|
||
" <!-- 60 -->\n",
|
||
" <g transform=\"translate(15.579687 74.411582) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"ytick_6\">\n",
|
||
" <g id=\"line2d_14\">\n",
|
||
" <g>\n",
|
||
" <use xlink:href=\"#m0577ed6c04\" x=\"35.304688\" y=\"21.739636\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_14\">\n",
|
||
" <!-- 80 -->\n",
|
||
" <g transform=\"translate(15.579687 25.538855) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-38\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\" transform=\"translate(63.623047 0)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_15\">\n",
|
||
" <path d=\"M 51.537415 217.230545 \n",
|
||
"L 54.816754 217.230545 \n",
|
||
"L 58.096092 217.230545 \n",
|
||
"L 61.375431 217.230545 \n",
|
||
"L 64.65477 217.230545 \n",
|
||
"L 67.934109 217.230545 \n",
|
||
"L 71.213448 217.230545 \n",
|
||
"L 74.492787 217.230545 \n",
|
||
"L 77.772126 217.230545 \n",
|
||
"L 81.051464 217.230545 \n",
|
||
"L 84.330803 217.230545 \n",
|
||
"L 87.610142 217.230545 \n",
|
||
"L 90.889481 217.230545 \n",
|
||
"L 94.16882 217.230545 \n",
|
||
"L 97.448159 217.230545 \n",
|
||
"L 100.727497 217.230545 \n",
|
||
"L 104.006836 217.230545 \n",
|
||
"L 107.286175 217.230545 \n",
|
||
"L 110.565514 217.230545 \n",
|
||
"L 113.844853 217.230545 \n",
|
||
"L 117.124192 217.230545 \n",
|
||
"L 120.40353 217.230545 \n",
|
||
"L 123.682869 217.230545 \n",
|
||
"L 126.962208 217.230545 \n",
|
||
"L 130.241547 217.230545 \n",
|
||
"L 133.520886 217.230545 \n",
|
||
"L 136.800225 217.230545 \n",
|
||
"L 140.079564 217.230545 \n",
|
||
"L 143.358902 217.230545 \n",
|
||
"L 146.638241 217.230545 \n",
|
||
"L 149.91758 217.230545 \n",
|
||
"L 153.196919 217.230545 \n",
|
||
"L 156.476258 217.230545 \n",
|
||
"L 159.755597 217.230545 \n",
|
||
"L 163.034935 217.230545 \n",
|
||
"L 166.314274 217.230545 \n",
|
||
"L 169.593613 217.230545 \n",
|
||
"L 172.872952 217.230545 \n",
|
||
"L 176.152291 217.230545 \n",
|
||
"L 179.43163 217.230545 \n",
|
||
"L 182.710968 217.230545 \n",
|
||
"L 185.990307 217.230545 \n",
|
||
"L 189.269646 217.230545 \n",
|
||
"L 192.548985 217.230545 \n",
|
||
"L 195.828324 217.230545 \n",
|
||
"L 199.107663 217.230545 \n",
|
||
"L 202.387002 217.230545 \n",
|
||
"L 205.66634 217.230545 \n",
|
||
"L 208.945679 217.230545 \n",
|
||
"L 212.225018 217.230545 \n",
|
||
"L 215.504357 217.230545 \n",
|
||
"L 218.783696 217.230545 \n",
|
||
"L 222.063035 217.230545 \n",
|
||
"L 225.342373 217.230545 \n",
|
||
"L 228.621712 217.230545 \n",
|
||
"L 231.901051 217.230545 \n",
|
||
"L 235.18039 217.230545 \n",
|
||
"L 238.459729 217.230545 \n",
|
||
"L 241.739068 217.230545 \n",
|
||
"L 245.018407 217.230545 \n",
|
||
"L 248.297745 217.230545 \n",
|
||
"L 251.577084 217.230545 \n",
|
||
"L 254.856423 217.230545 \n",
|
||
"L 258.135762 217.230545 \n",
|
||
"L 261.415101 217.230545 \n",
|
||
"L 264.69444 217.230545 \n",
|
||
"L 267.973778 217.230545 \n",
|
||
"L 271.253117 217.230545 \n",
|
||
"L 274.532456 217.230545 \n",
|
||
"L 277.811795 217.230545 \n",
|
||
"L 281.091134 217.230545 \n",
|
||
"L 284.370473 217.230545 \n",
|
||
"L 287.649811 217.230545 \n",
|
||
"L 290.92915 217.230545 \n",
|
||
"L 294.208489 217.230545 \n",
|
||
"L 297.487828 217.230545 \n",
|
||
"L 300.767167 217.230545 \n",
|
||
"L 304.046506 217.230545 \n",
|
||
"L 307.325845 217.230545 \n",
|
||
"L 310.605183 217.230545 \n",
|
||
"L 313.884522 217.230545 \n",
|
||
"L 317.163861 217.230545 \n",
|
||
"L 320.4432 217.230545 \n",
|
||
"L 323.722539 217.230545 \n",
|
||
"L 327.001878 217.230545 \n",
|
||
"L 330.281216 217.230545 \n",
|
||
"L 333.560555 217.230545 \n",
|
||
"L 336.839894 217.230545 \n",
|
||
"L 340.119233 217.230545 \n",
|
||
"L 343.398572 217.230545 \n",
|
||
"L 346.677911 217.230545 \n",
|
||
"L 349.957249 217.230545 \n",
|
||
"L 353.236588 217.230545 \n",
|
||
"L 356.515927 217.230545 \n",
|
||
"L 359.795266 217.230545 \n",
|
||
"L 363.074605 217.230545 \n",
|
||
"L 366.353944 217.230545 \n",
|
||
"L 369.633283 217.230545 \n",
|
||
"L 372.912621 217.230545 \n",
|
||
"L 376.19196 217.230545 \n",
|
||
"\" clip-path=\"url(#p1e332790a2)\" style=\"fill: none; stroke: #000000; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_16\">\n",
|
||
" <path d=\"M 51.537415 19.296 \n",
|
||
"L 54.816754 26.340933 \n",
|
||
"L 58.096092 33.258212 \n",
|
||
"L 61.375431 40.047836 \n",
|
||
"L 64.65477 46.709805 \n",
|
||
"L 67.934109 53.24412 \n",
|
||
"L 71.213448 59.650781 \n",
|
||
"L 74.492787 65.929787 \n",
|
||
"L 77.772126 72.081138 \n",
|
||
"L 81.051464 78.104835 \n",
|
||
"L 84.330803 84.000878 \n",
|
||
"L 87.610142 89.769266 \n",
|
||
"L 90.889481 95.409999 \n",
|
||
"L 94.16882 100.923078 \n",
|
||
"L 97.448159 106.308503 \n",
|
||
"L 100.727497 111.566273 \n",
|
||
"L 104.006836 116.696388 \n",
|
||
"L 107.286175 121.698849 \n",
|
||
"L 110.565514 126.573656 \n",
|
||
"L 113.844853 131.320808 \n",
|
||
"L 117.124192 135.940305 \n",
|
||
"L 120.40353 140.432148 \n",
|
||
"L 123.682869 144.796337 \n",
|
||
"L 126.962208 149.032871 \n",
|
||
"L 130.241547 153.14175 \n",
|
||
"L 133.520886 157.122975 \n",
|
||
"L 136.800225 160.976545 \n",
|
||
"L 140.079564 164.702461 \n",
|
||
"L 143.358902 168.300723 \n",
|
||
"L 146.638241 171.77133 \n",
|
||
"L 149.91758 175.114282 \n",
|
||
"L 153.196919 178.32958 \n",
|
||
"L 156.476258 181.417223 \n",
|
||
"L 159.755597 184.377212 \n",
|
||
"L 163.034935 187.209546 \n",
|
||
"L 166.314274 189.914226 \n",
|
||
"L 169.593613 192.491252 \n",
|
||
"L 172.872952 194.940623 \n",
|
||
"L 176.152291 197.262339 \n",
|
||
"L 179.43163 199.456401 \n",
|
||
"L 182.710968 201.522808 \n",
|
||
"L 185.990307 203.461561 \n",
|
||
"L 189.269646 205.272659 \n",
|
||
"L 192.548985 206.956103 \n",
|
||
"L 195.828324 208.511892 \n",
|
||
"L 199.107663 209.940027 \n",
|
||
"L 202.387002 211.240507 \n",
|
||
"L 205.66634 212.413333 \n",
|
||
"L 208.945679 213.458504 \n",
|
||
"L 212.225018 214.376021 \n",
|
||
"L 215.504357 215.165883 \n",
|
||
"L 218.783696 215.828091 \n",
|
||
"L 222.063035 216.362644 \n",
|
||
"L 225.342373 216.769543 \n",
|
||
"L 228.621712 217.048787 \n",
|
||
"L 231.901051 217.200377 \n",
|
||
"L 235.18039 217.224312 \n",
|
||
"L 238.459729 217.120593 \n",
|
||
"L 241.739068 216.889219 \n",
|
||
"L 245.018407 216.530191 \n",
|
||
"L 248.297745 216.043508 \n",
|
||
"L 251.577084 215.429171 \n",
|
||
"L 254.856423 214.687179 \n",
|
||
"L 258.135762 213.817533 \n",
|
||
"L 261.415101 212.820232 \n",
|
||
"L 264.69444 211.695277 \n",
|
||
"L 267.973778 210.442667 \n",
|
||
"L 271.253117 209.062402 \n",
|
||
"L 274.532456 207.554483 \n",
|
||
"L 277.811795 205.91891 \n",
|
||
"L 281.091134 204.155682 \n",
|
||
"L 284.370473 202.2648 \n",
|
||
"L 287.649811 200.246263 \n",
|
||
"L 290.92915 198.100072 \n",
|
||
"L 294.208489 195.826226 \n",
|
||
"L 297.487828 193.424725 \n",
|
||
"L 300.767167 190.89557 \n",
|
||
"L 304.046506 188.238761 \n",
|
||
"L 307.325845 185.454297 \n",
|
||
"L 310.605183 182.542179 \n",
|
||
"L 313.884522 179.502406 \n",
|
||
"L 317.163861 176.334978 \n",
|
||
"L 320.4432 173.039896 \n",
|
||
"L 323.722539 169.61716 \n",
|
||
"L 327.001878 166.066769 \n",
|
||
"L 330.281216 162.388723 \n",
|
||
"L 333.560555 158.583023 \n",
|
||
"L 336.839894 154.649669 \n",
|
||
"L 340.119233 150.58866 \n",
|
||
"L 343.398572 146.399996 \n",
|
||
"L 346.677911 142.083678 \n",
|
||
"L 349.957249 137.639706 \n",
|
||
"L 353.236588 133.068079 \n",
|
||
"L 356.515927 128.368797 \n",
|
||
"L 359.795266 123.541861 \n",
|
||
"L 363.074605 118.587271 \n",
|
||
"L 366.353944 113.505026 \n",
|
||
"L 369.633283 108.295126 \n",
|
||
"L 372.912621 102.957572 \n",
|
||
"L 376.19196 97.492364 \n",
|
||
"\" clip-path=\"url(#p1e332790a2)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_17\">\n",
|
||
" <path d=\"M 51.537415 261.216 \n",
|
||
"L 54.816754 260.426138 \n",
|
||
"L 58.096092 259.636275 \n",
|
||
"L 61.375431 258.846413 \n",
|
||
"L 64.65477 258.056551 \n",
|
||
"L 67.934109 257.266689 \n",
|
||
"L 71.213448 256.476826 \n",
|
||
"L 74.492787 255.686964 \n",
|
||
"L 77.772126 254.897102 \n",
|
||
"L 81.051464 254.10724 \n",
|
||
"L 84.330803 253.317377 \n",
|
||
"L 87.610142 252.527515 \n",
|
||
"L 90.889481 251.737653 \n",
|
||
"L 94.16882 250.947791 \n",
|
||
"L 97.448159 250.157928 \n",
|
||
"L 100.727497 249.368066 \n",
|
||
"L 104.006836 248.578204 \n",
|
||
"L 107.286175 247.788342 \n",
|
||
"L 110.565514 246.998479 \n",
|
||
"L 113.844853 246.208617 \n",
|
||
"L 117.124192 245.418755 \n",
|
||
"L 120.40353 244.628893 \n",
|
||
"L 123.682869 243.83903 \n",
|
||
"L 126.962208 243.049168 \n",
|
||
"L 130.241547 242.259306 \n",
|
||
"L 133.520886 241.469444 \n",
|
||
"L 136.800225 240.679581 \n",
|
||
"L 140.079564 239.889719 \n",
|
||
"L 143.358902 239.099857 \n",
|
||
"L 146.638241 238.309994 \n",
|
||
"L 149.91758 237.520132 \n",
|
||
"L 153.196919 236.73027 \n",
|
||
"L 156.476258 235.940408 \n",
|
||
"L 159.755597 235.150545 \n",
|
||
"L 163.034935 234.360683 \n",
|
||
"L 166.314274 233.570821 \n",
|
||
"L 169.593613 232.780959 \n",
|
||
"L 172.872952 231.991096 \n",
|
||
"L 176.152291 231.201234 \n",
|
||
"L 179.43163 230.411372 \n",
|
||
"L 182.710968 229.62151 \n",
|
||
"L 185.990307 228.831647 \n",
|
||
"L 189.269646 228.041785 \n",
|
||
"L 192.548985 227.251923 \n",
|
||
"L 195.828324 226.462061 \n",
|
||
"L 199.107663 225.672198 \n",
|
||
"L 202.387002 224.882336 \n",
|
||
"L 205.66634 224.092474 \n",
|
||
"L 208.945679 223.302612 \n",
|
||
"L 212.225018 222.512749 \n",
|
||
"L 215.504357 221.722887 \n",
|
||
"L 218.783696 220.933025 \n",
|
||
"L 222.063035 220.143163 \n",
|
||
"L 225.342373 219.3533 \n",
|
||
"L 228.621712 218.563438 \n",
|
||
"L 231.901051 217.773576 \n",
|
||
"L 235.18039 216.983713 \n",
|
||
"L 238.459729 216.193851 \n",
|
||
"L 241.739068 215.403989 \n",
|
||
"L 245.018407 214.614127 \n",
|
||
"L 248.297745 213.824264 \n",
|
||
"L 251.577084 213.034402 \n",
|
||
"L 254.856423 212.24454 \n",
|
||
"L 258.135762 211.454678 \n",
|
||
"L 261.415101 210.664815 \n",
|
||
"L 264.69444 209.874953 \n",
|
||
"L 267.973778 209.085091 \n",
|
||
"L 271.253117 208.295229 \n",
|
||
"L 274.532456 207.505366 \n",
|
||
"L 277.811795 206.715504 \n",
|
||
"L 281.091134 205.925642 \n",
|
||
"L 284.370473 205.13578 \n",
|
||
"L 287.649811 204.345917 \n",
|
||
"L 290.92915 203.556055 \n",
|
||
"L 294.208489 202.766193 \n",
|
||
"L 297.487828 201.976331 \n",
|
||
"L 300.767167 201.186468 \n",
|
||
"L 304.046506 200.396606 \n",
|
||
"L 307.325845 199.606744 \n",
|
||
"L 310.605183 198.816882 \n",
|
||
"L 313.884522 198.027019 \n",
|
||
"L 317.163861 197.237157 \n",
|
||
"L 320.4432 196.447295 \n",
|
||
"L 323.722539 195.657433 \n",
|
||
"L 327.001878 194.86757 \n",
|
||
"L 330.281216 194.077708 \n",
|
||
"L 333.560555 193.287846 \n",
|
||
"L 336.839894 192.497983 \n",
|
||
"L 340.119233 191.708121 \n",
|
||
"L 343.398572 190.918259 \n",
|
||
"L 346.677911 190.128397 \n",
|
||
"L 349.957249 189.338534 \n",
|
||
"L 353.236588 188.548672 \n",
|
||
"L 356.515927 187.75881 \n",
|
||
"L 359.795266 186.968948 \n",
|
||
"L 363.074605 186.179085 \n",
|
||
"L 366.353944 185.389223 \n",
|
||
"L 369.633283 184.599361 \n",
|
||
"L 372.912621 183.809499 \n",
|
||
"L 376.19196 183.019636 \n",
|
||
"\" clip-path=\"url(#p1e332790a2)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"patch_3\">\n",
|
||
" <path d=\"M 35.304688 273.312 \n",
|
||
"L 35.304688 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 392.424688 273.312 \n",
|
||
"L 392.424688 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 35.304688 273.312 \n",
|
||
"L 392.424688 273.312 \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 35.304688 7.2 \n",
|
||
"L 392.424688 7.2 \n",
|
||
"\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"legend_1\">\n",
|
||
" <g id=\"patch_7\">\n",
|
||
" <path d=\"M 286.724688 60.05625 \n",
|
||
"L 385.424688 60.05625 \n",
|
||
"Q 387.424688 60.05625 387.424688 58.05625 \n",
|
||
"L 387.424688 14.2 \n",
|
||
"Q 387.424688 12.2 385.424688 12.2 \n",
|
||
"L 286.724688 12.2 \n",
|
||
"Q 284.724688 12.2 284.724688 14.2 \n",
|
||
"L 284.724688 58.05625 \n",
|
||
"Q 284.724688 60.05625 286.724688 60.05625 \n",
|
||
"z\n",
|
||
"\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_18\">\n",
|
||
" <path d=\"M 288.724688 20.298437 \n",
|
||
"L 298.724688 20.298437 \n",
|
||
"L 308.724688 20.298437 \n",
|
||
"\" style=\"fill: none; stroke: #000000; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_15\">\n",
|
||
" <!-- 0 -->\n",
|
||
" <g transform=\"translate(316.724688 23.798437) scale(0.1 -0.1)\">\n",
|
||
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_19\">\n",
|
||
" <path d=\"M 288.724688 35.798437 \n",
|
||
"L 298.724688 35.798437 \n",
|
||
"L 308.724688 35.798437 \n",
|
||
"\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_16\">\n",
|
||
" <!-- $f(x) = (x-2)^2$ -->\n",
|
||
" <g transform=\"translate(316.724688 39.298437) scale(0.1 -0.1)\">\n",
|
||
" <defs>\n",
|
||
" <path id=\"DejaVuSans-Oblique-66\" d=\"M 3059 4863 \n",
|
||
"L 2969 4384 \n",
|
||
"L 2419 4384 \n",
|
||
"Q 2106 4384 1964 4261 \n",
|
||
"Q 1822 4138 1753 3809 \n",
|
||
"L 1691 3500 \n",
|
||
"L 2638 3500 \n",
|
||
"L 2553 3053 \n",
|
||
"L 1606 3053 \n",
|
||
"L 1013 0 \n",
|
||
"L 434 0 \n",
|
||
"L 1031 3053 \n",
|
||
"L 481 3053 \n",
|
||
"L 563 3500 \n",
|
||
"L 1113 3500 \n",
|
||
"L 1159 3744 \n",
|
||
"Q 1278 4363 1576 4613 \n",
|
||
"Q 1875 4863 2516 4863 \n",
|
||
"L 3059 4863 \n",
|
||
"z\n",
|
||
"\" transform=\"scale(0.015625)\"/>\n",
|
||
" <path id=\"DejaVuSans-28\" d=\"M 1984 4856 \n",
|
||
"Q 1566 4138 1362 3434 \n",
|
||
"Q 1159 2731 1159 2009 \n",
|
||
"Q 1159 1288 1364 580 \n",
|
||
"Q 1569 -128 1984 -844 \n",
|
||
"L 1484 -844 \n",
|
||
"Q 1016 -109 783 600 \n",
|
||
"Q 550 1309 550 2009 \n",
|
||
"Q 550 2706 781 3412 \n",
|
||
"Q 1013 4119 1484 4856 \n",
|
||
"L 1984 4856 \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",
|
||
" <path id=\"DejaVuSans-29\" d=\"M 513 4856 \n",
|
||
"L 1013 4856 \n",
|
||
"Q 1481 4119 1714 3412 \n",
|
||
"Q 1947 2706 1947 2009 \n",
|
||
"Q 1947 1309 1714 600 \n",
|
||
"Q 1481 -109 1013 -844 \n",
|
||
"L 513 -844 \n",
|
||
"Q 928 -128 1133 580 \n",
|
||
"Q 1338 1288 1338 2009 \n",
|
||
"Q 1338 2731 1133 3434 \n",
|
||
"Q 928 4138 513 4856 \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",
|
||
" </defs>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-66\" transform=\"translate(0 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-28\" transform=\"translate(35.205078 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(74.21875 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-29\" transform=\"translate(133.398438 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(191.894531 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-28\" transform=\"translate(295.166016 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(334.179688 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-2212\" transform=\"translate(412.841797 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(516.113281 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-29\" transform=\"translate(579.736328 0.765625)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(619.707031 39.046875) scale(0.7)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <g id=\"line2d_20\">\n",
|
||
" <path d=\"M 288.724688 50.476562 \n",
|
||
"L 298.724688 50.476562 \n",
|
||
"L 308.724688 50.476562 \n",
|
||
"\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
|
||
" </g>\n",
|
||
" <g id=\"text_17\">\n",
|
||
" <!-- $f'(x)=2 x - 4$ -->\n",
|
||
" <g transform=\"translate(316.724688 53.976562) scale(0.1 -0.1)\">\n",
|
||
" <defs>\n",
|
||
" <path id=\"Cmsy10-30\" d=\"M 225 347 \n",
|
||
"Q 184 359 184 409 \n",
|
||
"L 966 3316 \n",
|
||
"Q 1003 3434 1093 3506 \n",
|
||
"Q 1184 3578 1300 3578 \n",
|
||
"Q 1450 3578 1564 3479 \n",
|
||
"Q 1678 3381 1678 3231 \n",
|
||
"Q 1678 3166 1644 3084 \n",
|
||
"L 488 319 \n",
|
||
"Q 466 275 428 275 \n",
|
||
"Q 394 275 320 306 \n",
|
||
"Q 247 338 225 347 \n",
|
||
"z\n",
|
||
"\" transform=\"scale(0.015625)\"/>\n",
|
||
" </defs>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-66\" transform=\"translate(0 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#Cmsy10-30\" transform=\"translate(42.652786 38.865625) scale(0.7)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-28\" transform=\"translate(64.630326 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(103.643997 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-29\" transform=\"translate(162.823685 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-3d\" transform=\"translate(221.319779 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-32\" transform=\"translate(324.591263 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-Oblique-78\" transform=\"translate(388.21431 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-2212\" transform=\"translate(466.876419 0.584375)\"/>\n",
|
||
" <use xlink:href=\"#DejaVuSans-34\" transform=\"translate(570.147904 0.584375)\"/>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" </g>\n",
|
||
" <defs>\n",
|
||
" <clipPath id=\"p1e332790a2\">\n",
|
||
" <rect x=\"35.304688\" y=\"7.2\" width=\"357.12\" height=\"266.112\"/>\n",
|
||
" </clipPath>\n",
|
||
" </defs>\n",
|
||
"</svg>\n"
|
||
],
|
||
"text/plain": [
|
||
"<Figure size 640x480 with 1 Axes>"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
}
|
||
],
|
||
"source": [
|
||
"def fP(x): #Defining the derivative of f(x) manually\n",
|
||
" return 2*x-4\n",
|
||
"\n",
|
||
"y_axis_vals_p = fP(torch.tensor(x_axis_vals)).numpy()\n",
|
||
"\n",
|
||
"#First, lets draw a black line at 0, so that we can easily tell if something is positive or negative\n",
|
||
"sns.lineplot(x=x_axis_vals, y=[0.0]*len(x_axis_vals), label=\"0\", color='black')\n",
|
||
"sns.lineplot(x=x_axis_vals, y=y_axis_vals, label='$f(x) = (x-2)^2$')\n",
|
||
"sns.lineplot(x=x_axis_vals, y=y_axis_vals_p, label=\"$f'(x)=2 x - 4$\")"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 57,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.872628Z",
|
||
"start_time": "2021-03-22T05:33:02.868281Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"None\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"x = torch.tensor([-3.5], requires_grad=True)\n",
|
||
"print(x.grad)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 58,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.879284Z",
|
||
"start_time": "2021-03-22T05:33:02.874597Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([30.2500], grad_fn=<PowBackward0>)\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"value = f(x)\n",
|
||
"print(value)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 59,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.887619Z",
|
||
"start_time": "2021-03-22T05:33:02.881506Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([-11.])\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"value.backward()\n",
|
||
"print(x.grad)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 60,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.906233Z",
|
||
"start_time": "2021-03-22T05:33:02.888975Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([2.0000])\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"x = torch.tensor([-3.5], requires_grad=True)\n",
|
||
"\n",
|
||
"x_cur = x.clone()\n",
|
||
"x_prev = x_cur*100 #Make the initial \"previous\" solution larger\n",
|
||
"epsilon = 1e-5\n",
|
||
"eta = 0.1\n",
|
||
"\n",
|
||
"while torch.linalg.norm(x_cur-x_prev) > epsilon:\n",
|
||
" x_prev = x_cur.clone() #We need to make a clone here so that x_prev and x_cur don't point to the same object\n",
|
||
" \n",
|
||
" #Compute our function, gradient, and update\n",
|
||
" value = f(x)\n",
|
||
" value.backward()\n",
|
||
" x.data -= eta * x.grad\n",
|
||
" x.grad.zero_() #We need to zero out the old gradient, as py-torch will not do that for us\n",
|
||
" \n",
|
||
" #What are we currently now?\n",
|
||
" x_cur = x.data\n",
|
||
" \n",
|
||
"print(x_cur)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 61,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.911171Z",
|
||
"start_time": "2021-03-22T05:33:02.908110Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"x_param = torch.nn.Parameter(torch.tensor([-3.5]), requires_grad=True)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 62,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.916541Z",
|
||
"start_time": "2021-03-22T05:33:02.913522Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"optimizer = torch.optim.SGD([x_param], lr=eta)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 63,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:02.933325Z",
|
||
"start_time": "2021-03-22T05:33:02.918744Z"
|
||
},
|
||
"tags": [
|
||
"remove_output"
|
||
]
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"tensor([2.0000])\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"for epoch in range(60):\n",
|
||
" optimizer.zero_grad() #x.grad.zero_()\n",
|
||
" loss_incurred = f(x_param)\n",
|
||
" loss_incurred.backward()\n",
|
||
" optimizer.step() #x.data -= eta * x.grad\n",
|
||
"print(x_param.data)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 64,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:18.679235Z",
|
||
"start_time": "2021-03-22T05:33:02.939654Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"ename": "AttributeError",
|
||
"evalue": "module 'numpy' has no attribute '_no_nep50_warning'",
|
||
"output_type": "error",
|
||
"traceback": [
|
||
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
|
||
"\u001b[31mAttributeError\u001b[39m Traceback (most recent call last)",
|
||
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[64]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mtorch\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mdata\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Dataset\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01msklearn\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mdatasets\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m fetch_openml\n\u001b[32m 4\u001b[39m \u001b[38;5;66;03m# Load data from https://www.openml.org/d/554\u001b[39;00m\n\u001b[32m 5\u001b[39m X, y = fetch_openml(\u001b[33m'\u001b[39m\u001b[33mmnist_784\u001b[39m\u001b[33m'\u001b[39m, version=\u001b[32m1\u001b[39m, return_X_y=\u001b[38;5;28;01mTrue\u001b[39;00m)\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\sklearn\\__init__.py:73\u001b[39m\n\u001b[32m 62\u001b[39m \u001b[38;5;66;03m# `_distributor_init` allows distributors to run custom init code.\u001b[39;00m\n\u001b[32m 63\u001b[39m \u001b[38;5;66;03m# For instance, for the Windows wheel, this is used to pre-load the\u001b[39;00m\n\u001b[32m 64\u001b[39m \u001b[38;5;66;03m# vcomp shared library runtime for OpenMP embedded in the sklearn/.libs\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 67\u001b[39m \u001b[38;5;66;03m# later is linked to the OpenMP runtime to make it possible to introspect\u001b[39;00m\n\u001b[32m 68\u001b[39m \u001b[38;5;66;03m# it and importing it first would fail if the OpenMP dll cannot be found.\u001b[39;00m\n\u001b[32m 69\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m ( \u001b[38;5;66;03m# noqa: F401 E402\u001b[39;00m\n\u001b[32m 70\u001b[39m __check_build,\n\u001b[32m 71\u001b[39m _distributor_init,\n\u001b[32m 72\u001b[39m )\n\u001b[32m---> \u001b[39m\u001b[32m73\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mbase\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m clone \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[32m 74\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_show_versions\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m show_versions \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[32m 76\u001b[39m _submodules = [\n\u001b[32m 77\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mcalibration\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 78\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mcluster\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 114\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mcompose\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 115\u001b[39m ]\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\sklearn\\base.py:19\u001b[39m\n\u001b[32m 17\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_config\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m config_context, get_config\n\u001b[32m 18\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mexceptions\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m InconsistentVersionWarning\n\u001b[32m---> \u001b[39m\u001b[32m19\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_metadata_requests\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m _MetadataRequester, _routing_enabled\n\u001b[32m 20\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_missing\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m is_scalar_nan\n\u001b[32m 21\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_param_validation\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m validate_parameter_constraints\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\sklearn\\utils\\__init__.py:9\u001b[39m\n\u001b[32m 7\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m metadata_routing\n\u001b[32m 8\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_bunch\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Bunch\n\u001b[32m----> \u001b[39m\u001b[32m9\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_chunking\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m gen_batches, gen_even_slices\n\u001b[32m 11\u001b[39m \u001b[38;5;66;03m# Make _safe_indexing importable from here for backward compat as this particular\u001b[39;00m\n\u001b[32m 12\u001b[39m \u001b[38;5;66;03m# helper is considered semi-private and typically very useful for third-party\u001b[39;00m\n\u001b[32m 13\u001b[39m \u001b[38;5;66;03m# libraries that want to comply with scikit-learn's estimator API. In particular,\u001b[39;00m\n\u001b[32m 14\u001b[39m \u001b[38;5;66;03m# _safe_indexing was included in our public API documentation despite the leading\u001b[39;00m\n\u001b[32m 15\u001b[39m \u001b[38;5;66;03m# `_` in its name.\u001b[39;00m\n\u001b[32m 16\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_indexing\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[32m 17\u001b[39m _safe_indexing, \u001b[38;5;66;03m# noqa: F401\u001b[39;00m\n\u001b[32m 18\u001b[39m resample,\n\u001b[32m 19\u001b[39m shuffle,\n\u001b[32m 20\u001b[39m )\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\sklearn\\utils\\_chunking.py:11\u001b[39m\n\u001b[32m 8\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnp\u001b[39;00m\n\u001b[32m 10\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_config\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m get_config\n\u001b[32m---> \u001b[39m\u001b[32m11\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_param_validation\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Interval, validate_params\n\u001b[32m 14\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mchunk_generator\u001b[39m(gen, chunksize):\n\u001b[32m 15\u001b[39m \u001b[38;5;250m \u001b[39m\u001b[33;03m\"\"\"Chunk generator, ``gen`` into lists of length ``chunksize``. The last\u001b[39;00m\n\u001b[32m 16\u001b[39m \u001b[33;03m chunk may have a length less than ``chunksize``.\"\"\"\u001b[39;00m\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\sklearn\\utils\\_param_validation.py:14\u001b[39m\n\u001b[32m 11\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumbers\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Integral, Real\n\u001b[32m 13\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnp\u001b[39;00m\n\u001b[32m---> \u001b[39m\u001b[32m14\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01msparse\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m csr_matrix, issparse\n\u001b[32m 16\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_config\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m config_context, get_config\n\u001b[32m 17\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mvalidation\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m _is_arraylike_not_scalar\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\sparse\\__init__.py:304\u001b[39m\n\u001b[32m 301\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mwarnings\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m_warnings\u001b[39;00m\n\u001b[32m 302\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mimportlib\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m_importlib\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m304\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_base\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m 305\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_csr\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m 306\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_csc\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\sparse\\_base.py:8\u001b[39m\n\u001b[32m 5\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnp\u001b[39;00m\n\u001b[32m 6\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01moperator\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m8\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_sputils\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m (asmatrix, check_reshape_kwargs, check_shape,\n\u001b[32m 9\u001b[39m get_sum_dtype, isdense, isscalarlike, _todata,\n\u001b[32m 10\u001b[39m matrix, validateaxis, getdtype, is_pydata_spmatrix)\n\u001b[32m 11\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_sparse\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m SparseABC, issparse\n\u001b[32m 13\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_matrix\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m spmatrix\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\sparse\\_sputils.py:10\u001b[39m\n\u001b[32m 8\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mmath\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m prod\n\u001b[32m 9\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01msparse\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01msp\u001b[39;00m\n\u001b[32m---> \u001b[39m\u001b[32m10\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_util\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m np_long, np_ulong\n\u001b[32m 13\u001b[39m __all__ = [\u001b[33m'\u001b[39m\u001b[33mupcast\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33mgetdtype\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33mgetdata\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33misscalarlike\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33misintlike\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 14\u001b[39m \u001b[33m'\u001b[39m\u001b[33misshape\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33missequence\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33misdense\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33mismatrix\u001b[39m\u001b[33m'\u001b[39m, \u001b[33m'\u001b[39m\u001b[33mget_sum_dtype\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 15\u001b[39m \u001b[33m'\u001b[39m\u001b[33mbroadcast_shapes\u001b[39m\u001b[33m'\u001b[39m]\n\u001b[32m 17\u001b[39m supported_dtypes = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc,\n\u001b[32m 18\u001b[39m np.uintc, np_long, np_ulong, np.longlong, np.ulonglong,\n\u001b[32m 19\u001b[39m np.float32, np.float64, np.longdouble,\n\u001b[32m 20\u001b[39m np.complex64, np.complex128, np.clongdouble]\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\_lib\\_util.py:14\u001b[39m\n\u001b[32m 11\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mtyping\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Literal, TypeAlias, TypeVar\n\u001b[32m 13\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnp\u001b[39;00m\n\u001b[32m---> \u001b[39m\u001b[32m14\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_array_api\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m (Array, array_namespace, is_lazy_array,\n\u001b[32m 15\u001b[39m is_numpy, is_marray, xp_result_device,\n\u001b[32m 16\u001b[39m xp_size, xp_result_type)\n\u001b[32m 17\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_docscrape\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m FunctionDoc, Parameter\n\u001b[32m 18\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_sparse\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m issparse\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\_lib\\_array_api.py:25\u001b[39m\n\u001b[32m 22\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mtyping\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnpt\u001b[39;00m\n\u001b[32m 24\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m array_api_compat\n\u001b[32m---> \u001b[39m\u001b[32m25\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01marray_api_compat\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[32m 26\u001b[39m is_array_api_obj,\n\u001b[32m 27\u001b[39m is_lazy_array,\n\u001b[32m 28\u001b[39m size \u001b[38;5;28;01mas\u001b[39;00m xp_size,\n\u001b[32m 29\u001b[39m numpy \u001b[38;5;28;01mas\u001b[39;00m np_compat,\n\u001b[32m 30\u001b[39m device \u001b[38;5;28;01mas\u001b[39;00m xp_device,\n\u001b[32m 31\u001b[39m is_numpy_namespace \u001b[38;5;28;01mas\u001b[39;00m is_numpy,\n\u001b[32m 32\u001b[39m is_cupy_namespace \u001b[38;5;28;01mas\u001b[39;00m is_cupy,\n\u001b[32m 33\u001b[39m is_torch_namespace \u001b[38;5;28;01mas\u001b[39;00m is_torch,\n\u001b[32m 34\u001b[39m is_jax_namespace \u001b[38;5;28;01mas\u001b[39;00m is_jax,\n\u001b[32m 35\u001b[39m is_dask_namespace \u001b[38;5;28;01mas\u001b[39;00m is_dask,\n\u001b[32m 36\u001b[39m is_array_api_strict_namespace \u001b[38;5;28;01mas\u001b[39;00m is_array_api_strict\n\u001b[32m 37\u001b[39m )\n\u001b[32m 38\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_sparse\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m issparse\n\u001b[32m 39\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mscipy\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_lib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_docscrape\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m FunctionDoc\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\scipy\\_lib\\array_api_compat\\numpy\\__init__.py:4\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# ruff: noqa: PLC0414\u001b[39;00m\n\u001b[32m 2\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mtyping\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Final\n\u001b[32m----> \u001b[39m\u001b[32m4\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m * \u001b[38;5;66;03m# noqa: F403 # pyright: ignore[reportWildcardImportFromLibrary]\u001b[39;00m\n\u001b[32m 6\u001b[39m \u001b[38;5;66;03m# from numpy import * doesn't overwrite these builtin names\u001b[39;00m\n\u001b[32m 7\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnumpy\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;28mabs\u001b[39m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;28mabs\u001b[39m\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\numpy\\testing\\__init__.py:11\u001b[39m\n\u001b[32m 8\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01munittest\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m TestCase\n\u001b[32m 10\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m _private\n\u001b[32m---> \u001b[39m\u001b[32m11\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_private\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m 12\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_private\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutils\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m (_assert_valid_refcount, _gen_alignment_data)\n\u001b[32m 13\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m_private\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m extbuild\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\numpy\\testing\\_private\\utils.py:465\u001b[39m\n\u001b[32m 461\u001b[39m pprint.pprint(desired, msg)\n\u001b[32m 462\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAssertionError\u001b[39;00m(msg.getvalue())\n\u001b[32m--> \u001b[39m\u001b[32m465\u001b[39m \u001b[38;5;129m@np\u001b[39m\u001b[43m.\u001b[49m\u001b[43m_no_nep50_warning\u001b[49m()\n\u001b[32m 466\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34massert_almost_equal\u001b[39m(actual, desired, decimal=\u001b[32m7\u001b[39m, err_msg=\u001b[33m'\u001b[39m\u001b[33m'\u001b[39m, verbose=\u001b[38;5;28;01mTrue\u001b[39;00m):\n\u001b[32m 467\u001b[39m \u001b[38;5;250m \u001b[39m\u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 468\u001b[39m \u001b[33;03m Raises an AssertionError if two items are not equal up to desired\u001b[39;00m\n\u001b[32m 469\u001b[39m \u001b[33;03m precision.\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 533\u001b[39m \n\u001b[32m 534\u001b[39m \u001b[33;03m \"\"\"\u001b[39;00m\n\u001b[32m 535\u001b[39m __tracebackhide__ = \u001b[38;5;28;01mTrue\u001b[39;00m \u001b[38;5;66;03m# Hide traceback for py.test\u001b[39;00m\n",
|
||
"\u001b[36mFile \u001b[39m\u001b[32md:\\app\\miniconda\\envs\\dpl\\Lib\\site-packages\\numpy\\__init__.py:795\u001b[39m, in \u001b[36m__getattr__\u001b[39m\u001b[34m(attr)\u001b[39m\n\u001b[32m 0\u001b[39m <Error retrieving source code with stack_data see ipython/ipython#13598>\n",
|
||
"\u001b[31mAttributeError\u001b[39m: module 'numpy' has no attribute '_no_nep50_warning'"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"from torch.utils.data import Dataset\n",
|
||
"from sklearn.datasets import fetch_openml\n",
|
||
"\n",
|
||
"# Load data from https://www.openml.org/d/554\n",
|
||
"X, y = fetch_openml('mnist_784', version=1, return_X_y=True)\n",
|
||
"print(X.shape)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:18.684096Z",
|
||
"start_time": "2021-03-22T05:33:18.680539Z"
|
||
}
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"class SimpleDataset(Dataset):\n",
|
||
" \n",
|
||
" def __init__(self, X, y):\n",
|
||
" super(SimpleDataset, self).__init__()\n",
|
||
" self.X = X\n",
|
||
" self.y = y\n",
|
||
" \n",
|
||
" def __getitem__(self, index):\n",
|
||
" #This \"work\" could have gone in the constructor, but you should get into \n",
|
||
" inputs = torch.tensor(self.X[index,:], dtype=torch.float32)\n",
|
||
" targets = torch.tensor(int(self.y[index]), dtype=torch.int64)\n",
|
||
" return inputs, targets \n",
|
||
"\n",
|
||
" def __len__(self):\n",
|
||
" return self.X.shape[0]\n",
|
||
"#Now we can make a PyTorch dataset \n",
|
||
"dataset = SimpleDataset(X, y)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:18.698359Z",
|
||
"start_time": "2021-03-22T05:33:18.685197Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"Length: 70000\n",
|
||
"Features: torch.Size([784])\n",
|
||
"Label of index 0: tensor(5)\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"print(\"Length: \", len(dataset))\n",
|
||
"example, label = dataset[0]\n",
|
||
"print(\"Features: \", example.shape) #Will return 784\n",
|
||
"print(\"Label of index 0: \", label)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:18.934961Z",
|
||
"start_time": "2021-03-22T05:33:18.700260Z"
|
||
},
|
||
"max_h": 0.3,
|
||
"max_w": 0.9
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"<matplotlib.image.AxesImage at 0x7f3d87846150>"
|
||
]
|
||
},
|
||
"execution_count": 34,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/pd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"
|
||
]
|
||
},
|
||
"metadata": {
|
||
"needs_background": "light"
|
||
},
|
||
"output_type": "display_data"
|
||
}
|
||
],
|
||
"source": [
|
||
"plt.imshow(example.reshape((28,28)))"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {
|
||
"ExecuteTime": {
|
||
"end_time": "2021-03-22T05:33:18.943218Z",
|
||
"start_time": "2021-03-22T05:33:18.936102Z"
|
||
}
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"56000 examples for training and 14000 for testing\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"train_size = int(len(dataset)*0.8)\n",
|
||
"test_size = len(dataset)-train_size\n",
|
||
"\n",
|
||
"train_dataset, test_dataset = torch.utils.data.random_split(dataset, (train_size, test_size))\n",
|
||
"print(\"{} examples for training and {} for testing\".format(len(train_dataset), len(test_dataset)))"
|
||
]
|
||
}
|
||
],
|
||
"metadata": {
|
||
"author": "Why PyTorch?",
|
||
"celltoolbar": "Tags",
|
||
"kernelspec": {
|
||
"display_name": "dpl",
|
||
"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.11.14"
|
||
},
|
||
"latex_envs": {
|
||
"LaTeX_envs_menu_present": true,
|
||
"autoclose": false,
|
||
"autocomplete": false,
|
||
"bibliofile": "biblio.bib",
|
||
"cite_by": "apalike",
|
||
"current_citInitial": 1,
|
||
"eqLabelWithNumbers": true,
|
||
"eqNumInitial": 1,
|
||
"hotkeys": {
|
||
"equation": "Ctrl-E",
|
||
"itemize": "Ctrl-I"
|
||
},
|
||
"labels_anchors": false,
|
||
"latex_user_defs": false,
|
||
"report_style_numbering": false,
|
||
"user_envs_cfg": false
|
||
},
|
||
"latex_metadata": {
|
||
"title": "The Mechanics of Learning"
|
||
},
|
||
"varInspector": {
|
||
"cols": {
|
||
"lenName": 16,
|
||
"lenType": 16,
|
||
"lenVar": 40
|
||
},
|
||
"kernels_config": {
|
||
"python": {
|
||
"delete_cmd_postfix": "",
|
||
"delete_cmd_prefix": "del ",
|
||
"library": "var_list.py",
|
||
"varRefreshCmd": "print(var_dic_list())"
|
||
},
|
||
"r": {
|
||
"delete_cmd_postfix": ") ",
|
||
"delete_cmd_prefix": "rm(",
|
||
"library": "var_list.r",
|
||
"varRefreshCmd": "cat(var_dic_list()) "
|
||
}
|
||
},
|
||
"types_to_exclude": [
|
||
"module",
|
||
"function",
|
||
"builtin_function_or_method",
|
||
"instance",
|
||
"_Feature"
|
||
],
|
||
"window_display": false
|
||
}
|
||
},
|
||
"nbformat": 4,
|
||
"nbformat_minor": 2
|
||
}
|