Neural Network – Back Propagation – Tutorial in Python


Neural Network is a concept which tries to mimic human brain to solve computational issues. Neural network consists of basic units called Neurons. Each neuron has some functions and they together with other neurons solve complex issues. Neural network as a concept has been around since 1960’s (maybe before that too). But it lost its importance in 1990’s. Due to recent advancements in computational power and some algorithmic breakthrough’s, it has started to play an important role for many complex machine learning problems.

Brief overview:

Neuron : Each Neuron can have one or more inputs and one or more outputs. Each connection between other neurons with some weights associated.

Feed forward : The input is processed through one  or many layers of neurons to get the output.

Back Propagation : The Error which is the difference between the predicted output and the original target output, is propagated from the output to the input in a reverse manner, so that the weights of the neurons adjust itself to the error.

Python Code:

Feed Forward

Back Propagation

Full code :

Learning materials :

Python for Machine Learning and Data Engineering

Read this if you are new to Machine learning.

In this post, I want to summarize the useful tutorials to learn machine learning using python. Python provides a comprehensive set of tools for ML. iPython Notebook is one of the best tools that I have come across in recent times.


  • Pandas — Importing data and for preprocessing
  • Numpy — Fast, Efficient Matrix manipulations
  • Sklearn — Machine learning toolkit.
  • iPython — Interactive environment to code.

These 2 videos will help you kickstart on iPython and Sklearn

Exploring Machine Learning with Scikit-learn

Diving Deeper into Machine Learning with Scikit-learn

If you are new to python, I would recommend the python course on Udacity

In the meantime, Kaggle also provides good tutorial set to try out python

If you find any other useful tutorials, please add it to the comment