# how to compare or cluster data

I need advice regarding further steps. I have dataset about computer and their activity during 24 h for several month. I want to find best fit between peers so one computer can relay on other for some service. example data for two peers

If I create graph then it looks like

how to mesure how good they fit to each other? Some of my ideas were

• to define some "typical" computer (perfect one that will work only during work work hours) and some how to calculate "distance" from this expected behavior

• to calculate intersection area this should be their match but problem is curve shapes.

• or do some clusters with dataset to group them.

What I did is track their activity and seek for pattern matching (compare two computer and measure how often they are present and absent in a same time as measure of match) and after I group them choosing random time their availability was 54 %. I am hoping to find better solution for matching.

thank you

I am hoping to find better solution for matching.

1. You can try calculating covariance or Pearson correlation coefficient between all pairs of your computers, but it will not result in matching exact values.

2. You can try calculating euclidean distance between computers. This will result is exact matching, and besides you can tell what the maximum distance can be, so this allows you to construct a metric.

Both methods are applicable to these data.

• How could I calculate euclidean distance? Using uptime percentage will not produce good results. Commented Nov 6, 2017 at 8:36
• Why do you think it will not produce good result? What is good result in your opinion? Commented Nov 6, 2017 at 10:20
• Based on pattern match (present + absent of computers in a same time) I made groups of computers that are similar, hoping that they will be the most available to each other. I made script that take random time, choose random comp and determine group. Other computer is random from same group. Then I take another random time where first computer is present and then check status of other. My script showed max of 55% match. I believe that random function can influence results but it should have minor effect. Commented Nov 6, 2017 at 10:36
• It seems unclear what your final goal is, but as I mentioned you can legally measure the difference in computer uptimes by taking the Euclidean distance and creating a dissimilarity matrix. It can also be used in hierarchical clustering. Commented Nov 6, 2017 at 10:41
• I have calculate simple matching coeficient that should describe pattern matching between two computers. Now I have nxn matrix that describe how one Computer match to others. I want to group them ti recognize several groups. Groups will have certain tasks for group processing and since they have similar presence pattern I believe that all comuters from one group will be present in a same time (at least majority of time) and will be able to perform task. Commented Nov 8, 2017 at 21:25