Wednesday, September 18, 2019

Understanding Deep Learning with TensorFlow playground


The TensorFlow playground can be used to illustrate that deep learning uses multiple layers of abstraction.

First, notice blue represents +1, orange represents -1, and white represents 0.

Let’s start with the default classification example. There are 4 datasets.
The four datasets: circular, 4 quadrants, 2 clusters, and a swirl

The datasets all have 2 input features and 1 output label. The 2 input features, X1 and X2, are represented by the coordinates. X1 is the horizontal axis and X2 is the vertical axis. You can infer that from the feature inputs below.
Graph of input features: X1 and X2



The output label is the color of the dots, blue (+1) or orange (-1).
Features: X1, and X2 the horizontal and vertical axes. The label: blue(+1) or orange(-1) dots.

The first 3 datasets can be solved with the default setting with 2 hidden layers. However the 4th, the swirl dataset, can not. When you click the play button it is actually training a neural network that runs in your browser. The background color of the output changes from light shades (representing 0) to blue and orange patterns that illustrate what the network will predict for new input.



So how can we get the swirl dataset to converge on a solution?
One way is to do feature engineering. Add new input features. You take the input features and square them, multiply them together, take sin and cos and feed them into a shallow neural network. This represents classical machine learning and feature engineering.





0 comments:

Post a Comment