I clustered my dataset based on location using DBSCAN(haversine). Everything is OK until this. However, I'd like to use the time series while I'm clustering my dataset. For example. You were at home at 13 pm and went to the market and park for one hour per each and came back home. In this case, the algorithm provides "1" cluster number each time for home which is extremely normal. But I want to give different cluster number for last home cluster if there is another cluster between home clusters.
Another idea is clustering time with the location. it doesn't have to be another cluster between home clusters. If there is a one-hour difference or another different time period, I'd like to see another cluster for it.
So, do you think is it possible to do it?
Example dataset looks like
location time cluster cluster_want_to_see
home 13.08.10 1 1
home 13.08.28 1 1
home 13.08.68 1 1
market 14.09.50 9 9
market 14.20.51 9 9
market 14.30.10 9 9
park 15.10.16 3 3
park 15.50.02 3 3
home 16.15.10 1 **7** #return to home must be in another cluster
home 16.17.23 1 **7**
market2 17.02.36 5 5
market2 17.02.58 5 5
home 18.08.02 1 **8**
home 18.23.05 1 **8**