Neural Networks
What is a Neural Network?
A Neural Network consist of a family of Machine Learning techniques used to model the human brain. Neural Networks are able to extract hidden patterns within data; they’re able to do this by having a bunch of nodes connected to each other (dense). Each node works together to figure out the hidden details and then pass it on to the next node to find connections within those details.
Input Layer
The input layer of a neural network is the list of variables/features we are using in our model.
Weights
In the case of logistic regression, the weights here are the coefficients we are adjusting to fit our model. In other Neural Networks, the weights are a combination of scalar transformations and matrix multiplication on any of the input variables.
Activation Function
In logistic regression we use a sigmoid activation function. Other options you might see are linear, Tanh and ReLU.
Deeper networks = more hidden layers
Why hidden layers?
They are hidden because we do not specify them. They could represent latent factors (as with matrix decomposition), or a combination of the existing variables into new features.
Back propagation — adjusting weights
Moreover, neural nets are dynamic in the sense that, after a certain number of data points have been passed through the model, the weights will be updated with an eye toward optimizing our loss function. (Thinking back to biological neurons, this is like revising their activation potentials.) Typically, this is done by using some version of gradient descent, but other approaches have been attempted.
Convolutional Neural Networks
CNNs are mainly used for image recognition/classification. They can be used for video analysis, NLP (sentiment analysis, topic modeling), and speech recognition. Today we’ll be discussing how CNNs are you used to classify images.
How computer see images
To computers images are a 3D object — composed of 3 matrices — one for each primary color that can be combined in varying intensities to create different colors. Each element in a matrix represents the location of a pixel and contains a number between 0 and 255 which indicates the intensity of the corresponding primary color in that pixel.