Take-Away Notes for Machine Learning by Stanford University on Coursera.
Week 4, Lecture 8
Neural Networks: Representation
Motivations
Non-Linear Hypotheses
Some Machine Learning Problems includes too much features that may not suitable for Linear Regression or Logistic Regression.
Given Computer Vision
as example:
A 50*50 RGB pixel image would contains 2500 pixels, and the dimension
of feature size will be
Therefore
Neurons and the Brain
The origins of Neural Networks was algorithms that try to mimic the brain.
It's pretty amazing to want extent is as if you can plug in almost every sensor to the brain and the brain's learning algorithms will just figure out how to learn from that data and deal with that data!
Neural Networks
Model Representation
The value for each of the "activation" nodes is obtained as follows:
where:
The values for each of the "activation" nodes is obtained as follows:
Thus to compute the activation nodes by using a
(Need Further Implementation though)
Dimensions
If a network has
Where the bias nodes
In other words, the output nodes will do not include the bias nodes while the inputs will do.
Forward Propagation: Vectorized Implementation
Define a new variable
Replace by the variable
In other words, for layer
Where the vector representation of
Therefore setting $x = a^{(1)}, we can rewrite the equation as:
where the function
The add a bias unit(equal to
To compute the final hypothesis:
Firstly compute another
The last theta matrix
We'll got our final result with:
Notice that in this last step, between layer j and layer j+1, we are doing exactly the same thing as we did in logistic regression. Adding all these intermediate layers in neural networks allows us to more elegantly produce interesting and more complex non-linear hypotheses.
Applications
Examples and Intuitions
To Be continued. See also in Shower Thoughts
.
Multi-Class Classification
To define resulting classes as
$$y = {
}$$
Where each element
The inner layers, each provide with some new information wich leads to the final hypothesis function:
e.g. for cases of