# Comparing groups of vectors / clustering based on how similar each persons 'group of vectors' is

Say I have N people and K weeks. For each person-week, I have a vector of a fixed length filled some number between 0 and 1, summing to 1 across the whole vector (so for each person, I'll have K vectors all of the same length). I want to do two things:

1) Collapse the person-week vectors into a single number for each person representing how similar all of their week vectors are (so intuitively like a correlation matrix of all the vectors for that person, but want to collapse to single number)

2) Find people that have similar distributions of vectors

My Googling isn't turning up too much. For #1, I could just take the average correlation of the correlation matrix, but that seems like a somewhat naive approach.

Can you guys point me in the right direction?

## 2 Answers

Why don't you simply concatenate all weeks, then take the distances between the vectors?

The mathematical properties of this are well defined and well understood (least squares).

For (1) you could just take the average of the off-diagonal values of the correlation matrix

For (2) computing the average of the pairwise weekly correlations or computing the correlation of the concatenated weeks both seem like good options