From 4f8489d7ae9440256b2d005358e19ada95a8b744 Mon Sep 17 00:00:00 2001 From: Timothy sit Date: Mon, 23 Oct 2023 15:20:40 +0100 Subject: [PATCH] Added required PCA import for cvPCA --- neuropop/dimensionality.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neuropop/dimensionality.py b/neuropop/dimensionality.py index 3bb3b1d..57eb2c4 100644 --- a/neuropop/dimensionality.py +++ b/neuropop/dimensionality.py @@ -124,6 +124,7 @@ def scvPCA(A, B): def cvPCA(X): ''' X is 2 x stimuli x neurons ''' + from sklearn.decomposition import PCA nr = X.shape[0] pca = PCA(n_components=min(1024, X.shape[1])).fit(X[0]) #u = pca.components_.T