1
$\begingroup$

I'm analysing some user activity data for a social networking website. For each user, I have indicators of activity such as:

  • number of visited pages
  • number of comments
  • number of shares
  • number of likes
  • number of friends

All the variables are simple counts, with no categorical data. Now, I would like to come up with a single "activity index" that captures the overall user activity. Clearly, I could use a simple mean of these variables, but, as is reasonable to expect in this context, many of them are highly dependent (e.g. people who comment a lot tend also to visit a lot of pages, etc.). To do so, I scaled the variables, and then ran a PCA, which found the following components:

Importance of components:
                          Comp.1    Comp.2    Comp.3     Comp.4     Comp.5
Standard deviation     1.5586900 1.1886741 0.8548985 0.48575879 0.43672236
Proportion of Variance 0.4859029 0.2825892 0.1461703 0.04719232 0.03814528
Cumulative Proportion  0.4859029 0.7684921 0.9146624 0.96185472 1.00000000

It seems clear that there are two important components here, so I can't use only the first one as the index.

How would you approach this problem to obtain a suitable activity index that takes variable dependency into account?

EDIT: Would a linear combination of PCA components weighted on the proportion of variance be wrong?

Thanks for any feedback.

Mulone

$\endgroup$
3
$\begingroup$

Not sure if this amounts to an answer but here are a few remarks:

  • The fact that variables are related in some way (e.g. that users who comment a lot tend to visit a lot pages) is actually a good thing. Otherwise, it wouldn't make sense to derive a single activity measure or indeed apply any dimensionality reduction technique. Beside dimensionality, the main reason not to blindly average all your variables is not that they are correlated but that some of them will have more weight in the final sum, depending on their variance/units.
  • It's not clear to me that there are two important components in this case. For example, if you create a scree plot based on the results, you will see that there is no obvious elbow. By construction, the first component captures the most variance of course but in fact the differences are less marked than in many data sets I have personally manipulated.
  • From a pure dimensionality reduction perspective, if you want to retain only a single variable to capture as much variance as possible then it would be the first component.
  • From the way you talk about it, it seems that you are not interested purely in dimensionality reduction but rather in latent variable modeling, i.e. in finding some meaningful factor (“user activity”) driving the behavior you observe. You might therefore want to look at the factor analysis literature, where you will find a lot of discussion on the number of factors to retain, etc.
$\endgroup$
  • $\begingroup$ This is a good point. Looking at the scree plot, there is no elbow. $\endgroup$ – Mulone Jul 4 '13 at 10:41
  • $\begingroup$ I've added an edit to the question. $\endgroup$ – Mulone Jul 4 '13 at 11:50
2
$\begingroup$

Since the two components that together explain almost 80% of the variance are orthogonal, most likely there is no single "activity" measure. If I were you, I would study the two components, trying to understand what types of activity they measure, on which variables they depend etc. I would also study the PCA plots to understand whether there are for example distinct groups of users. It might be that a single score is just not sufficient to describe a person. We are complex beings after all.

Failing that, I would need to decide what weights to assign to the components, turn them to ranks, multiply by these by the weights, sum them and so get an arbitrary score that might or might not describe what you want to describe.

You are looking for a surrogate -- but a surrogate of what? What do you want to know about a particular user that the score is supposed to reflect.

$\endgroup$
  • $\begingroup$ Thanks! I know what the first two components represent (e.g. one is reading/commenting, the other one is friend-related activity). Is there a usual way to combine a number of PCA components into a single score? $\endgroup$ – Mulone Jul 4 '13 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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