Skip to content

Commit

Permalink
Merge pull request ckoval7#6 from godsic/fix-min_samp-bug
Browse files Browse the repository at this point in the history
Fix issue with `min_samp` becoming of `float` type
  • Loading branch information
ckoval7 authored Nov 17, 2022
2 parents 6a77dd3 + 4d243f4 commit fe086c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions df-aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ def process_data(database_name, epsilon, min_samp):
n_points = len(X)

if min_samp == "auto":
min_samp = max(3, round(0.05 * n_points, 0))
elif min_samp.isnumeric():
min_samp = int(min_samp)
else:
min_samp = round(0.05 * n_points)
elif not min_samp.isnumeric():
break

min_samp = max(3, min_samp)
min_samp = int(min_samp)

if epsilon == "auto":
epsilon = autoeps_calc(X)
print(f"min_samp: {min_samp}, eps: {epsilon}")
Expand Down

0 comments on commit fe086c4

Please sign in to comment.