Skip to content

Commit

Permalink
fix rank reduction warning
Browse files Browse the repository at this point in the history
  • Loading branch information
katosh committed Nov 28, 2022
1 parent 54dcd07 commit a88d305
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mellon/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
)
Expand Down

0 comments on commit a88d305

Please sign in to comment.