Skip to content

Commit

Permalink
Remove unnecessary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelkusch committed Dec 13, 2024
1 parent f847787 commit 094955d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions hidimstat/adaptive_permutation_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def ada_svr(X, y, rcond=1e-3):
return beta_hat, scale


def _manual_inversion(X, rcond=1e-3, full_rank=False):
def _manual_inversion(X, rcond=1e-3):
"Inverting taking care of low eigenvalues to increase numerical stability"

X = np.asarray(X)
Expand All @@ -63,9 +63,6 @@ def _manual_inversion(X, rcond=1e-3, full_rank=False):
s_inv = np.zeros(np.size(s))
s_inv[:rank] = 1 / s[:rank]

if full_rank:
s_inv[rank:] = 1 / (rcond * s.max())

X_inv = np.linalg.multi_dot([U, np.diag(s_inv), V])

return X_inv

0 comments on commit 094955d

Please sign in to comment.