Skip to content

Commit 83d0bdd

Browse files
committed
add slides, small changes
1 parent 302b006 commit 83d0bdd

3 files changed

Lines changed: 13 additions & 25 deletions

File tree

Duke fpl talk.pdf

1.93 MB
Binary file not shown.

neuro.ipynb

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@
726726
"outputs": [],
727727
"source": [
728728
"from sklearn.decomposition import PCA\n",
729-
"from scipy.stats import zscore"
729+
"from sklearn.preprocessing import RobustScaler"
730730
]
731731
},
732732
{
@@ -746,8 +746,9 @@
746746
"source": [
747747
"pca = PCA(n_components=3)\n",
748748
"\n",
749-
"zscored = zscore(np.sqrt(temporal_data.to_numpy()), axis=1)\n",
750-
"calcium_pca = pca.fit_transform(gaussian_filter1d(zscored, sigma=3))"
749+
"rs = RobustScaler()\n",
750+
"scaled = rs.fit_transform(gaussian_filter1d(temporal_data.to_numpy(), sigma=5))\n",
751+
"calcium_pca = pca.fit_transform(scaled)"
751752
]
752753
},
753754
{
@@ -803,7 +804,7 @@
803804
" controller_types=\"orbit\",\n",
804805
")\n",
805806
"fig_pca[0, 0].add_scatter(calcium_pca, cmap=\"hsv\", cmap_transform=ry_transform, sizes=4, alpha=0.4)\n",
806-
"marker_graphic = fig_pca[0, 0].add_scatter(calcium_pca[0], sizes=10)\n",
807+
"marker_graphic = fig_pca[0, 0].add_scatter(calcium_pca[0], sizes=20)\n",
807808
"\n",
808809
"fig_pca.show()"
809810
]
@@ -847,16 +848,6 @@
847848
"fig_pca[0, 0].controller = \"fly\""
848849
]
849850
},
850-
{
851-
"cell_type": "code",
852-
"execution_count": null,
853-
"id": "bb0df1db-126e-430a-842b-9448649f7de9",
854-
"metadata": {},
855-
"outputs": [],
856-
"source": [
857-
"nap_figure[\"behavior\"].graphics[1].thickness = 0.1"
858-
]
859-
},
860851
{
861852
"cell_type": "code",
862853
"execution_count": null,

overview.ipynb

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,6 @@
388388
"cosine_graphic.colors[:30:2] = \"cyan\""
389389
]
390390
},
391-
{
392-
"cell_type": "code",
393-
"execution_count": null,
394-
"id": "f6c1907f-f2a6-48dd-a86c-414bece50a09",
395-
"metadata": {},
396-
"outputs": [],
397-
"source": [
398-
"# more complex slicing, set the blue value directly from an array\n",
399-
"cosine_graphic.colors[65:90, 0] = np.linspace(0, 1, 90-65)"
400-
]
401-
},
402391
{
403392
"cell_type": "markdown",
404393
"id": "ff17474b-775e-4970-82d5-390d31f28020",
@@ -687,6 +676,14 @@
687676
"metadata": {},
688677
"outputs": [],
689678
"source": []
679+
},
680+
{
681+
"cell_type": "code",
682+
"execution_count": null,
683+
"id": "06cde66b-b6de-44a7-86cf-788b49b020ae",
684+
"metadata": {},
685+
"outputs": [],
686+
"source": []
690687
}
691688
],
692689
"metadata": {

0 commit comments

Comments
 (0)