I learned a lot about machine learning in AI courses the past year and a half in college, and really wanted to apply it somewhere outside of the classroom. This was a one-day project app, so it's really functionally simple. It looks at your Twitter follower and following list, computes the difference, decides if each of those people is "spam" or "ham", then recommends which you are safe to follow and which you should block. Since the API calls can take a while, it does it all with a background worker and e-mails you when the results are ready, rather than doing the work synchronously while you wait at a browser.<p>The hard part was getting ready for it. I decided to do a very basic spam filter for Twitter, one which looked only at the profile information, and not the text of anyone's tweets, since that'd require too many API calls without special access beyond even a whitelisted API account. I wrote some scripts that would use Twitter's search API to find tweets directed at @spam for a week and a half. It took that long because looking at old tweets would yield accounts Twitter had already suspended, meaning I couldn't get any info about them through the API. I had to get the reports while they were fresh and download the profile info of known spammers to build a training corpus. For the "ham" examples I used the following lists of trusted friends with various interests.<p>I used that corpus to build and prune a decision tree, which tested to around 99% precision/recall accuracy with 2000 ham and 2000 spam examples. Then I manually rewrote the tree as simple conditionals in PHP to create the classifier for the website.<p>Note: I'm about to hit my rate limit (on a whitelisted account, so 20k calls) in only half an hour...