3
$\begingroup$

I'm not even sure if this is the right StackExchange to post this, but it seems like sentiment analysis would go here.

What would be the best approach to determine if two people on Twitter are actually friends?

I think that the first criteria would be that they are following each other. This would eliminate all of the celebrities, companies, etc. that a person follows.

The second criteria could be physical proximity to one another. If two people tweet from the same general areas, then there's probably a higher chance that they actually know each other.

After that, I'm not sure what criteria I should look for. Would sentiment analysis of their tweets to each other be a viable option? With that friendly sentiment could indicate that they actually know each other.

$\endgroup$
4
  • $\begingroup$ In 2012, physical closeness is probably neither a necessary nor sufficient indicator of friendship. Do you assume a certain use of Twitter (i.e. would a conversation typical to friends be held on Twitter)? How do you define "friend"? My girlfriend and I follow each other but exchange almost no messages (explicitly). Many RL friends will probably not do so because they communicate via other channels. Therefore, in my estimation, you will be able to measure rather loose relationships, not close friendships. $\endgroup$
    – Raphael
    Aug 6 '12 at 5:18
  • $\begingroup$ By actually friends, I basically just mean that they know each other personally. And physical proximity can be an excellent indicator in some instances. Sure, if two people tweet from the same city block in NYC, they don't necessarily know each other, but if they follow each other and maybe tweet at each other from the same town in Pennsykvania, they might know each other, and if they follow each other and tweet at each other often from the same county in Montana, there's a high probability that they know each other. $\endgroup$ Aug 6 '12 at 14:41
  • 1
    $\begingroup$ Sidenote: it's hard to detect any relationships in Twitter as it imposes people to write about themselves more than about others. So any methods will lack precision.. $\endgroup$
    – madfriend
    Aug 6 '12 at 22:02
  • $\begingroup$ This is a very difficult problem for which good results are typically only obtained in simplified and restricted settings. Have a look at a recent paper (in WSDM 2012) called "Finding Your Friends and Following Them to Where You Are" linked here: cs.rochester.edu/~sadilek/publications/click.php?id=http://… $\endgroup$
    – Nick
    Aug 10 '12 at 21:39
3
$\begingroup$

My metric of choice would be the communication by direct message. However, this metric is hard to come by since measuring it requires the user's consent.

I do not think that using similar hashtags or terms has any say over friendship. People tend to adjust to the language they read and do not require personal bonding to do so.

I think mentions are a good way to identify friends and foes alike. A good way would probably be to see whether mentions beget a reply. Users tend to 'reward' pleasant and useful mentions with replies. However, the semantics of these messages are very important and only quantified analysis may not be enough.

Since I cannot comment yet, I would like to reply to the suggestion of using machine learning. I do not think that machine learning can effectively identify friends, even if one manages to get 'sufficient' data. Using Twitter is a rather creative process and generally not uniform across social circles.

$\endgroup$
1
  • $\begingroup$ Addendum: If by 'know each other personally' you mean 'have talked to each other in meatspace more than once', you may not find that information on Twitter. I suspect that if there was any strong correlation between a user's behaviour and meatspace relationships, Facebook wouldn't have to ask every single person. $\endgroup$
    – Jonny
    Oct 26 '12 at 9:56
1
$\begingroup$

What you want to do is make some form of graph. Your nodes could be users on Twitter, or posts, actions, etc. I would recommend a weighted digraph with multiple edges allowed (though you could just represent this by summing the weights of multiple edges). You want your edges to be something which indicates a link between these two people, such as mentioning them in a post, or using common hash-tags.

What you put in this graph and how you score it has much more to do with psychology than computer science, so I won't comment to much on that. My recommendation would be to start with a group of people on twitter you know to be friends, and look at what their graphs look like to start, then use that to determine the weight you will give to each type of interaction.

Then, to find an overall score, you can use some sort of metric on your graph. You could use the overall weight of the edges connecting the two users, or sum the weights of the paths between them, weighting longer paths lower.

$\endgroup$
2
  • 1
    $\begingroup$ Given some sets of real-life friends, should machine learning not be able to extract the relevant characteristica for us? $\endgroup$
    – Raphael
    Aug 13 '12 at 23:37
  • $\begingroup$ As Raphael proposes, it might be possible to come up with some relevant metrics for "friendness" using machine learning techniques. My approach would be to get some labeled data (actual friends on twitter, and actual non-friends on twitter), implement maybe ten metrics (number of common followers, geographical distance, etc.), and then use either a decision tree, or a random forest classifier, to see which of these metrics is best for classifying these friendships. $\endgroup$
    – utdiscant
    Aug 18 '12 at 9:48

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.