From 3a920eaa72aabf03562de5fc668d324a01f55d93 Mon Sep 17 00:00:00 2001 From: lionel kusch Date: Mon, 16 Dec 2024 10:13:42 +0100 Subject: [PATCH] Update adaptive_permutation_threshold.py Add comment about the condition of X from the removal lines --- hidimstat/adaptive_permutation_threshold.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hidimstat/adaptive_permutation_threshold.py b/hidimstat/adaptive_permutation_threshold.py index 1dc449a..d6dabe5 100644 --- a/hidimstat/adaptive_permutation_threshold.py +++ b/hidimstat/adaptive_permutation_threshold.py @@ -50,7 +50,16 @@ def ada_svr(X, y, rcond=1e-3): def _manual_inversion(X, rcond=1e-3): - "Inverting taking care of low eigenvalues to increase numerical stability" + """ + Inverting taking care of low eigenvalues to increase numerical stability + + Parameters + ----------- + X : ndarray, shape (n_features, n_features) + Data. + Base on usage of X in the main function, X is squared matrix and not full_ranked (for details see PR#58) + + """ X = np.asarray(X) U, s, V = np.linalg.svd(X, full_matrices=False)