DBSCAN clustering with haversine distance

1.5k views Asked by At

I have a dataset with 33707 rows. I want to cluster my dataset using DBSCAN clustering algorithm with haversine distance metrics. My code is given in the image. I am getting only one clusters. Which value should I change eps or min_samples to get accurate number of clusters.

kms_per_radian = 6371.0088
epsilon = 0.5 / kms_per_radian
model = DBSCAN(eps=epsilon,min_samples=300,algorithm='ball_tree', metric='haversine').fit(np.radians(X))
class_predictions = model.labels_

df['CLUSTERS_DBSCAN']=class_predictions 
1

There are 1 answers

0
researchcollege111 On

Please try to decrease the min_samples to small number.