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.

956 lines
253 KiB

{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Decoding population activity"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"**Imports**"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"from sym_model import Population, sigmoid\n",
"\n",
"import sys\n",
"import seaborn as sns\n",
"import umap\n",
"import numpy as np\n",
"import pandas as pd\n",
"from matplotlib import pyplot as plt\n",
"sys.path.insert(0, './model')\n",
"\n",
"from model import decoding\n",
"from model import persistence\n",
"from utils import get_orientation_phase_grid"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Getting the data\n",
"\n",
"**Sampling the activity using the model**"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"limit = 500\n",
"# n_theta, n_phi = 18, 24\n",
"n_theta, n_phi = 36, 72\n",
"# n_theta, n_phi = 9, 12\n",
"step_phi, step_theta = 360 // n_phi, 180 // n_theta\n",
"N = 40 # number of cells"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0. 0.] [3.05432619 6.19591884] (2592, 2)\n"
]
}
],
"source": [
"grid = get_orientation_phase_grid(step_phi, step_theta)\n",
"grid = grid.reshape((-1, 2))\n",
"print(grid[0], grid[-1], grid.shape)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"population = Population.random(N)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"phi_deg, theta_deg = grid[:, 1] * 180 / np.pi, grid[:, 0] * 180 / np.pi"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# res = population.sample_responses(limit, custom_grid=grid, use_sigmoid=False)\n",
"# res, phi_deg, theta_deg = res[:, :, 0], res[:, 0, 1], res[:, 0, 2]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"res = np.abs(population.response_func(grid[:, 1], grid[:, 0]).swapaxes(0, 1)) * 10"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"phi_reorder = sorted(list(range(len(phi_deg[:limit]))), key=lambda x: phi_deg[x])\n",
"theta_reorder = sorted(list(range(len(theta_deg[:limit]))), key=lambda x: theta_deg[x])"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFoAAAAVCAYAAADGpvm7AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFAUlEQVRYCe2Z4XUUNxCAz/dSwIVUwLkDCBVgdwBOBeAOyE/7Xx50AOkg0AFQAcEd4A5irgPn+2SNLO3qzB4+Hkde5j3tjEYjzWhmdqS9m11eXs7qdnJysqz7/9Otf6b4o+fD+ayC09PTZ3TvVazJJHNH8+AtaMvJi/x3BJfZl2VHe0ZIYOAR6AH498TID/o6Kni/Ql/Yh3+WRRKi/xliQQu+tHCfsdUVefWk/7Lq34F+0pGZpLdaZ6sk9pg4x+Dj4cLwnmfeP+B92nN457UcfZN2BX4lPzmajk55D74vM4C+m30JPqx4KnGRQ/jvKv4naJ3mWip9Q/sDmeJkaMc+0lzzB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LYEukIOzxk56Z85oJ/jjSALx0NWmY151mY8jqnLjyGUUdOvoMRy4yIjah7iajNtGrOVlecvQDlsxNgLVMKPfiWybo0A/w47cZ7XYPK5qHn0lavhegG8i2HcePSjrUm0DJqkb6B+hgu2VpVOe/p+nYZMDegvfn2RAjVF7772ncLXR7jphluwS+4ekNTo7GQA+1ct/dJUun2IL9vs69O+yU6d9EBpvMZn2aLgyR0Srz0BoeePJ/BHjKhuJg3hV79WWpEuUfFq3LUfBE3TWjd8V5k+zAf964/JmifMD8C7QsJSruRSwGAAAAAElFTkSuQmCC",
"text/latex": [
"$\\displaystyle \\left( 2592, \\ 40\\right)$"
],
"text/plain": [
"(2592, 40)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"res.shape"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"res_reshaped = res.reshape((n_phi, n_theta, -1))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/lib/python3.10/site-packages/seaborn/distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).\n",
" warnings.warn(msg, FutureWarning)\n"
]
},
{
"data": {
"text/plain": [
"<AxesSubplot:ylabel='Density'>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD4CAYAAADmWv3KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXuUlEQVR4nO3de3BcZ3nH8e+zq9XdsmR77diWHedGAqaJE5SENAMzOEACpNCZMp1AQwe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bSCUn/wlWNdcB8OqAevAiUtmqOuDXtzWcsr22JkFTXQ29gwp4EalsVRvw+18bpH2agAdoa0zx2uDYIlckIhKtqgz40fEsh/uHaZ/yBWtBa2OtevAiUvGqMuAP9Q3hDhtO14NvSNE7OEY2q18YFJHKVZUBX5giedoefFMt41nn2IAueBKRylWlAT8IcPox+IYUAAfyHwQiIpWoSgN+iGTCWLu8ftr9rU21E68TEalUVRvwZ7TUU5Oc/vQnevC9CngRqVxVGfAHTjMHvqAulaQhlZwYyhERqURVGfCH+odYd5rhmYK2xpTG4EWkogULeDPbYGYPmtluM3vGzG4M1dZcZLPO4b5hzlh++h485ObCawxeRCpZyB78OPApd3898GbgBjN7Q8D2SvLqwChjGWddawk9+N4h3DUXXkQqU7CAd/dD7v54/vFxYDewPlR7pTrcl1sl8oyWmQO+tbGWwdGMliwQkYq1KGPwZrYJuBh4dJp928ys08w6u7u7g9dysC837LJ2liGatkbNhReRyhY84M2sGbgXuMnd+6fud/f
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.distplot(res.ravel())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Plotting joint tunings"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"phase_linspace = np.linspace(0, 360, n_phi)\n",
"orientation_linspace = np.linspace(0, 180, n_theta)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEVCAYAAADJrK/3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBI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L2vfYBMr7C8InKBrS/NpbVPa9Qq/RzrmTlRez1CXUkOLVqjTglpn6gPdAywoiKfTG/kp1pXkkO7P6C93yqtDI0G6fCPzpiowWr+0Dbq1JC2iXpfu5/f7eng9eP9nDZDswdYiXrC7v1WKl3MNuIjbGlpLs09wxhjEhWWilFaDs+bCBlu+I8XGB6bAGBdffGM960rsTpVWvtGdJiSShvRJOr60lwGRoOcHB6nJO/UDkflHmmZqHsGRxkem+DWy1bw9rNrZuxIBKtGDeEhemUJilApZwwExtl2rI+n7fk9GstmqVHb25p6hzVRu1xaJupwM8aGhpI5T2SpKcpBBFq0Q1GlgX994iDfffYoAMvL88jJ8s5434bSN4borZ/lV6dKvrRM1O1+K1HXFPnmvG9WhofqQp8O0VNpoalnmMayXO68cQO19q/FmYQT9evH+9lQX0xtcQ4enQLVldKyM7HdrlFXFc6dqAHqS3SInkoPHX7rlPB19cWU52fPet+cLC9Linzc9cwRLv7mU/zLEwcTFKWar7RM1G39ATK9QlmU7W51JTkc10St0kC7P0B1lBUUgLs+sIl/+tN11BT5OGifHKbcJy0TdYc/QGWBL+qfcXUlObT1jzCuY6lVCgtOhOgaGKU6iia/sLW1RfzJOXUsr8ibbDJU7jNnohaRehF5SkT2ishuEbktEYE
"text/plain": [
"<Figure size 432x288 with 6 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 2)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Marginal Tunings - By Phase')\n",
"for i in range(6):\n",
" ax[i].plot(phase_linspace, res_reshaped.mean(1)[:, i])"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEVCAYAAADuAi4fAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6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2zTzxcHU2OmSL6ESv1cjJ9Hx+i0sl5ngGR5NzSUjNpbi03OLtW/l50DHIhx6tfBnSKZCo0Ga4uehLRZr1lZcr9p7OYsexDPaezmJfUibH0/Mt3l4EWvk1oUdrXwa2b87ADgF0DvJGRBow6trRiV67JKUUsSfO8/WeM2yIS+NYWh4Awb4edG3pw5BOAXRq4U1YgBd+TVzxNtfiXZ2cyC0y1e5zC0s5l11IXEoOccm5HE3OYe6GRGb+moCXmzMDOzTnmm5B3Nyrpa7xaw2qpKycbYkZ/HDgHOsOniM5uwiA1k2b0LO1H/dEt6V9gBcBPu4EeLvT3NsNN2cnisvKKS41Pc5lF3IyPZ/j6XkcS8sj5vh5fjiQDECAtxvXdAvizsg2RIc2w8nJNpK+Tc4ZGx0drXRbprFSc4pYvTOJVTGnSEjNw8PViYHtm3N550Au7xxI+wCvOtVccgpL2JyQzoajqWyIS+VURgFNXJ25qWdL7uvblr5hzRqsZiQisUqp6AbZ+SXocm2clJxClm87ybJtJ0nNKaKJqzNXdA7kuu5BDOkUSKCPe532fyojny2J6WyKT+PHg8nkF5fR1r8Jd/RpzfB+IbRq2qSeXknVLlWudaLX/uRYWh4z1sfz5a7TlJYrokObcW90W27u1RIv94Y5AVRKsftUJqtiTvH1nrPkFpXSJciHqVd15KaeLXGu51qRTvSNx/7TWczfmMi3+85SUqa
"text/plain": [
"<Figure size 432x288 with 6 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 2)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Marginal Tunings - By Orientation')\n",
"for i in range(6):\n",
" ax[i].plot(orientation_linspace, res_reshaped.mean(0)[:, i])"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAATQAAAEVCAYAAABucRkMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb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XWqyznjbaG+KDRbitv0yLqjv1az0a/ZKiu2yjFrWUNhHLkEAkIbLGOfc9CW7DY9dsc9DkYl7bCA/37R/4HEWbMUghZU8LXF1oK0XTiFI/pBwoygTeLHHNhGMI3B1RnDumC36PNqtk5mAh6h0pwNM6YnLVYCXg2V5uz4AdfdJlebLa5VG9ysB4u9+VVGNLau8knr6jDoeZLVoSKx1Z3Rhd5AKBSKQF46BmXLVllxqTfkQjFmI6vomZZcPF4NrUZBK80AIwFVwQWDd2mw5zyyHIJWWfpfKskPoNhVejuB3o0Gu1+jVRdXUdXY/YpeEeOSbG3Ihob2Rsl4reBLa5s8338U23cUhaPMHXnmsSZgRKNoBhNHONuMtsnw4zTKOU+ywuMer/FFgYrBOEM2ysluFjE8I8vwg5xmK6O6aKiuKPUVT7Fd8YaLezy9+RrPDK7x5vIaT+XXedSO2baWgRTkEu1Wa8t+aHjVCy+4Lb7aXuFL1SN86eAyX13s7ScWwFIImnHQu67kQygOAsWeww5bZFyjzsWcS+eQcUN2kFNYAc2wrSEbgxsKrmfxPUMocupCqTJFMz06IhZAvCCtYBqhbMBWKfVpXmj3Z+rOOsGtdfi6QOdlCCp4FVq1eAwNlhah1UCQgFchoLTqaVVpsQRii80Fgwvph+o8shSCZhvYfMFhq4AdOeyoQYYVjMYxbgnQusEcjDBA2XqycYH
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 3)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Joint Tunings')\n",
"for i in range(9):\n",
" ax[i].imshow(res_reshaped[:, :, i], cmap='viridis', extent=[0, 180, 0, 360])"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fefe9397f40>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw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Jq9W+Q60JfVZWZXUTnJekw1K1iohWpqnaR3J6NNwH4BwDPQt0qJlqRQw43A/gayTI6QXvIzL5P8hdQt4qJVaSq+g067duunT+HPrtVyPjQJ8cSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBLSz33HyyR/RfL72WN1q5hg/exx7gVwwj1Wt4oJVrTpwB4A7wPwJTd9FzpdKpD9+09rumUy0orucT4P4BPoumVWsW4VMp6KXDv+fgBnzOzxyArU5mQ8Fbl2/A4AHyD5XgB1AFtJfh1ZtwozO/3nulWY2f0A7geArdy5Nr1SZcOtuscxs0+b2R4z2wfgbgA/NrMPQ90qJtogn+McBXCI5EkAh7LHMiH66qxuZj9Bp7GSulVMOH1yLCEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIYWuciD5OwDzAFoAmmZ2gOROAP8JYB+A3wH4kJldWJ/NlFHTzx7n78xsv5kdyB6rW8UEG+SlSt0qJljR4BiA/yX5OMkj2Zy6VUywoldy3mFmp0i+AcAjJJ8tuoIsaEcAoI7NgU2UUVRoj2Nmp7J/zwD4LoCDyLpVAMBq3SrM7ICZHahiam22WjZckf440yRnro4B/COA30LdKiZakZeqmwB8l+TV5b9hZj8keQzAQyQ/BuD3AD64fpspo2bV4JjZiwDe2mNe3SommD45lhAFR0I
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.imshow(res_reshaped[:, :, 0], cmap='viridis')"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## PCA"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"res_df = pd.DataFrame(res, columns=['x' + str(i) for i in range(N)])"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"from sklearn.decomposition import PCA\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWYAAAEFCAYAAADQRk3iAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAA5EklEQVR4nO2deZxU1bHHv8W+7zuoCKKIC6iAu6A+I5L4FBP3uEWjxhgTE/NMor68aDQaE5cYlYfGqIlxRRQVt6e4b6AisgjihiOIrLINwszU++PeCe146k53z53pbqa+fO7n05y6dc/pZU7fPlW/U6KqOI7jOMVDk0IPwHEcx/k6PjE7juMUGT4xO47jFBk+MTuO4xQZPjE7juMUGT4xO47jFBk+MTuO4+SJiNwmIl+IyCzDLiLyFxFZICIzRWT3bK7rE7PjOE7+3A6MSbAfBgyKjzOBm7O5aOoTs4icIiLvx8cpaV/fcRynWFDVF4AVCaccAdypEa8BnUSkd23XbZbWAAFEpAvwW2A4oMCbIjJZVVem2Y/jOE6J0Bf4NOP/ZXHb4iSnvCdmERkB/A0YCTQF3gDuAZ5W1RXxOU8T3ebfnXStTcs+NHXhG//ym2B7xytfNK/XqlkL07ahYmPSUIoWSbDd1ONA03bOF1NN24TuYb/PEz4Vlyy2r2dxcM9dTdvMNZ+YtlVfrQu2V2mV6TOl4z6m7ah1003b9h36BttfmHCk6bPk4sdN23Zz5pg2i/YtWpu2j4/uH2zvetfcnPtJIulvZ2P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69QqnKa4aoOdV97/bTvAt2f3HYLtry+1fX7f25Y
"text/plain": [
"<Figure size 432x288 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.heatmap(res_df.corr())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"Let's take 6 components"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"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>PC1</th>\n",
" <th>PC2</th>\n",
" <th>PC3</th>\n",
" <th>PC4</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.152136</td>\n",
" <td>6.882894</td>\n",
" <td>-1.545937</td>\n",
" <td>-0.027478</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1.081195</td>\n",
" <td>6.691970</td>\n",
" <td>-1.446043</td>\n",
" <td>-0.080447</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.996579</td>\n",
" <td>6.447147</td>\n",
" <td>-1.338007</td>\n",
" <td>-0.133982</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.937118</td>\n",
" <td>6.268196</td>\n",
" <td>-1.259540</td>\n",
" <td>-0.170500</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.938863</td>\n",
" <td>6.362411</td>\n",
" <td>-1.261050</td>\n",
" <td>-0.188440</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" PC1 PC2 PC3 PC4\n",
"0 1.152136 6.882894 -1.545937 -0.027478\n",
"1 1.081195 6.691970 -1.446043 -0.080447\n",
"2 0.996579 6.447147 -1.338007 -0.133982\n",
"3 0.937118 6.268196 -1.259540 -0.170500\n",
"4 0.938863 6.362411 -1.261050 -0.188440"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N_COMP = 4\n",
"pca = PCA(n_components=N_COMP)\n",
"pca.fit(res_df)\n",
"data_pca = pca.transform(res_df)\n",
"data_pca = pd.DataFrame(data_pca, columns=[f'PC{i+1}' for i in range(N_COMP)])\n",
"data_pca.head()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFAAAAAVCAYAAADRhGlyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEVUlEQVRYCe2Y7VGUMRCAD8YCTqyAowM/KhA6AKwA6EB/wj9HOgA7EDpQK0CuA+hApAN8npDEvLnc+Z7cOTLjzuR2s9nsbjabTd4b3N3dDcp2eHg4Kvv/6V/xacVmdVDA0dHRW7rPC1ZvkrkT8+ANaaPeSv59wVGMUfZ0xQwTGNgGvQK/C4z4Q98AJN5L6Bv78MdRJCD6PyCGtMSXFl4wdntP3v/SPyn6a9B7DZledgs9CyXxx4Q4AB+UiumbZLfgU/khgHRc7FfwC5kJ6LuIE/BWwfsArZIt+F8K/hW0wVDXNe2c9h6ZHDxoxy5p6jwGD8A6+pVmoJ0nr7dd5ZcB+OB6xuCdWj881/AafPskDhqUMivSHPn1Dph9+/DPaE+TILhprBiX/EhbY34Ingxo532D1H7aqHnsqmahgD8myCzQ1+DjapTaZVJIyWrWJv0rxsycEsy8P6lvlomQZaUyaI/9ZmFn0XYrc9O7+OCJ8NTkk1NLx1g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
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_pca.shape"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## UMAP decoding"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# reducer = umap.UMAP()\n",
"# embedding = reducer.fit_transform(data_pca.to_numpy())"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# %matplotlib notebook\n",
"# plt.scatter(\n",
"# embedding[:, 0],\n",
"# embedding[:, 1])\n",
"# plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# embedding.shape"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Cohomological decoding"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [],
"source": [
"step = 5"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAasAAAGwCAYAAAAXAEo1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABDdUlEQVR4nO3deXhTVf4/8HeSNumeQktLCwUKZYeWpWVVgRaQArKMOIrIojgjiqiDiizOT+TrWLdxRdxQFAdBQEFkEMpaREeBQhMKimy1LIXSAt2bNsn9/RGaNjRt0zbJvUner+fJY3NyknyIkHfPveeeIxMEQQAREZGEycUugIiIqCEMKyIikjyG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SpQv27Nkjdikuh2FFROQEVZMpsrOzsWzZMrjwQS1RMKyIiBzs1ll/mzdvhkwmE7ssl8KwIiKyJ6MBKLoCGPQAOD3dXnhRMBGRvRzfBOx4Hii8AASEQxs1C4lz32RQ2QHDiojIHnJ/BzbOBgSD6X7xFbz36lLk51cyqOxAMocBU1JSIJPJ8NRTT4ldChFR42VurA6qm1aM88GSewcyqOxAEmF16NAhfPzxx4iNjRW7FCKiZskuMMJ4c6aft0KGl2bczqCyA9HDqri4GNOmTcMnn3yCFi1a1NtXp9OhsLDQ4kZEJAm974EmF+j3UQke+2/5zcCSAbH3il2ZWxA9rObOnYtx48Zh5MiRDfZNSUmBWq0236KiopxQIRFRwzSXypG0VkB+mYAjOQaUqloDk1YAbePFLs0tiDr
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Decoding... done\n"
]
}
],
"source": [
"param_1 = decoding.cohomological_parameterization(data_pca[::step]).to_numpy()"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fefd8cc6fe0>"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxNUlEQVR4nO2df7QfVXXoP/t+8yXcBMgFubVwSUhwIQhFBa5Am1aFKuHHs0RZLkV9Vl/7qK321b6WZ2x5aquW9NG+iksqpTxqrVXaGo1UaFPbyHI9+lBuBERElIJALlQCJhRIJDc35/0xM5e5k/lxZr5zvjNnvvuzVla+d36c2XN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pSPoLBdFURQLfNgJSQ16g/igIIp/qF7VTxRMLoo/FAWTA1qVt2rQG8IXBfGRUTZoqldu8CWYnPrQG2LUt8pyxaiH5VW9coMvweTUoDeELwriGz4ZNBcbfKheucGXYHJq0C1wUfB8URDf8MWguepJqF65wZdgcp0z6HUbX1cFzxcF8Q1XBq1uvXLVk3ClV6O+XaAvkSE7NSjqYkDI1WCIRht0w2XrTlikAzC4QXOhVy5364F69UoHWgN8CCbXKYPuwvi67ML7oCC+4cKgudArl7vT161XvszwUDpm0F0YX5cFT3FD3QbNhV656Em4wpdxCaVjPnQX/lP1dSsu9MoXnyzoQKtPdKqF7qLVo75uxVVr2heXm0+9iVGnUwbdlfH1peApbhj1Sn3U398nxBhTfJHIecBVQA+4zhizMXF+BfAZYBVBJfFHxpi/yEtzenrazMzMVJVbyWCUl70ryiggItuMMdNp5wpb6CLSA64GXgtsB24XkRuNMd+JXfZu4Dv
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"%matplotlib inline\n",
"plt.title(\"Parameter 1 of CP vs. phase\")\n",
"plt.scatter(phi_deg[::step], param_1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Orientation is decoded:"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fefd8cc6230>"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgX0lEQVR4nO3df5RcZZ3n8feHToItBhsksBISAixGycAA2wN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qZWYdwQTcz6xAu6GZmHcIF3cysQ3iWyxj1ren3tEUzKxQX9DHoW9PPRcvWMrQzAOgfGOSiZWsBXNTNrGU85DIGl9y8bqSYDxvaGVxy87oWZWRm5oI+Ji+8PFRX3MysGVzQzcw6hAu6mVmHcEE3M+sQLuhmZh3CBd3MrEO4oJuZdQgXdDOzDuGCPgYnHrZvXXEzs2ZwQR+DpeedsEvxPvGwfVl63gktysjMLGdBl3SqpA2SNkpamLH91ZJ+KGmtpPWSPtj4VIvl3b0zmd7TjYDpPd28u3dmq1Mys91czcW5JHUBXwNOAbYAd0taERG/LWn2MeC3EfF2SdOADZKWRsTLE5J1i/Wt6efi5esY3J4c6t8/MMjFy5N1XLw4l5m1Sp4e+nHAxoh4OC3QNwFnlrUJYKokAa8CngF2NDTTAlm8csNIMR82uH2IxSs3tCgjM7N8BX06sLnk+pY0VuqrwBuArcA64OMRsbP8jiSdL2m1pNXbtm0bY8qtt3VgsK64mVkz5CnoyohF2fV5wL3AgcDRwFcl7b3LjSKuiYjeiOidNm1anakWx4E93XXFzcyaIU9B3wLMKLl+EElPvNQHgeWR2Ag8Ary+MSkWz4J5s+me3DU
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 1 of CP vs. orientation\")\n",
"plt.scatter(theta_deg[::step], param_1)"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"data_without_features = decoding.remove_feature(data_pca[::step].to_numpy(), pd.DataFrame(param_1))"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true,
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQMAAAEGCAYAAABhHPB4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNp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t7F27VoNgpOgYaCCV9cL3RYEul5Q48dcLhdJSUksX74csC4lqobT0wQVvMY8D+2SIHcX9Lm8SjhY3PsIkpKSbCjSOTQMVPCKjIKhf6h1tXYW+paeJqiQtHHjRg0CH9MwUCEpOTmZu+++W4PAhzQMVEhZuXIle/fuJTw8nCeeeEKDwIc0DFTIyMjIYPjw4UyePNnuUhxJw0CFhIyMDEaOHEliYiKzZs2yuxxH0qsJKvC2fGrdWRiXDANvhbC6/ya5B4H2EfiPhoEKrK2fwbsTKpcPZ8GIx2r9uDGGBx54QIMgAPQ0QQXWz1/WvVyFiPDRRx/pcOYBoGGgAisuue7lMi6Xi+uuu47CwkJiY2Pp2LFjAIpr2vQ0QQXWgFvgyC+w9XOI62nNe1iF+52Fhw4d4tRTT7Wh0KZHw0AFlggM+5P1U4OqtxhrEASOniaooKHPGthLw0AFjejoaPr27atBYBMNA+Vf2Vth3TzYX/vA2FlZWQAMGDCAFStWaBDYRMNA+c+Ob+Dv58OCW61/bqt+GdHlctGrVy9mz54NWJcSlT00DJT/fPcqlBRYr0uLYPVsj9XufQRjxoyxoUDlzhFXEwqKS3jlm+1k5eaT1jeei3rqNG1BIap1rcvaWRh8HNEyeHDBep76fCvvfbeHm/+xmtU7cuwuSQFc/Efo0Nd6HdcbUv8MQHZ2Npd
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Decoding... done\n"
]
}
],
"source": [
"param_2 = decoding.cohomological_parameterization(\n",
" pd.DataFrame(data_without_features)).to_numpy()"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fefd8be2d40>"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRT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oEHo16+fwWPk5+dj6tSpCA4O1l5j9uzZUKlU+Pnnn/ViIyIikJiYqP0+KCgIoaGhGDJkiLYHBABiY2MB/D400NDQgK+++gq33347AgIC0NLSov2aOHEiGhoaLHYrnzx5Ej/99JN23kPba5SUlODEiRN659x5551mr2nKF198gYULF+JPf/oTHn74YYvxX3/9NcaOHYtevXrpHZ8zZw7q6ur0/hq2N0v3jDEDBw5EYmKidsgNAI4fP46DBw9i7ty52mPDhw/H0aNH8dBDD2HXrl2oqalpdzs1vQZte7P+/Oc/o1OnTvjqq6/0jpu6f9v6/PPPER8fjyFDhujdI+PGjdMbXtG45ZZb0KVLF+33YWFhCA0NNTms1dbp06cxY8YMhIeHa///jBkzBkDra9geX3/9NeLi4jB8+HC943PmzIEQQvvaaUyaNAne3t7a7wcNGgTA9NAcuQ8O01CH2LBhA2JjY+Hj44OwsDC9bt2DBw8iNTUVN998M9auXYuePXtCLpdj27ZteP7551FfX693LWNdwsXFxUhOTkb//v3x+uuvIzo6GgqFAgcPHsTChQsNrhEUFGRwDblcbnBcLpcDaE1CAKCiogItLS1488038eabbxp9ruXl5WZfi0uXLgEAHn/8cTz++OOSrmGqG9ycXbt24Y477kBKSgo+/PBDs/M
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 2 of CP vs. orientation\")\n",
"plt.scatter(theta_deg[::step], param_2)"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fefea7e8640>"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAA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/jB/96EcAgLvuusvd5TB79mz3Np9++ilGjRqFjIwMpKSk4Oqrr8Ybb7zhlY7crP/RRx9h0qRJaN++PVJTU9HQ0KB4XjMzMxWDlL59++LMmTM4efKk4vc87du3D6NHj0bbtm2RkpKCXr164f/+7//89qmxsRGLFi1yH1sgq1evxt69ezFz5kyvQMTT8OHDkZqaGnS/fO8ZX+fPn0eHDh0wYcIEv7+dOnUKLVu2xIwZMwAALpcLTz31FC6//HK0bNkSbdq0wVVXXYXnn38+6D4EYrPZMG3aNLz44ou47LLLYLfbkZeXh5UrVypuX1dXh6lTpyIzMxPt2rXDzTffjG+//dZrm1WrVqGoqAjZ2dlo2bIlevTogYcffhinT5/22u7QoUO47bbb0LFjR9jtdmRlZeGGG27w6x5ctWoVCgsLkZaWhlatWmHo0KHYvXu3ruMla2PLCMWNr776CgDQvn17AMDXX3+NX/7yl+jSpQsAYPv27bj//vtx7Ngxv66FXbt24cCBA3jssceQm5vrbrI/ePAgbr/9duTm5iI5ORl79uzB73//e3zxxRd4+eWXvX6jsrISd911F373u9+hU6dO+Mtf/oJJkybh6NGjeOutt/DII4/A4XBg7ty5GDNmDA4dOoSOHTsCAPbv34/+/fujS5cu+NOf/gSn04n169fjgQceQFVVFWbNmoXevXvjlVdewV133YXHHnsMI0aMAAB06tQJALBx40YMGzYM11xzDRYvXgyHw4GVK1di7NixOHPmDCZOnOi1v5MmTcKIESPw6quv4vTp036tCKFs3LgR7du3R4cOHYJu95///Af9+/dHhw4d8Oc//xnt2rXD8uXLMXHiRBw/fhy/+93vMGLECJSWlqKwsBC33HILHnzwwaC/+dFHHwEAxowZo2mfffneM76SkpIwfvx4LF68GAsWLEB6err7b6+//jrq6+tx1113AQDmz5+P2bNn47HHHsN1112H8+fP44svvsCpU6d079+aNWuwceNGzJ07F2lpaVi4cCHGjRuHFi1a4JZbbvHa9p577sGIESPw2muv4ejRo/jtb3+L8ePHY8OGDe5tvvzyS9x4442YPn060tLS8MUXX2DevHnYsWOH13Y33ngj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lpKRg0KBB+Pjjj8M+drIWBiMUs5YtW4ZPPvkEu3fvxrfffovPPvsM1157LQBgx44dKCoqAgAsWbIE//rXv/DJJ5/g0UcfBdA8YNNTdna23+8fOXIEAwcOxLFjx/D8889jy5Yt+OSTT9zjOHx/IyMjw+83kpOT/T5PTk4G0ByEAEB1dTUaGxvxl7/8BUlJSV7/3XjjjQCAqqqqoOfi+PHjAIDf/OY3fr9x7733Kv6G0jGHsn79etx8880YMmQIVqxYEXRch6y6uloxLTlAq66u1rwfctdbeXm5pu8Fu2eCmTRpEkpLS/HFF18AaH4rx263Y9y4ce5tZs6ciT/+8Y/Yvn07hg8fjnbt2uGGG24I65Vbp9MZ8DPf89auXTuvf8uDiuX79Pvvv8fAgQPx73//G0899RQ+/vhjfPLJJ3jnnXe8trPZbPjnP/+JoUOHYv78+ejduzfat2+PBx54AHV1dQB+uN9+9KMf+d1vq1atCnm/EvnimBGKWT169HC/GeFr5cqVSEpKwt///nekpKS4P1+9erXi9koP1dWrV+P06dN45513kJOT4/7
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 2 of CP vs. phase\")\n",
"plt.scatter(phi_deg[::step], param_2)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.5 64-bit",
"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.5"
},
"vscode": {
"interpreter": {
"hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a"
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}