How do you find weight of edges between individuals based on co-participation in the same groups? (SNA) I have a data set with 20,000 discussion forum threads, many only one or two posts, some up to 400-posts. I have 5,000 individuals who participated in these threads. I want to calculate the strength of the relationship between two people based on how many threads they have participated in for export to Gephi and clustering to see if I can find any clear groups - are there any pre-existing algorithms to do this?
I hacked up my own function in R, which looks at the length of the thread (smaller thread means stronger connection to other participants - too large threads are excluded), number of times posting (two people posting twice each in a thread are more strongly related), etc. It kind of works, but I'm sure I'm reinventing the wheel, there must be some existing algorithms/approaches etc? (I'm using R, but even a general algorithm is welcome). 
 A: There are many things you could do and there is no single answer. Two areas you could look at are recommender systems and text mining. In text mining, you usually have a set of documents and try to classify words according to what documents they appear in. In your case, the documents would be forum threads and the words would be users. You could construct a 5000 x 20000 matrix where the rows are the users and the $(i,j)$--entry is the number of times user $i$ posted in thread $j$. Possibly after doing some adjustments, such as tf-ifdf weighting, you can take the rows of this matrix, and calculate the correlations between them. These correlations would give you a score for how similar each pair of users is. You could then get a network by including an edge for each pair whose score exceeds a cetain threshold, or you could just use the scores as edge weights in a network, depending on what measure of correlation you choose to use.
Here is a link to a CV question with some text mining code for this sort of thing. I would also recommend Shalizi's notes. For the recommender system approach, I am not so sure that it is directly applicable, but here is a link to a question where I try to explain it. The other answer there also looks like it might be useful for you.
