Automatic Python documentation with Sphinx autodoc and ReadTheDocs

Generating Python documentation for packages/modules can be quite time consuming, but there’s a way to generate it automatically from docstrings. This post is mostly a summary of the fantastic guide by Sam Nicholls found here, but with one important addition (see the section on mocking). We’ll be using the following: Sphinx – Python package for … Read moreAutomatic Python documentation with Sphinx autodoc and ReadTheDocs

Overview of Convolutional Neural Networks (CNN)

Regular feed-forward artificial neural networks (ANN), like the type featured below, allow us to learn higher order non-linear features, which typically results in improved prediction accuracy over smaller models like logistic regression. However, artificial neural networks have a number of problems that make them less ideal for certain types of problems. For example, imagine a … Read moreOverview of Convolutional Neural Networks (CNN)

XOR Logic Gate – Neural Networks

We have previously discussed OR logic gates and the importance of bias units in AND gates. Here, we will introduce the XOR gate and show why logistic regression can’t model the non-linearity required for this particular problem. As always, the full code for these examples can be found in my GitHub repository here. XOR gates … Read moreXOR Logic Gate – Neural Networks

AND Logic Gate – Importance of bias units

Previously, we talked about simple OR gates and now we’ll continue that discussion with AND gates, and specifically the role of bias units. We often neglect to consider the role bias plays in our models. We know that we should include bias units, but why? Here, I’ll walk through a short example using an AND … Read moreAND Logic Gate – Importance of bias units

OR Logic Gate using Theano

Theano is a powerful Python library that provides some useful tools for machine learning, such as GPU training and symbolic differentiation of the cost function during gradient descent. It can be a bit challenging to understand how Theano works, so before jumping into more complex non-linear models, we can get to grips with Theano by … Read moreOR Logic Gate using Theano

Multiple Regression using Python

Whenever I do any machine learning I either manually implement models in MATLAB or use Python libraries like scikit-learn where all of the work is done for me. However, I wanted to learn how to manually implement some of these things in Python so I figured I’d document this learning process over a series of … Read moreMultiple Regression using Python