Category Archives: Uncategorized

Estimating mixture model parameters in tensorflow

Recently I came across a dataset that seemed to be a mixture of an exponential distribution and a gaussian distribution.  Here is my expectation maximization based solution for determining the parameters for two component distributions. EM Solution for Mixture of … Continue reading

Posted in Uncategorized | Leave a comment

Deep learning solution for netflix prize

Edit: As pointed out in the comments my initial claim that it beats the winning solution turned out to be false. The prize was judged on a dataset that was set in a future time as compared to the training set. … Continue reading

Posted in Uncategorized | 22 Comments

Controlling of robots using python

I started taking a course on robotics by Prof Peter Corke and I ordered this robot on eBay for the project.  Prof Corke has an excellent Matlab toolbox for controlling and visualizing robots.  However the python version is incomplete and some … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Installing Caffe on Yosemite

Step 1: Follow instructions for installing Caffe for 10.9 as on http://caffe.berkeleyvision.org/installation.html Make sure you uninstall all the required packages in brew, modify the formula and then install the packages. Step 2: Edit Makefile look for ifneq ($(findstring 10.9, $(shell sw_vers -productVersion)),) … Continue reading

Posted in Uncategorized | Leave a comment

libgpuarray installation issues

Here are some issues I faced installing Theano and libgpuarray and the solutions for those: Installation failed because of not finding gpuarray use: python setup.py build_ext -L /usr/local/lib -I /usr/local/include and then python setup.py install error importing pygpu If CUDA … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Leveldb v/s berkeley db

I had a requirement to index a good chunk of data (around 250M key value pairs) and wanted to try out both berkeleydb and leveldb. Here are some metrics when running on an amazon m1.xlarge machine.   Time to build the … Continue reading

Posted in Uncategorized | 1 Comment

How to create a set of indicator (booleans / onehot ) variables from a categorical (factor) variables in R

Here is an example of a categorical variable (factor in R) .  data = cbind(data,model.matrix( ~ 0 + user_state, data)) Here user_state is a variable containing 51 values (1 for each state in US).. After the operation, we end up … Continue reading

Posted in Uncategorized | Leave a comment