From a88d3052be37bd8cfdbd354c56a372c50461268e Mon Sep 17 00:00:00 2001 From: Dominik Date: Mon, 28 Nov 2022 12:17:29 -0800 Subject: [PATCH] fix rank reduction warning --- mellon/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mellon/model.py b/mellon/model.py index 0ff305c..13e67e4 100644 --- a/mellon/model.py +++ b/mellon/model.py @@ -142,9 +142,10 @@ def _compute_L(self): x, cov_func, landmarks=landmarks, rank=rank, method=method, jitter=jitter ) new_rank = L.shape[1] - if new_rank > (.8*rank): + old_rank = landmarks.shape[0] + if new_rank > (.8*old_rank): warn( - f'Shallow rank reduction from {rank:,} to {new_rank:,} ' + f'Shallow rank reduction from {old_rank:,} to {new_rank:,} ' 'indicates underrepresentation by landmarks. Consider ' 'increasing n_landmarks!' )