Machine Learning on the Cloud for Pattern Recognition