This is a project I did as part of my Computer Science degree. It involves designing a MLP backpropagation algorithm, which taking a dataset of 8 predictors and 1 predictant, splitting the dataset and evaluating its performance in predicting the predicant on the test sub-dataset.
Table of Contents
The purpose of this project was implement an artificial neural network, more specifically and multi layered perceptron, trained using the error backpropagation algorithm. The process included data pre-processing (splitting the data into training, validation and test subsets and standardising the data) and creating, training, and implementing the neural network to predict index floods from the given data set.
The performance of the neural network is measured using a variety of different performance evaluations, including: RMS (Root Mean Squared), RSME (Root Mean Squared Deviation), and MSRE (Mean Squared Relative Error) to name a few.
A graph is also plotted to show the actual outputs from the test dataset (x axis) against the predictions that the network made from the test dataset predictors. An example screenshot of this graph is shows below:
This section lists all major frameworks, programming languages, packages and libraries used throughout the project.
To set up this project, get a local copy up and running by either cloning this repository to your IDE, or downloading the ZIP file of the repository and opening it in your IDE.
You will need to install the following software in order to run this project.
- Download the latest version of Python. The download link and installation guide can be found on the following link: https://www.python.org/downloads/
- Download Jupyter Notebook for an enhanced experience when running the project (optional): https://jupyter.org/
- Download all the python libraries listed above in the prerequisites section: Prerequisites
- Clone the repository to your IDE through the command line using the "git" function or through your IDE. Copy the following repository URL:
https://github.com/SaoodCS/Backpropagation-Algorithm
- Run the python file "Backprop Alg with Bold Driver" in your IDE.
- Run the python file "Backprop Alg with Bold Driver" in your IDE.
- Enter 8 as the number of inputs, 1 as the number of outputs (as this is the predictors and predictant of this specific dataset in dataset.txt.)NOTE: You can run the algorithm on your own dataset too by formatting it into a txt file and saving it to the same folder as the algorithm (the first x columns on the LHS should be the inputs and the last x columns on the RHS shoulf be the outputs).
- Enter any number between 4 and 14 as the number of nodes in the hidden layer.
- The output of this algorithm will illustrate the performance of this algorithm based on the predictors in the test dataset. These performance analyses include: RMS (Root Mean Squared), RSME (Root Mean Squared Deviation), and MSRE (Mean Squared Relative Error) to name a few.
- The scatter graph plotted in the output shows the actual outputs from the test dataset (x axis) against the predictions that the network made from the test dataset predictors.
As of now, this project isn't open to contributions. The only contributer is myself, though this may change in the future.
Distributed under the MIT License.
Saood - [email protected]
Project Link: https://github.com/SaoodCS/Backpropagation-Algorithm