brain of mat kelcey


e12.3 stat syns FAIL!

February 05, 2010 | View Comments

after quite a bit of hacking the statistical synonyms idea doesn't seem to give terribly interesting results so i'm going onto do something else.

for the record here's what I did do though....

  1. generate 3grams from 800e3 tweets
  2. collect n-grams together that share the same first and last term; eg 'the blue cat', 'the green cat', 'the red cat'
  3. for each set generate all the combos of the middle terms; eg 'blue green', 'blue red', 'green red'
  4. count the occurrences of each pair
  5. draw a graph of the 150 top occurring pairs

graph.840k.150viola! click this image for a bigger version

some interesting result. few of the more complex things i was trying were working. they were mainly based on trying to incorporate the frequencies of terms but it seemed the simplest gave the best result (i think it's because my assumptions about how to use the data were wrong).

here's the code, feel free to read my notes, correct my incorrect terrible statistical assumptions and make a better image!

blog comments powered by Disqus