Sunday, April 10, 2022

Neural Network

 

Simple Neural Network in Python


Step 01:

Step 02: input

Step 03: output

Step 04: create NeuralNetwork class

Step 05: intialize variables in class

Step 06: initialize weights as .50 for simplicity

Step 07: activation function ==> S(x) = 1/1+e^(-x)

Step 08: data will flow through the neural network.

Step 09: going backwards through the network to update weights

Step 10: train the neural net for 25,000 iterations

Step 11: flow forward and produce an output

Step 12: go back though the network to make corrections based on the output

Step 13: keep track of the error history over each epoch

Step 14: function to predict output on new and unseen input data

Step 15: create neural network

Step 16: train neural network

Step 17: create two new examples to predict

Step 18: print the predictions for both examples

Step 19: plot the error over the entire training duration




No comments:

Post a Comment

Friendship

Friendship is the most beautiful relation in the world. Friendship is peace, friendship does not have any restrictions of time and space. Th...