Machine learning routines from Andrew Ng's coursera course, implemented in CL