Sample code for implementing linear regression in mapreduce