Spaces:
Runtime error
Runtime error
File size: 387 Bytes
e84d35a 7b6ee4d e84d35a 7b6ee4d e84d35a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
"""Gen suggested eps min_samples."""
def gen_eps_minsamples(src_len: int, tgt_len: int) -> dict:
"""Gen suggested eps min_samples."""
eps = src_len * 0.01
# if eps < 3: eps = 3
eps = max(3, eps)
min_samples = tgt_len / 100 * 0.5
# if min_samples < 3: min_samples = 3
min_samples = max(3, min_samples)
return {"eps": eps, "min_samples": min_samples}
|