nlokare / mlclass

Python code for Machine Learning course from Coursera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mlclass

These are Python code for Machine Learning course's exercise from Coursera, the one taught by Andrew Ng. You can find the course available online here: https://www.coursera.org/course/ml

I made it in Python since some of the Octave functionalities don't work on my computer, for example plotting. Thus I managed to recreate most if not all of the exercises in Python.

These codes require the following libraries:

  1. Numpy (http://www.numpy.org), for matrix and array manipulations

  2. Scipy (http://www.scipy.org), used mainly on optimization / minimization functions

  3. Matplotlib (http://matplotlib.org), for plotting

  4. NLTK (http://www.nltk.org), mainly for preprocessing text in spam detection section

  5. Sci-Kit Learn (http://scikit-learn.org/stable/), used for the SVM section. This is a great machine learning library

Most of my libraries are installed using either HomeBrew or pip, here's one of the good tutorial on how to install those modules: http://penandpants.com/2013/04/04/install-scientific-python-on-mac-os-x/

You might want to tap into homebrew-science beforehand (https://github.com/Homebrew/homebrew-science)

Please note that, all of the codes here are for reference / evaluation purposes only, please don't use submit it as the programming exercise answer of the actual course.

Some of the python library behaves bit different and output different results compared to Octave / Matlab, these could be the result of numerical instability or just different implementation of the same algorithm. But most of the python codes uploaded here will exhibit similar result to its Octave counterpart.

Have fun !

Don't forget to change the path of the files being loaded in each and everyone of those python files

About

Python code for Machine Learning course from Coursera


Languages

Language:Python 100.0%