diff --git a/PopPUNK/models.py b/PopPUNK/models.py index 6067c545..832a27ee 100644 --- a/PopPUNK/models.py +++ b/PopPUNK/models.py @@ -513,7 +513,8 @@ def fit(self, X, max_num_clusters, min_cluster_prop, use_gpu = False): # DBSCAN parameters cache_out = "./" + self.outPrefix + "_cache" - min_samples = min(int(min_cluster_prop * self.subsampled_X.shape[0]), 1023) + min_samples = max(int(min_cluster_prop * self.subsampled_X.shape[0]), 10) # do not allow clusters of < 10 points + min_samples = min(min_samples,1023) # do not allow clusters to require more than 1023 points at the start min_cluster_size = max(int(0.01 * self.subsampled_X.shape[0]), 10) # Check on initialisation of GPU libraries and memory