mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-18 04:22:28 +00:00
452 lines
192 KiB
Plaintext
452 lines
192 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"![](images/EscUpmPolit_p.gif \"UPM\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"# Course Notes for Learning Intelligent Systems"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"Department of Telematic Engineering Systems, Universidad Politécnica de Madrid, © Carlos A. Iglesias"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"## [Introduction to Visualization](00_Intro_Visualization.ipynb)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"# Temporal Charts\n",
|
||
|
"Charts for comparing temporal data."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "slide"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"## Timeseries plot"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>subject</th>\n",
|
||
|
" <th>timepoint</th>\n",
|
||
|
" <th>event</th>\n",
|
||
|
" <th>region</th>\n",
|
||
|
" <th>signal</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>s13</td>\n",
|
||
|
" <td>18</td>\n",
|
||
|
" <td>stim</td>\n",
|
||
|
" <td>parietal</td>\n",
|
||
|
" <td>-0.017552</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>s5</td>\n",
|
||
|
" <td>14</td>\n",
|
||
|
" <td>stim</td>\n",
|
||
|
" <td>parietal</td>\n",
|
||
|
" <td>-0.080883</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>s12</td>\n",
|
||
|
" <td>18</td>\n",
|
||
|
" <td>stim</td>\n",
|
||
|
" <td>parietal</td>\n",
|
||
|
" <td>-0.081033</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>s11</td>\n",
|
||
|
" <td>18</td>\n",
|
||
|
" <td>stim</td>\n",
|
||
|
" <td>parietal</td>\n",
|
||
|
" <td>-0.046134</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>s10</td>\n",
|
||
|
" <td>18</td>\n",
|
||
|
" <td>stim</td>\n",
|
||
|
" <td>parietal</td>\n",
|
||
|
" <td>-0.037970</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" subject timepoint event region signal\n",
|
||
|
"0 s13 18 stim parietal -0.017552\n",
|
||
|
"1 s5 14 stim parietal -0.080883\n",
|
||
|
"2 s12 18 stim parietal -0.081033\n",
|
||
|
"3 s11 18 stim parietal -0.046134\n",
|
||
|
"4 s10 18 stim parietal -0.037970"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import pandas as pd\n",
|
||
|
"import seaborn as sns\n",
|
||
|
"\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"\n",
|
||
|
"fmri = sns.load_dataset(\"fmri\")\n",
|
||
|
"fmri.head(5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Axes: xlabel='timepoint', ylabel='signal'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSU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QcZmKo6IZjcGS0QTIJq2EE/bCHmnZwruWD6PiiOxDFyXqTgimp0YLBFNgK6EARcC6jQt7j5W0KsimrEQzzAVR0Sz0/T/TU5UYkzbRXvcQHCGbLfXVBmWLdCTMqb6UoiIpgSDJaJx1psykchM311wQwloCtpiBhym4ohoFmKwRDTOOuIGZFmeVuNNRhP0qkhkbETTLPQmotmHwRLROEqbDjqTBsJFrirt60ziip89j6/8/lXs6UiM89UVT1VkOEKgO8lUHBHNPgyWiMZRT8pExnTgK3L47G9eOICelIVtB3tx9T3bcOtfdqMrURoBSlBT0R4zYDnuVF8KEdGkYrBENE6y400y0FQFUhEpuJbeNJ7b0wUAOH1eBQSATTuP4NO/2oLfvnAAGcsZ5ysuTMCrImHY7LlERLMOgyWicRI3bPSmTASL7K10/9bDEABOm1eOr1y4HP/xwZOxtC4Ew3bxmxcO4NO/2oK/7DwCd4pGjyiyBFmSSmali4hosjBYIhonvUkThu1CLyIF15My8ZfXjwAAPnBqIwBgaV0Y3/nAyfjieUtQE/KiO2ni5r/sxjX/vQ2vHOodz0vPW8CrojNhTPkqFxHRZGKwRDQOHFegLZaB31PcqtL/vtwKyxFYUhvC8vpw/+2SJOGsRdW4/W9X4+Pr58GvKXirI4l/eeBVfPNPr+FwT3q8HkJe/JqCpOlwVxwRzSoMlojGQSxtIZa2i+qtlDYdPPhKKwDgklP
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.lineplot(x=\"timepoint\", y=\"signal\", data=fmri)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Axes: xlabel='timepoint', ylabel='signal'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAksAAAGwCAYAAAC5ACFFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAADErElEQVR4nOy9d5xcdb3//zznTJ/Zme0lPSGBJJQQQgsBbBDERlHBin5FvVy9vytwvSpX5WK76FURywW7XO8VxCuioijEQjNICYSWhJK2m+xutk5vp/3++OxudrNlZjdbk/fz8Zjs7NlzznxmMzvnNe/yemuu67oIgiAIgiAII6LP9AIEQRAEQRBmMyKWBEEQBEEQxkDEkiAIgiAIwhiIWBIEQRAEQRgDEUuCIAiCIAhjIGJJEARBEARhDEQsCYIgCIIgjIFnphdwJOA4Dq2trVRUVKBp2kwvRxAEQRCEMnBdl1Qqxbx589D10eNHIpYmgdbWVhYuXDjTyxAEQRAEYQK0tLSwYMGCUX8uYmkSqKioANQvOxqNzvBqBEEQBEEoh2QyycKFCweu46MhYmkS6E+9RaNREUuCIAiCMMcoVUIjBd6CIAiCIAhjIGJJEARBEARhDEQsCYIgCIIgjIHULAmCIAjCHMG2bUzTnOllzBm8Xi+GYRz2eUQsCYIgCMIsx3Vd2tvbicfjM72UOUdlZSWNjY2H5YMoYkkQBEEQZjn9Qqm+vp5QKCQGyGXgui7ZbJaOjg4AmpqaJnwuEUuCIAiCMIuxbXtAKNXU1Mz0cuYUwWAQgI6ODurr6yeckpMCb0EQBEGYxfTXKIVCoRleydyk//d2OLVeIpYEQRAEYQ4gqbeJMRm/NxFLgiAIgiAIYyBiSRAEQRAEYQxELAmCIAiCIIyBiCVBEARBEGaMV7/61Vx99dUzvYwxEbEkCEchtuNSsOyZXoYgCMKcQMSSIBxFZIsWLT1Ztuzt4fn9SSzbmeklCYIwg7iuy3/+53+ybNkygsEga9as4Ze//CWO47BgwQK++93vDtn/qaeeQtM0du3aBUAikeDDH/4w9fX1RKNRXvva1/LMM88M7H/DDTdw8skn8z//8z8sWbKEWCzGO97xDlKpFADvf//7efDBB/nmN7+JpmlomsaePXum7fmXi4glQTjCsR2X7nSBHW1JntjTwwutSXJFh+50gZ5McaaXJwjCDPKZz3yGn/zkJ9x666288MILXHPNNbznPe/h4Ycf5h3veAc/+9nPhux/++23s379epYtW4brurzxjW+kvb2de++9ly1btnDKKafwute9jp6enoFjdu7cya9//Wt+97vf8bvf/Y4HH3yQL3/5ywB885vfZP369XzoQx+ira2NtrY2Fi5cOK2/g3IQB29BOELJFW16skVa4zniGRM0lwq/l6qYD03T6EjlaY3nqI340XXxbxGEo41MJsNNN93EX/7yF9avXw/AsmXLeOSRR/je977Hv/7rv3LTTTexd+9eFi9ejOM4/PznP+ff/u3fAPjrX//Kc889R0dHB36/H4Cvfe1r/PrXv+aXv/wlH/7whwFwHIfbbruNiooKAN773vfy5z//mS996UvEYjF8Ph+hUIjGxsYZ+C2Uh4glQTiCcByXRM6kM1XgQCpPpmAR8BjURHx4jaGB5KqQj650kXjOpDrsm6EVC4IwU2zbto18Ps/5558/ZHuxWGTt2rWsXbuWlStXcscdd/CpT32KBx98kI6ODi677DIAtmzZQjqdHjaCJZfLsXPnzoHvlyxZMiCUQM1o65/XNlcQsSQIRwB506YnU6QtkaM3Y2K7LtGAl3mx4KjutV5Dx8WlPZETsSQIRyGOo2oWf//73zN//vwhP+uPFL373e/m9ttv51Of+hS33347F1xwAbW1tQPHNzU18cADDww7d2Vl5cB9r9c75Geapg089lxBxJIgzFFcd1AUKZkn3RdFqg4PjyKNRizgoyNZYEG1STTgLX2AIAhHDKtXr8bv99Pc3MyrXvWqEfd517vexWc+8xm2bNnCL3/5S2699daBn51yyim0t7fj8XhYsmTJhNfh8/mw7dndnStiSR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dz8cUXD9m2cOFC2traOOGEE2ZmUWMwp8TSnXfeydVXX82nP/1pnn76ac455xwuvPDCUefIPPTQQ5x//vnce++9bNmyhde85jW8+c1v5umnnx6yXzQapa2tbchNLOWF6SSRNSlazpQ4dE+EaNBLIm/SnZHokiAI04NhGDQ2NuLxzPyHxkOZU2Lppptu4sorr+SDH/wgq1at4uabb2bhwoXceuutI+5/880384lPfILTTjuNFStW8B//8R+sWLGCe+65Z8h+mqbR2Ng45CYI04XjuLQn84S8s+cNQtc0Ah6d/b05bDGpFARhgvzyl7/kxBNPJBgMUlNTw3nnnce//uu/8t///d/85je/GcjmPPDAA8PScA888ACapnHfffexdu1agsEgr33ta+no6OAPf/gDq1atIhqN8s53vpNsNjulz2P2vDuXoFgssmXLFj71qU8N2b5x40Y2b95c1jkcxyGVSlFdXT1kezqdZvHixdi2zcknn8wXvvAF1q5dO+p5CoUChcLBT9zJZHIcz0QQhpLMmyRyJtUh30wvZQixoJeuTIGeTJG6Cv9ML0cQhEG4rkvOtKf9cYPe8q1N2traeOc738l//ud/cskll5BKpXj44Ye54ooraG5uJplM8pOf/ASA6upqWltbRzzPDTfcwHe+8x1CoRCXXXYZl112GX6/n9tvv510Os0ll1zCt7/9bT75yU9O2vM8lDkjlrq6urBtm4aGhiHbGxoaaG9vL+scX//618lkMlx22WUD21auXMltt93GiSeeSDKZ5Jvf/CYbNmzgmWeeYcWKFSOe58Ybb+Rzn/vcxJ+MIAwini1i2c6sG2DrMXQ0NNoSOWojvhnzfhIEYTg502b19feV3nGS2fb5Cwj5ypMObW1tWJbFpZdeyuLFiwE48cQTAQg
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.lineplot(x=\"timepoint\", y=\"signal\", hue=\"event\", data=fmri)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "slide"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"## Stackplot graph\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAABKxElEQVR4nO3deVzUdeI/8NdwDecMl1wKiPeVdlipW1rb6bb+ttwjszXbshMUxTOt1drUtM3atrJtD7O20sosN0/k8laUQwVUBGQGBblnYIAZZubz+8PkG4IKODPvOV7Px2MeyXw+zOf19m3y8nPKJEmSQERERGQjbqIDEBERkWth+SAiIiKbYvkgIiIim2L5ICIiIpti+SAiIiKbYvkgIiIim2L5ICIiIpti+SAiIiKb8hAd4EpmsxkXLlxAQEAAZDKZ6DhERETUBZIkoaGhAVFRUXBzu/a+DbsrHxcuXEB0dLToGERERNQDarUaffr0ueY6dlc+AgICAFwKr1AoBKchIiKirtBqtYiOjm77OX4tdlc+Lh9qUSgULB9EREQOpiunTPCEUyIiIrIplg8iIiKyKZYPIiIisim7O+ejKyRJgtFohMlkEh2FLMTd3R0eHh68vJqIyAU4XPkwGAwoLy9HU1OT6ChkYb6+voiMjISXl5foKEREZEUOVT7MZjNKSkrg7u6OqKgoeHl58V/KTkCSJBgMBlRVVaGkpAQDBw687g1qiIjIcTlU+TAYDDCbzYiOjoavr6/oOGRBPj4+8PT0RGlpKQwGA7y9vUVHIiIiK3HIf17yX8XOifNKROQa+Lc9ERER2RTLBxEREd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pbbb9vWT09Ph0wmQ0pKCkaPHg1fX1+MGzcOp0+fblsnNzcX9957LwICAqBQKHDbbbfh6NGjthk8ERF1WaupFUv2LcHfs//udMUDYPmwC08++SS2bNmCxsbGtvd27twJnU6H3/72twCAV199FevWrcPatWuRl5eHOXPm4I9//CMyMjLafdaSJUvwzjvv4OjRo/Dw8MAzzzzTbjt9+vRBZmYmjh07hkWLFsHT09M2gyQioi7R6DV4Pvl5bCnaIjqK1fCwiw39+OOP8Pf3b/fewoULsWjRIvj5+WHz5s2YNm0aAODLL7/EpEmToFAooNPpsGbNGqSmpmLs2LEAgH79+mHfvn34xz/+gQkTJrR93vLly9u+XrRoER555BG0tLTA29sbKpUK8+fPx5AhQwAAAwcOtMWwiYioi0q1pYhPiUeptlR0FKti+bChe++9F2vXrm33XnBwMDw9PfH73/8eX3zxBaZNmwadTocffvgBX375JQAgPz8fLS0teOCBB9p9r8FgwC233NLuvZEjR7b9OjIyEgBQWVmJmJgYJCUlYcaMGfj8889x//334/e//z369+9vjaESEVE3Ha04ijnpc1CvrxcdxepYPmzIz88PAwYM6HTZk08+iQkTJqCyshLJycnw9vbGxIkTAQBm86Vb527duhW9e/du931XnrD688MoMpms3fcvW7YMU6dOxdatW7F9+3YsXboUGzZswGOPPWaZARIRUY/8cPYHvH7wdbSaW0VHsQmWDzsxbtw4REdHY+PGjdi+fTt+//vfw8vLCwAwbNgwyOVyqFSqdodYemLQoEEYNGgQ5syZgyeeeALr1q1j+SAiEkSSJPw9++/454l/io5iUywfNqTX61FRUdHuPQ8PD4SGhkImk2Hq1Kn4+OOPcebMGaSlpbWtExAQgHnz5mHOnDkwm8246667oNVqceDAAfj7+2P69OnX3XZzczPmz5+P3/3ud4iLi0NZWRkyMzPbTmglIiLb0pv0WLJvCXae2yk6is2xfNj
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"\n",
|
||
|
"x = [1, 2, 3, 4, 5]\n",
|
||
|
"y1 = [1, 1, 2, 3, 5]\n",
|
||
|
"y2 = [0, 4, 2, 6, 8]\n",
|
||
|
"y3 = [1, 3, 5, 7, 9]\n",
|
||
|
"\n",
|
||
|
"y = np.vstack([y1, y2, y3])\n",
|
||
|
"\n",
|
||
|
"labels = [\"Fibonacci \", \"Evens\", \"Odds\"]\n",
|
||
|
"\n",
|
||
|
"fig, ax = plt.subplots()\n",
|
||
|
"ax.stackplot(x, y1, y2, y3, labels=labels)\n",
|
||
|
"ax.legend(loc='upper left')\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+fElEQVR4nO3dd3yUZaI2/mvSJm0yaaSREAEpUte2lGN35SzH9beu57y/dd2jqNgTCIQmuK7Ii0TcFV3XFY/rWnCtR8RKC2mACATSSEJJIzMJ6WVmMsn05/1DyRoJkISZueeZub6fz3yWzDyT57q90bn2fsooJEmSQEREROQmfqIDEBERkW9h+SAiIiK3YvkgIiIit2L5ICIiIrdi+SAiIiK3YvkgIiIit2L5ICIiIrdi+SAiIiK3ChAd4KccDgfOnDkDlUoFhUIhOg4RERENgSRJMBgMSEpKgp/fhdc2PK58nDlzBikpKaJjEBER0QhotVokJydfcBuPKx8qlQrA9+EjIiI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RJAkvFb2Et8vfFh2FZIblg4iIhq3P1oc1+9Zgj2aP6CgkQywfREQ0LG29bViUuwgVHRWio5BMsXwQEdGQafVaLNy9EE3GJtFRSMZYPoiIaEg0eg0e2PUAWntbRUchmePVLkREdFH1+noWD3Ialg8iIrqg07rTeHDngywe5DQsH0REdF51ujo8uOtBtPaxeJDzsHwQEdGganW1WLhrIdr62kRHIS/DE06
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig, ax = plt.subplots()\n",
|
||
|
"ax.stackplot(x, y)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "slide"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"## Streamgraph"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "subslide"
|
||
|
}
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGgCAYAAACXJAxkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAABO1klEQVR4nO3dd3wUdf4/8NfsJrvpnfQeSgihB5CmNAEFFBUUxQaWQwFF/J2CDeuhd55dsNx9Pc/esJ4oHUSKSO+QkJCQQggpm7pJduf3x0o0EmCzmdnP7O7r+XjsQ7OZzLwZyO5rP1WSZVkGERERkQA60QUQERGR52IQISIiImEYRIiIiEgYBhEiIiIShkGEiIiIhGEQISIiImE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nDgIH2CpCROTJ1Gi9KK0rVfycWsYg0hHrnmOrCBGRB1NjPMfJupOKn1PLGEQ6ouwwsH+Z6CqIiEgQNVpESupKFD+nljGIdNR6tooQEXkqJdcQOeNkLVtEqD3KjgAHua4IEZEnUnJV1TPYNUPt99MLoisgIiIB1OiaqW6sRn1zveLn1SoGESWU7AGyV4mugoiInEytNT88qXuGQUQpP70ougIiInIytVZB9aTuGQYRpRzfCORvFV0FERE5kWotIgwi5JCNHCtCRORJVGsRYdcMOeTIj8DJ/aKrICIiJ2GLSMcxiChKBjZyrAgRkSdosjahpqlGlXMziJDj9i0DynNFV0FERCpTYw2RM9g1Q46TLcCmV0RXQUREKlNjVdU
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def layers(n, m):\n",
|
||
|
" \"\"\"\n",
|
||
|
" Return *n* random Gaussian mixtures, each of length *m*.\n",
|
||
|
" \"\"\"\n",
|
||
|
" def bump(a):\n",
|
||
|
" x = 1 / (.1 + np.random.random())\n",
|
||
|
" y = 2 * np.random.random() - .5\n",
|
||
|
" z = 10 / (.1 + np.random.random())\n",
|
||
|
" for i in range(m):\n",
|
||
|
" w = (i / m - y) * z\n",
|
||
|
" a[i] += x * np.exp(-w * w)\n",
|
||
|
" a = np.zeros((m, n))\n",
|
||
|
" for i in range(n):\n",
|
||
|
" for j in range(5):\n",
|
||
|
" bump(a[:, i])\n",
|
||
|
" return a\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"d = layers(3, 100)\n",
|
||
|
"\n",
|
||
|
"fig, ax = plt.subplots()\n",
|
||
|
"ax.stackplot(range(100), d.T, baseline='wiggle')\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"# References\n",
|
||
|
"* [Data Preprocessing for Machine learning in Python, GeeksForGeeks](https://www.geeksforgeeks.org/data-preprocessing-machine-learning-python/)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"slideshow": {
|
||
|
"slide_type": "skip"
|
||
|
}
|
||
|
},
|
||
|
"source": [
|
||
|
"## Licence\n",
|
||
|
"The notebook is freely licensed under under the [Creative Commons Attribution Share-Alike license](https://creativecommons.org/licenses/by/2.0/). \n",
|
||
|
"\n",
|
||
|
"© Carlos A. Iglesias, Universidad Politécnica de Madrid."
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"datacleaner": {
|
||
|
"position": {
|
||
|
"top": "50px"
|
||
|
},
|
||
|
"python": {
|
||
|
"varRefreshCmd": "try:\n print(_datacleaner.dataframe_metadata())\nexcept:\n print([])"
|
||
|
},
|
||
|
"window_display": false
|
||
|
},
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.10.13"
|
||
|
},
|
||
|
"latex_envs": {
|
||
|
"LaTeX_envs_menu_present": true,
|
||
|
"autocomplete": true,
|
||
|
"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
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 4
|
||
|
}
|