A Brief Introduction to Deep Learning

In this notebook, we provide a very quick (shallow?) introduction to neural networks and deep learning. We review the basic challenge of binary classification and linear decision functions and then show how features can be composed to express more complex decision surfaces. We then build a basic neural network to learn the feature functions and ultimately build more complex models for image classification.

Quick Review of Logistic Regression

We start by reviewing logistic regression. We construct a linearly separable data set and show how a logistic regression model fits this data.

We fit a logistic regression model.

The following block of code generates the prediction surface.

Notice that in the above plot we assign near zero probability of being a "plus" to the region on the left and a near one probability to the region on the right. Also notice that in the middle there is a transition region as the probability being a "plus" goes from zero to one.

Non-linearly Separable Data

We can modify the above data slightly to construct a data set that is no longer linearly separable. Can you find a decision line that would separate this data into "plus" and "circle" regions?

When we fit a logistic regression classifier to this data we no longer get an effective model.