Opera's Minimalistic Peer to peer OS Browser

mijn Opera Unite Fridge
Image by Jaap Stronks via Flickr

Yes Opera is a browser but you may as well call it an OS. With an uncluttered design, some mind bending Opera Unite Peer to Peer features (in a browser!) withhttp://unite.opera.com/applications/, and nifty widgets- try singing some Opera. I really dont know how browsers make money, especially since they are suing each other all the time, but well- heres to more choice – if you don’t want a corporation owned browser lusting to sell your leaked privacy data to Don Draper- Opera is a good choice- much better than Sea Monkey and the Fox .

I really liked the option to make my own web server in 2 clicks,and share stuff. The bit trorrent support is really nice but I wonder if there was any Scandinavian brotherly ports in bit torrent sharing 😉 , me hearties

Interesting R competition at Reddit

Image representing Reddit as depicted in Crunc...
Image via CrunchBase

Here is an interesting R competition going on at Reddit and it is to help Reddit make a recommendation engine 🙂

http://www.reddit.com/r/redditdev/comments/dtg4j/want_to_help_reddit_build_a_recommender_a_public/

by ketralnis

As promised, here is the big dump of voting information that you guys donated to research. Warning: this contains much geekery that may result in discomfort for the nerd-challenged.

I’m trying to use it to build a recommender, and I’ve got some preliminary source code. I’m looking for feedback on all of these steps, since I’m not experienced at machine learning.

Here’s what I’ve done

  • I dumped all of the raw data that we’ll need to generate the public dumps. The queries are the comments in the two .pig files and it took about 52 minutes to do the dump against production. The result of this raw dump looks like:
    $ wc -l *.dump
     13,830,070 reddit_data_link.dump
    136,650,300 reddit_linkvote.dump
         69,489 reddit_research_ids.dump
     13,831,374 reddit_thing_link.dump
    
  • I filtered the list of votes for the list of users that gave us permission to use their data. For the curious, that’s 67,059 users: 62,763 with “public votes” and 6,726 with “allow my data to be used for research”. I’d really like to see that second category significantly increased, and hopefully this project will be what does it. This filtering is done by srrecs_researchers.pig and took 83m55.335s on my laptop.
  • I converted data-dumps that were in our DB schema format to a more useable format using srrecs.pig(about 13min)
  • From that dump I mapped all of the account_ids, link_ids, and sr_ids to salted hashes (using obscure() insrrecs.py with a random seed, so even I don’t know it). This took about 13min on my laptop. The result of this, votes.dump is the file that is actually public. It is a tab-separated file consisting in:
    account_id,link_id,sr_id,dir
    

    There are 23,091,688 votes from 43,976 users over 3,436,063 links in 11,675 reddits. (Interestingly these ~44k users represent almost 17% of our total votes). The dump is 2.2gb uncompressed, 375mb in bz2.

What to do with it

The recommendations system that I’m trying right now turns those votes into a set of affinities. That is, “67% of user #223’s votes on /r/reddit.com are upvotes and 52% on programming). To make these affinities (55m45.107s on my laptop):

 cat votes.dump | ./srrecs.py "affinities_m()" | sort -S200m | ./srrecs.py "affinities_r()" > affinities.dump

Then I turn the affinities into a sparse matrix representing N-dimensional co-ordinates in the vector space of affinities (scaled to -1..1 instead of 0..1), in the format used by R’s skmeans package (less than a minute on my laptop). Imagine that this matrix looks like

          reddit.com pics       programming horseporn  bacon
          ---------- ---------- ----------- ---------  -----
ketralnis -0.5       (no votes) +0.45       (no votes) +1.0
jedberg   (no votes) -0.25      +0.95       +1.0       -1.0
raldi     +0.75      +0.75      +0.7        (no votes) +1.0
...

We build it like:

# they were already grouped by account_id, so we don't have to
# sort. changes to the previous step will probably require this
# step to have to sort the affinities first
cat affinities.dump | ./srrecs.py "write_matrix('affinities.cm', 'affinities.clabel', 'affinities.rlabel')"

I pass that through an R program srrecs.r (if you don’t have R installed, you’ll need to install that, and the packageskmeans like install.packages('skmeans')). This program plots the users in this vector space finding clusters using a sperical kmeans clustering algorithm (on my laptop, takes about 10 minutes with 15 clusters and 16 minutes with 50 clusters, during which R sits at about 220mb of RAM)

# looks for the files created by write_matrix in the current directory
R -f ./srrecs.r

The output of the program is a generated list of cluster-IDs, corresponding in order to the order of user-IDs inaffinities.clabel. The numbers themselves are meaningless, but people in the same cluster ID have been clustered together.

Here are the files

These are torrents of bzip2-compressed files. If you can’t use the torrents for some reason it’s pretty trivial to figure out from the URL how to get to the files directly on S3, but please try the torrents first since it saves us a few bucks. It’s S3 seeding the torrents anyway, so it’s unlikely that direct-downloading is going to go any faster or be any easier.

  • votes.dump.bz2 — A tab-separated list of:
    account_id, link_id, sr_id, direction
    
  • For your convenience, a tab-separated list of votes already reduced to percent-affinities affinities.dump.bz2, formatted:
    account_id, sr_id, affinity (scaled 0..1)
    
  • For your convenience, affinities-matrix.tar.bz2 contains the R CLUTO format matrix files affinities.cm,affinities.clabel, affinities.rlabel

And the code

  • srrecs.pig, srrecs_researchers.pig — what I used to generate and format the dumps (you probably won’t need this)
  • mr_tools.py, srrecs.py — what I used to salt/hash the user information and generate the R CLUTO-format matrix files (you probably won’t need this unless you want different information in the matrix)
  • srrecs.r — the R-code to generate the clusters

Here’s what you can experiment with

  • The code isn’t nearly useable yet. We need to turn the generated clusters into an actual set of recommendations per cluster, preferably ordered by predicted match. We probably need to do some additional post-processing per user, too. (If they gave us an affinity of 0% to /r/askreddit, we shouldn’t recommend it, even if we predicted that the rest of their cluster would like it.)
  • We need a test suite to gauge the accuracy of the results of different approaches. This could be done by dividing the data-set in and using 80% for training and 20% to see if the predictions made by that 80% match.
  • We need to get the whole process to less than two hours, because that’s how often I want to run the recommender. It’s okay to use two or three machines to accomplish that and a lot of the steps can be done in parallel. That said we might just have to accept running it less often. It needs to run end-to-end with no user-intervention, failing gracefully on error
  • It would be handy to be able to idenfity the cluster of just a single user on-the-fly after generating the clusters in bulk
  • The results need to be hooked into the reddit UI. If you’re willing to dive into the codebase, this one will be important as soon as the rest of the process is working and has a lot of room for creativity
  • We need to find the sweet spot for the number of clusters to use. Put another way, how many different types of redditors do you think there are? This could best be done using the aforementioned test-suite and a good-old-fashioned binary search.

Some notes:

  • I’m not attached to doing this in R (I don’t even know much R, it just has a handy prebaked skmeans implementation). In fact I’m not attached to my methods here at all, I just want a good end-result.
  • This is my weekend fun project, so it’s likely to move very slowly if we don’t pick up enough participation here
  • The final version will run against the whole dataset, not just the public one. So even though I can’t release the whole dataset for privacy reasons, I can run your code and a test-suite against it

——————————————————————————————-

 

I am thinking of using Rattle and using the arules package, and running it on the EC2 to get the horsepower.

How else do you think you can tackle a recommendation engine problem.

 

Ajay

 

Downloading your Facebook Photos

 

This UML diagram describes the domain of Faceb...
Image via Wikipedia

 

Here is a three step process for Downloading your entire Facebook Info-

1) Go to top right hand corner- Account.

2) Under Account- click on Account Settings

3)Under Account Settings -Click on Download Information

Facebook creates a ZIP file for downloading your information- and sends you an email when the info is ready.

Why should you download your Facebook Info-

1) As a local backup of your profile

2) To move to Orkut – or better to share Photos on Picassa or Flickr to your non Facebook friends. Note FB does have a unique URL under each Photo that you can copy and paste and share, but its not really convenient besides being huge and not a small URL at all.

3) In case you want to delete your Facebook account but dont want to lose your memories and friends.

Nice step from FB- they are taking user privacy and empowerment more seriously and at 500 Million users can afford to be a bit more generous.

Using Facebook Analytics (Updated)

People sceptical of any analytical value of Facebook should see the nice embedded analytics, which is a close rival and even more to Google Analytics for websites. It has recently been updated as well.

It is right there on the button called Insights on left margin of your Facebook Page

Like for the Facebook Page

http://facebook.com/Decisionstats

You can also use Export Data function to run customized analytical and statistical testing on your Corporate Page.

Older View———————————————————————————-

see screenshot of Demographics of 213 Decisionstats fans on Facebook ( FB doesnot allow individual views but only aggregate views for Privacy Reasons)

fb

Google and Me on Privacy and Openness

Finally, I have to admit it, Google Rocks. Check the video above on the website if it does not show in your inbox.

The Google Privacy Centre is much needed.

ps I resigned yesterday from the Technology Advsiory Board of University of Tennessee protesting the inferior solution to giv away everything to Microsoft on a platter without even evaluating Google Wave for the Volunteers., or even having an Open Source Lab for two computers even when I asked for it months ago.

Lastly I apologize for the sometimes spelling and grammar mistakes in my blog to the readers- I found out that I may be suffering from a mild learning disorder ( a bit like dylexia – adrenal glan tests are still awaited). It  which was untreated for almost 32 years as I was in relatively bad health care for most of my life..

The Google Privacy Centre is at http://www.google.com/intl/en/privacy.html

Dear Google

Google.com has added its privacy policy to the main page to conform with California law. Here is a question to the masters of the algorithm that I sent to their query system ”

Dear Google ,

I understand that IP Addresses are stored routinely by you, that these IP addresses can be used as unique keys for analytical purposes, but also be used for identifying and locating privacy of people (like in China) with disproportionate technical effort. Why don’t you run a randomizing algorithm that masks the IP addresses but keeps the uniqueness factor alive, and delete the original IP addresses, thus sparing yourself any privacy concerns. The algorithm should be made in a manner that any masked unique  IP number cannot be unmasked , and all same IP addresses have same masked IP addresses.You retain analytical value, consumers retain privacy and we settle this debate once and for all.”
This is in response to its slightly biased privacy policy whose fine print is here ”

http://www.google.co.in/intl/en/privacypolicy.html

Data integrity

Google processes personal information only for the purposes for which it was collected and in accordance with this Policy or any applicable service-specific privacy notice. We review our data collection, storage and processing practices to ensure that we only collect, store and process the personal information needed to provide or improve our services. We take reasonable steps to ensure that the personal information we process is accurate, complete, and current, but we depend on our users to update or correct their personal information whenever necessary.

Accessing and updating personal information

When you use Google services, we make good faith efforts to provide you with access to your personal information and either to correct this data if it is inaccurate or to delete such data at your request if it is not otherwise required to be retained by law or for legitimate business purposes. We ask individual users to identify themselves and the information requested to be accessed, corrected or removed before processing such requests, and we may decline to process requests that are unreasonably repetitive or systematic,  require disproportionate technical effort , jeopardize the privacy of others, or would be extremely impractical (for instance, requests concerning information residing on backup tapes), or for which access is not otherwise required. In any case where we provide information access and correction, we perform this service free of charge, except if doing so would require a disproportionate effort. Some of our services have different procedures to access, correct or delete users’ personal information. We provide the details for these procedures in the specific privacy notices or FAQs for these services.”

This leaves enough loopholes for Google to pick and choose its privacy policy AND its response. Nice spin, but people understanding law, public relations, databases AND algorithms do exist in the non Google world. The New York Times blog “Bits”: is at the forefront. And its a very good blog for all tech news besides the renowned mashable (www.mashable.com) and Silicon Valley Insider (www.alleyinsider.com)

Watch this space.