Skip to content

Commit

Permalink
use variable names P,i,t to agree with the notation in the papers
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Friedrich committed Mar 20, 2017
1 parent a651414 commit 41b9a0f
Show file tree
Hide file tree
Showing 2 changed files with 369 additions and 682 deletions.
9 changes: 6 additions & 3 deletions functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,12 @@ def onnls(y, g, lam=0, shift=100, window=None, mask=None, tol=1e-9, max_iter=Non
h = g
for i in range(w):
K[i:, i] = h[:w - i]
a = np.linalg.inv(K).sum(0)
_y = y - lam * a[0]
_y[-w:] = y[-w:] - lam * a
if lam:
a = np.linalg.inv(K).sum(0)
_y = y - lam * a[0]
_y[-w:] = y[-w:] - lam * a
else:
_y = y

s = np.zeros(T)
KK = K.T.dot(K)
Expand Down
Loading

0 comments on commit 41b9a0f

Please sign in to comment.