From 0d017325982d4a05bb379986cf17c222efc6b3ab Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Mon, 16 Jan 2023 20:37:01 -0800 Subject: [PATCH] Fix output info Signed-off-by: James Ketrenos --- ketrface/ketrface/dbscan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ketrface/ketrface/dbscan.py b/ketrface/ketrface/dbscan.py index ab0ba95..a7f1a30 100644 --- a/ketrface/ketrface/dbscan.py +++ b/ketrface/ketrface/dbscan.py @@ -57,9 +57,9 @@ def DBSCAN(points, eps = MAX_DISTANCE, minPts = MIN_PTS, verbose = True): T = S for j, Q in enumerate(S): # Process every seed point if verbose == True: - sub_new_perc = int(100 * (j+1) / total) + sub_new_perc = int(100 * (j+1) / sub_total) now = time.time() - if sub_new_perc != perc or now - last > 5: + if sub_new_perc != sub_perc or now - last > 5: sub_perc = sub_new_perc print(f'... points {sub_perc}% ({j}/{sub_total} processed) complete with {len(clusters)} identities ({now - start}s).') last = now