1
$\begingroup$

I am new to machine learning and do have a very large dataset for a set of 100 people over a period of 1 year. and the goal is to find out who are buddys based on their lunch times.

I have the following dataset:

Person  StartTime EndTime Duration(dif for start and end times)
Person1 Time11    Time12   diff1
Person2 Time21    Time22   diff2
Person3 Time31    Time22   diff3
Person4 Time41    Time32   diff4

Now I would like to cluster/group people together based on their times ( with +/- 5 minutes time difference, meaning if start time and end time of person 1 is 12:00 - 1:00 PM and person 2 is 11:55 - 1:05 they fall under the same group relative to Person 1)

$\endgroup$

2 Answers 2

0
$\begingroup$

umm ...the whole point of clustering is to let the algo figure out which points in your data set "overlap" , so in your case, it would mean people who were at lunch from 1-2 pm and also folks who were at lunch from 1245 to 1:50 pm (but thats just generalization ..i can't make any definite statements without looking at your dataset). So lets take K means algo and your label is going to be "duration" (diff1,2 etc) and you specify, say 3 clusters. What thats going to do is find all durations that are in a band and get them together. So in your case say there are 3 clusters where the bands of duration are 1-1hr 15 mins ; 45 mins - 50 mins ; and 1 hr 30 to 2 hours , then you have to do nothing and just play around with K (number of clusters) , also i must mention clustering algorithms are non parametric , meaning you can't specify rules to the algo. Hope it helpds

$\endgroup$
0
$\begingroup$

Measure the relative overlap of the lunch times of any two persons. I.e. if their times at a day overlap by 90%, then add +0.9 to their similarity. You could also use the square of these values.

Then cluster with hierarchical clustering using this similarity matrix.

$\endgroup$
1
  • 1
    $\begingroup$ I think this is a bit brief in its current form, though it does seem to constitute something of an answer. Is there any chance you can expand on it, either to explain in more detail how to implement it or to justify why it would be a preferable approach? $\endgroup$
    – Silverfish
    Sep 17, 2016 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.