Skip to content

Commit

Permalink
More on LARS performance: triangular solving and cholesky deletes.
Browse files Browse the repository at this point in the history
seems to be working ...
  • Loading branch information
Fabian Pedregosa committed Sep 14, 2010
1 parent c463cea commit a79553e
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 49 deletions.
6 changes: 4 additions & 2 deletions scikits/learn/glm/lars.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,14 @@ def lars_path(X, y, Gram=None, max_iter=None, alpha_min=0,
beta[n_iter, active] = beta[n_iter - 1, active] + gamma_ * b

if drop:
arrayfuncs.cholesky_delete (L[:n_pred, :n_pred], idx)
n_pred -= 1
drop_idx = active.pop (idx)
unactive.append(drop_idx)
active_mask[drop_idx] = False
Xa = Xt[active] # duplicate
L[:n_pred, :n_pred] = linalg.cholesky(np.dot(Xa, Xa.T), lower=True)
# pdb.set_trace()
# Xa = Xt[active] # duplicate
# L[:n_pred, :n_pred] = linalg.cholesky(np.dot(Xa, Xa.T), lower=True)
sign_active = np.delete (sign_active, idx) # do an append to maintain size
sign_active = np.append (sign_active, 0.)
# should be done using cholesky deletes
Expand Down
Loading

0 comments on commit a79553e

Please sign in to comment.