Make a Cluster of ID holding null values using dbscan



Greetings to all,
I have a data which maps gps points for mapping an area.
What I need to do is cluster postgresql query which has a edge_id column which has road_id. There are some area where I have gps points but no road_id, that is, it’s null. I need to make a cluster of such edge_id using dbscan.

please help out.


Hi @siddharth_verma ,

I am not very clear about the problem you are facing. Can you please provide more information on your question.

If the issue is due to the presence of null values in road_id, you can first impute the missing values and then apply dbscan.

For dealing with the missing values, you can either delete the row with missing road_id , but this will result in loss of data. Other way could be filling this values with the mode value of road_id.