M. Tong's solution to Quora ML Challenge