Skip to content

Commit

Permalink
Remove import pdb left in PCA compact trick.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-gaddes committed Nov 17, 2021
1 parent a3cfab8 commit 92ec830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion icasar/blind_signal_separation.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def PCA_meg2(X, verbose = False, return_dewhiten = True):
X = X - X.mean(axis=1)[:,np.newaxis] # mean center each row (ie dimension)

if samples < dims and dims > 100: # do PCA using the compact trick (i.e. if there are more dimensions than samples, there will only ever be sample -1 PC [imagine a 3D space with 2 points. There is a vector joining the points, one orthogonal to that, but then there isn't a third one])
import pdb; pdb.set_trace()
#import pdb; pdb.set_trace()
if verbose:
print('There are more samples than dimensions and more than 100 dimension so using the compact trick.')
M = (1/samples) * X.T @ X # maximum liklehood covariance matrix. See blog post for details on (samples) or (samples -1): https://lazyprogrammer.me/covariance-matrix-divide-by-n-or-n-1/
Expand Down

0 comments on commit 92ec830

Please sign in to comment.