Code Monkey home page Code Monkey logo

mlp-implementation-coursework's Introduction

MLP-Implementation-Coursework

This is the code for a simple MLP implementation. The implementation was part of the coursework for the Artificial Intelligence module in the second year. It is a simple MLP regression model. This model uses backpropagation and has somne improvements perfromed on it. These include, annealing, momentum, bold driver an their combinations.

It should be noted that due to the nature of the assignment the dataset used cannot be published as I do not hold the Intellectual Property rights. The dataset was pre-processed by removing outliers, non-numerical values and applying Min-Max scaling and standardisation was performed.

Tanh and Sigmoid activation functions have been implemented. Mini-batch was not implemented in this code.

Code structure and use of the modules

csv_reader.py

This file is used to read and load the CSV files that will be used for training, testing and validation. The file had two different variations, one with reduced size which was only the files that had the highest correlation and one with the the entire number of features. The file has been created to only be able to read the CSV files derived from the original dataset.

backpropagation_algorithm.py

Main backpropagation implementation. The algorithm takes care of the forward pass and the backward pass. It also includes the activation functions and their derivatives. The output is also destandardised to allow for easier comparison with the dataset. The weights in this case are randomly generated.

backpropagation_annealing.py

Same implementation with backpropagation_algorithm.py, the main difference is that annealing is applied.

backpropagation_annealing_momentum.py

Same implementation with backpropagation_algorithm.py, but annealing and momentum have been applied.

backpropagation_momentum.py

Same implementation with backpropagation_algorithm.py, but momentum has been applied.

backpropagation_bold_driver.py

Same implementation with backpropagation_algorithm.py, but bold driver has been applied.

backpropagation_momentum_bold_driver.py

Same implementation with backpropagation_algorithm.py, but momentum and bold driver has been applied.

Running the code

To execute the code, the user should run the script for each implementation of the backpropagation algorithm.

Additionally, the code should be modified in the main function to allow for diferent conigurations to be tested.

mlp-implementation-coursework's People

Contributors

georgeani avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.