Example of logistic regression in Python using scikit-learn

Back in April, I provided a worked example of a real-world linear regression problem using R. These types of examples can be useful for students getting started in machine learning because they demonstrate both the machine learning workflow and the detailed commands used to execute that workflow.

Related resources

Publishing your own IPython Notebook

Much like R Markdown documents, IPython Notebooks are a great way to weave together your code, output, and explanation into a single document that can be shared with others via the IPython Notebook Viewer. And unlike R Markdown documents, IPython Notebooks are fully interactive once download by a user. Making a Notebook accessible via the Notebook Viewer is as simple as posting your .ipynb file to a publicly accessible URL (such as a GitHub repo or a Gist), and pasting the link to that file on the Notebook Viewer homepage.

If you're just getting started in Python, I highly recommend downloading the Anaconda distribution of Python 2.7 since it already contains all of the most popular Python modules for data analysis and scientific computing.