1. What is Neural Network
Polynomial terms in linear regression and logistic regression, we have heavy features to set hypothesis. For example, if we have
So, setting all the quardratic feqtures is just not a good way to learn complex nonlinear hypothesis. Instead, we use Neural Networks.
Like human brain, single node works as neuron system which get input data
In complicated neural network, neural system divided into multiple layers which has weighted parameters. Input data becomes layer1, output data
To analyze neural network, we make layer
2. Vectorization of Neural Network
To vectorize above term, we start abstracting a as below.
For layer j = 2, z means as below.
So, the vectorized version of x, z is below.
Calculating this for multiple hidden layer,
By using multiple layer of neural network, we can solve complicate non-linear regression problem easily by setting multiple hidden layer.
3. Multiclass Classification
To classify data into multiple classes, we let our hypothesis function return a vector of values. Say we want to classify our data into one of four categories. We will use the following example to see how this classification is done. This algorithm takes as input image and classify it accordingly.
In multiclass classification, we difine y as following :
Each
4. Cost Function
We define a few variables that we need to use.
: total number of layers in the network : number of units in layer l : number of output unit/classes
In regularization of logistic regression, we has the cost function following :
In neural netwrok, we have multiclass classification. So we denote
Because of
5. Back Propagation
To minimze neural network cost function, we use Back Propagation, just like what we were doing gradient descent in regression problem.
: number of examples : number of features : number of layer
We use forward propagation to get
To generalize above term,
And aslo, we can get derivative term like these.
6. Summarization
6.1 Multi-layer Perceptron

With above Neural network system, we will review what we studied. This neural network system has 4 layer with one input layer, one output layer and two hidden layer.
: number of layers : final number of layers
The vectorization of those layer is same as below.
6.2 Feed Forward Propagation
Forward propagation is getting
6.3 Parameter
Before make parameter
Theta matrix's dimension get upper layer dimension times lower layer dimension. If there isn't bias term at first, then matrix's dimension get upper layer dimension times lower layer dimension + 1.
6.4 Cost Function with Regularization
6.5 Back Propagation
To minimze cost function J, we need to calcluate derivative term called 'back propagation'.
Step 1 : Calculating feed forward propagation
Step 2 : Setting
Step 3 : Setting Derivative Terms
'Data Science > Neural Network' 카테고리의 다른 글
[Tensorflow] Overfitting and Underfitting (0) | 2022.09.21 |
---|---|
[Tensorflow] Stochastic Gradient Descent (0) | 2022.09.21 |
[Tensorflow] Deep Neural Networks (0) | 2022.09.21 |
[Tensorflow] A Single Neuron (0) | 2022.09.20 |
[Theorem] Optimizing Neural Network (0) | 2022.09.19 |