Skip to content

Commit

Permalink
fix: change x_cent to x
Browse files Browse the repository at this point in the history
  • Loading branch information
danfke committed May 20, 2022
1 parent 296e4b4 commit 5083274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/emgdecompy/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def whiten(x):
"""

# Calculate covariance matrix
cov_mat = np.cov(x_cent, rowvar=True, bias=True)
cov_mat = np.cov(x, rowvar=True, bias=True)

# Eigenvalues and eigenvectors
w, v = linalg.eig(cov_mat)
Expand All @@ -179,6 +179,6 @@ def whiten(x):
diagw = diagw.real.round(4)

# Whitening using zero component analysis: v diagw v.T x_cent
wzca = np.dot(np.dot(np.dot(v, diagw), v.T), x_cent)
wzca = np.dot(np.dot(np.dot(v, diagw), v.T), x)

return wzca

0 comments on commit 5083274

Please sign in to comment.