Topology in neuroscience
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

358 lines
121 KiB

{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Topological analysis of a noisy circle\n",
"_Test application for the topological tools_"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "markdown",
"source": [
"**Imports**"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
"execution_count": 13,
"outputs": [],
"source": [
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"from model import persistence, decoding\n",
"import pandas as pd\n",
"%matplotlib inline"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
"source": [
"**Parameters**"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [],
"source": [
"N = 20\n",
"R = 1\n",
"SIGMA = 0.1"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
"source": [
"### Generating the circle"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [
{
"data": {
"text/plain": "(20, 2)"
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phase = np.linspace(0, 2 * np.pi, N)\n",
"points = np.array([np.cos(phase), np.sin(phase)]).swapaxes(0, 1) * R\n",
"points.shape"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [],
"source": [
"noise = np.random.normal(scale=SIGMA, size=points.shape)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 5,
"outputs": [
{
"data": {
"text/plain": "<matplotlib.collections.PathCollection at 0x7fc83452b0a0>"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAWB0lEQVR4nO3db4xc1X3G8e/TjZE2FHUhXoy94NiNLCtO3dh05CRy1UDB+I+UrrGSyiQiKIq6JYpfJKosmUZKoryxVSuNkohAHGrFVAk0VbCxgoMB84KkES1j7IAJcXEpCd618AIxJGUlYvLri7kD42F2d8b3zsyduc9HGu3cc8+dOR6N99l77j3nKCIwM7Pi+qNuN8DMzLrLQWBmVnAOAjOzgnMQmJkVnIPAzKzg3tHtBpyPuXPnxqJFi7rdDDOznnL48OEXI2K4vrwng2DRokWUy+VuN8PMrKdI+lWjcncNmZkVnIPAzKzgHARmZgXnIDAzKzgHgZlZwfXkXUNmebXvyDg7Dx5n4swUC4YG2bp2KRtXjnS7WWYzchCYZWTfkXFuuedJpn7/BgDjZ6a45Z4nARwGlmvuGjLLyM6Dx98Mgaqp37/BzoPHu9Qis+b4jMCsCc10+UycmWp47HTlZnmRyRmBpN2STks6Ns1+SfqGpBOSnpB0Zc2+dZKOJ/u2ZdEesyxVu3zGz0wRvNXls+/I+Dn1FgwNNjx+unKzvMiqa+i7wLoZ9q8HliSPMeA2AEkDwK3J/mXADZKWZdQms0w02+Wzde1SBucMnFM2OGeArWuXtr2NZmlk0jUUEY9IWjRDlVHgzqisi/mopCFJ84FFwImIeBZA0t1J3V9k0S6zLDTb5VPtKvJdQ9ZrOnWNYAR4vmb7ZFLWqPwDjV5A0hiVswkWLlzYnlaaNbBgaJDxBmHQqMtn48oR/+K3ntOpu4bUoCxmKH97YcSuiChFRGl4+G2zqJq1jbt8rN916ozgJHBFzf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gQFgd0Q8JenmZP/twBeBdwHfkgRwNiJKwDxgb1L2DuD7EXF/2jbNZsHQIOMNfun3ympCZmZZUkSq7vauKJVKUS6f/5CD+msEUFlNaPum5b5GYGZ9S9Lh5I/wcxRyYZpeX03IzCxLhQwC6O3VhMzMsuS5hszMCs5BYGZWcA4CM7OCcxCYmRWcg8DMrOAKe9eQmVmedXJiTAeBmVnOdHpiTHcNmZnlTKcnxnQQmJnlTKcnxnQQmJnlzHQTYLZrYkwHgZlZzmxdu5TBOQPnlA3OGWDr2qVteT9fLDYzy5lOT4zpIDAzy6FOTozpriEzs4LLJAgkrZN0XNIJSdsa7JekbyT7n5B0ZbPHmplZZWzB6h0Ps3jbfaze8TD7joxn9tqpg0DSAHArsB5YBtwgaVldtfXAkuQxBtzWwrFmZoVWHWA2fmaK4K0BZlmFQRZnBKuAExHxbES8DtwNjNbVGQXujIpHgSFJ85s81sys0No9wCyLIBgBnq/ZPpmUNVOnmWPNzAqt3QPMsggCNSiLJus0c2zlBaQxSWVJ5cnJyRabaGbWu9o9wCyLIDgJXFGzfTkw0WSdZo4FICJ2RUQpIkrDw8OpG21m1ivaPcAsiyB4DFgiabGkC4DNwP66OvuBTyZ3D30QeCUiTjV5rJlZoW1cOcL2TcsZGRpEwMjQINs3Lc9snEHqAWURcVbSFuAgMADsjoinJN2c7L8dOABsAE4ArwGfmunYtG0yM+s37RxgpoiGXfK5ViqVolwud7sZZmY9RdLhiCjVl3tksZlZwTkIzMwKzkFgZlZwDgIzs4JzEJiZFZyDwMys4BwEZmYF5yAwMys4B4GZWcE5CMzMCs6L12dg35Fxdh48zsSZKRYMDbJ17dKOLTptZpaWgyCl6hJy1dWDqkvIAQ4DM+sJ7hpKqd1LyJmZtZuDIKV2LyFnZtZuDoKU2r2EnJlZuzkIUmr3EnJ
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"points_no_noise = points\n",
"points += noise"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 9,
"outputs": [
{
"data": {
"text/plain": "<matplotlib.collections.PathCollection at 0x7fc82d76da50>"
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGdCAYAAAAfTAk2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA1lElEQVR4nO3df3CU1aH/8c8mQFZt8mhIk11uKUSugjHWktCQxGK1SgiW+KO9ElRSvMNNC7dWEZ0qtTbEmTbFW7W21Fi9WKqhwL0i1YyYGio/dAhESIKNsZTa2ETdNfJrN7RNgsnz/YNv9rLu5ifZze6T92vmmXHPnufJedjZ2Y/nnOccm2mapgAAACwkZrQbAAAAMNIIOAAAwHIIOAAAwHIIOAAAwHIIOAAAwHIIOAAAwHIIOAAAwHIIOAAAwHLGjXYDRkNPT48+/PBDxcfHy2azjXZzAADAIJimqfb2dk2aNEkxMf330YzJgPPhhx9q8uTJo90MAAAwDK2trfrc5z7Xb50xGXDi4+Mlnf4HSkhIGOXWAACAwfB6vZo8ebLvd7w/YzLg9A5LJSQkEHAAAIgyg5lewiRjAABgOQQcAABgOQQcAABgOQQcAABgOQQcAABgOQQcAABgOQQcAABgOQQcAABgOWNyoT8A1tfdY6q2+Zja2juUHG9XVmqiYmPYew4YKwg4ACynqtGl0somuTwdvjKnYVdJQZry052j2DIA4cIQFQBLqWp0aXlFnV+4kSS3p0PLK+pU1egapZYBCCcCDgDL6O4xVVrZJDPIe71lpZVN6u4JVgOAlRBwAFhGbfOxgJ6bM5mSXJ4O1TYfC1+jAIwK5uAAiFhDnSjc1t53uBlOPQDRi4ADICINZ6Jwcrx9UNcebD0A0SukQ1S7d+9WQUGBJk2aJJvNpt/97nc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dfUV9mySncfqRcQDA0IQ04EyYMEGZmZmqrq72K6+urlZubm6/5+7atUt/+ctftHTp0gH/jmmaamhokNPpDPp+XFycEhIS/A5gtMXG2FRSkCZJASGn93VJQRrr4QDAMIR8iGrlypX67//+bz3zzDN65513dPfdd6ulpUXLli2TdLp35Zvf/GbAeevWrdPs2bOVnp4e8F5paal+//vf669//asaGhq0dOlSNTQ0+K4JRIv8dKfKF2fIYfgPQzkMu8oXZyg/PXhoBwD0L+QrGRcWFuro0aN66KGH5HK5lJ6erm3btvmeinK5XAFr4ng8Hm3ZskWPP/540GueOHFC3/rWt+R2u2UYhmbOnKndu3crKysr1LcDjLj8dKfmpjlYyRgARpDNNM0xt8iG1+uVYRjyeDwMVwEAECWG8vvNZpsAAMBy2GwTCBE20ASA0UPAAUKgqtGl0somv5WKnYZdJQVpTBwGgDBgiAoYYWygCQCjj4ADjCA20ASAyEDAAUYQG2gCQGQg4AAjiA00ASAyEHCAEcQGmgAQGQg4wAhiA00AiAwEHGAEsYEmAEQGAg4wwthAEwBGHwv9ASHABpoAMLoIOECIxMbYlDNt4mg3AwDGJAIOAABRgj3uBo+AAwBAFGCPu6FhkjEAABGOPe6GjoADAEAEY4+74SHgAAAQwdjjbngIOAAARDD2uBseAg4AABGMPe6Gh4ADAEAEY4+74SHgAAAQwdjjbngIOAAARDj2uBs6FvoDACAKsMfd0BBwAACIEuxxN3gMUQEAAMsh4AAAAMsh4AAAAMthDs4IYht7AAAiAwFnhLCNPQAAkYMhqhHANvYAAEQWAs5ZYht7AAAiDwHnLLGNPQAAkScsAeeJJ55Qamqq7Ha7MjMz9frrr/dZd+fOnbLZbAHHn/70J796W7ZsUVp
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(points[:, 0], points[:, 1])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png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DdDSLHUlRCbrOAt08eLFUpdkcxwJEvXUP7YDeW8ADdWAbygwOx2ImCd1VURGudJpEMZwJEjUE2UFwKE/tgYgAGivALsfBap/kbYuIiMYgL9hCBL1xJkvOre1NAHf77F9LUQmaGxsRGJiIgPw3xiCRD0h6+KfkMy2ZRCZSi6X49VXX8Xdd9/t8gEIMASJembcf3Ruc5cDox+2fS1EJvrd736Hs2fPunwAAgxBop4ZHA88uBno8+9zqvyHAQs/BvyHSlsXUTtqtRpz5szB1atXxTa5XC5hRfZDJrSdHUkirVYLpVKJ2tpa+Pr6Sl0OOYKWZuBWLdCrLyDjsVCyH+0nwSQnJyMnJ0fqkmzC1O9xniJBZAlu7oC3v9RVEOnpOAv0gw8+kLoku8PDoUREToinQZiGIUhE5GQYgKZjCBIROZnHH3+cAWgihiARkZPZvn07kpOTGYAm4MQYIiInoNPpoFAoAAAhISEuMwu0pyQdCRYUFGDu3LkICQmBTCbD3r17jfbPz8+HTCbrtJ0/f16vX1ZWFiIiIqBQKBAREYHs7GwrvgoiImmp1WqMGTMGn376qdSlOBxJQ7C+vh7jxo3Dpk2bzHrcTz/9BI1GI25hYWHifYWFhVi0aBFSUlJQWlqKlJQULFy4EN9++62lyyciklzbJJgLFy5gzZo10Ol0UpfkUOzmZHmZTIbs7GzMnz+/yz75+flISEjA9evX4efnZ7DPokWLoNVqcfjwYbFt9uz
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"persistence.persistence(points)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 14,
"outputs": [],
"source": [
"dataset = pd.DataFrame(points, columns=['x', 'y'])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 7,
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAGwCAYAAADRxd6MAAAAOXRFWHRTb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GudJpEMZwJEjUE2UFwKE/tgYgAGivALsfBap/kbYuIiMYgL9hCBL1xJkvOre1NAHf77F9LUQmaGxsRGJiIgPw3xiCRD0h6+KfkMy2ZRCZSi6X49VXX8Xdd9/t8gEIMASJembcf3Ruc5cDox+2fS1EJvrd736Hs2fPunwAAgxBop4ZHA88uBno8+9zqvyHAQs/BvyHSlsXUTtqtRpz5szB1atXxTa5XC5hRfZDJrSdHUkirVYLpVKJ2tpa+Pr6Sl0OOYKWZuBWLdCrLyDjsVCyH+0nwSQnJyMnJ0fqkmzC1O9xniJBZAlu7oC3v9RVEOnpOAv0gw8+kLoku8PDoUREToinQZiGIUhE5GQYgKZjCBIROZnHH3+cAWgihiARkZPZvn07kpOTGYAm4MQYIiInoNPpoFAoAAAhISEuMwu0pyQdCRYUFGDu3LkICQmBTCbD3r17jfbPz8+HTCbrtJ0/f16vX1ZWFiIiIqBQKBAREYHs7GwrvgoiImmp1WqMGTMGn376qdSlOBxJQ7C+vh7jxo3Dpk2bzHrcTz/9BI1GI25hYWHifYWFhVi0aBFSUlJQWlqKlJQULFy4EN9++62lyyciklzbJJgLFy5gzZo10Ol0UpfkUOzmZHmZTIbs7GzMnz+/yz75+flISEjA9evX4efnZ7DPokWLoNVqcfjwYbFt9uz
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"persistence.persistence(points_no_noise)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 15,
"outputs": [
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAARMAAAEGCAYAAABGsnGQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAi8UlEQVR4nO3deXxU9fX/8dcJBAIhCiQY1AQIsgmCrFrUFqyAgYK1LV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FVgmIutFZFpDG1pHP+OF0BjJI488wpEjR/wuJy74ftewiFxIIEwuCFt8vqp+KiKnAMtF5IPgnk4tqjqfwCESw4cPT94bI4xrag62tmvXzu+S4oKveyYiMgh4DPi6qu4LLVfVT4P/3QO8QKCZuTGes7M2zednR79uwPPANar6YdjydBHJCP0OjAPqPCNkjNu2bNlCt27dLEiawbMmXOEd/YB/U6Ojn4g8BnwL2BncpFxVh4tITwJ7IxA4DHtKVX8ZyXtaEy7TXGVlZbRv3x4InApOS0vzuaLY1FATLs/GTFT1ikbWfx/4fh3LtwNn197CGG84jsO3v/1tFi1axPnnn29B0kyxcjbHGF+Exkg6depEz549/S4nrlmYmKRlg63usjAxSWnLli0WJC6zMDFJqW/fvtxwww0WJC6yMDFJZfXq1XzyySe0atWKu+++24LERRYmJmkUFhYyduxYpk+f7ncpCcnCxCSFwsJC8vPzyc3NZd68eX6Xk5AsTEzCCw8SGyPxjoWJSWiqyi233GJBEgW+3zVsjJdEhJdeeony8nK6du3qdzkJzfZ
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Decoding... done\n"
]
},
{
"data": {
"text/plain": "(20, 1)"
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"param = decoding.cohomological_parameterization(dataset)\n",
"param.shape"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 19,
"outputs": [
{
"data": {
"text/plain": "Text(0, 0.5, 'Cohomological parameter')"
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGwCAYAAABVdURTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAA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R7E/ZIFNWgdbdiIiIcynceJASm50JH/zGlgM5RIcGMP+W7tSu5Z69bE7Fz9eH8KC/FhVrakpERJxM4cZDGIbBw19sYcXOIwT5+zB3RALN6oSaXdYZi9KOKRERcRGFGw8xe+VuPlybisUCL93YhS5Noswu6axEqteNiIi4iMKNB1iUvJ9nl+0EYPqV7RnYvr7JFZ29su3gmpYSERFnU7hxc2t2ZXDfp5sAuK1vc0b0amZuQU6iRn4iIuIqCjdubMehHG5/bz3FNoMrOjXggUvPMbskpyk/GVzTUiIi4mQKN27q6PEibpm3jtyiErrHRTNzSGd8PKiXzemUT0sp3IiIiJMp3Lip/yzZTlp2Ic3rhvLGsHiP62VzOmXTUpl5mpYSERHnUrhxQ2t2ZbDwtwNYLPDckM7lO4u8iaalRETEVRRu3ExRiY2HPt8CwL97NPX4Ld8nE6Wt4CIi4iIKN25mzsrd7MnIo25YIPde2sbsclwmKlS7pURExDUUbtzI7iPHmb1iNwCPXtmu/IgCb/TPaSm73TC5GhER8SYKN27CMAweWrQFq83OBa3rcnnHBmaX5FJlC4rtRunp4CIiIs6icOMmFv52gJ/3HCXI34cnB3fAYvGebd+VCfTzJTSgdAeY1t2IiIgzKdy4gWN
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(np.roll(np.arctan2(points[:, 0], points[:, 1]), 5), np.roll(param, 5))\n",
"plt.xlabel('Phase')\n",
"plt.ylabel('Cohomological parameter')"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}