1. Iulius Curt
  2. Tema2-ML



Backpropagation Artificial Neural Network

(Tema 2 IA | Iulius Curt 343 C3)

Python (with Numpy) implementation of Artificial Neural Network with Backpropagation


  • Sigmoid function
  • Variable number of hidden layers / neurons on each layer
  • Momentum
  • Error plot


Each test_*.py file can be run to test some different data set / function.

> python test_xor.py

To tweak parameters of disable plot, edit the file.

Test files (associated test data sets found in inputs/):

  • test_xor.py - Simplest, learns XOR function from data set file
  • test_simple.py - Learns an easy quadratic function of one parameter
  • test_concrete.py - Uses the data set at ics.uci.edu
  • test_mpg.py - Relatively good results on MPG data set
  • test_bodyfat.py - Pretty poor results on BodyFat data set

Implementation details:

The weights of the inputs the neurons on each hidden layer and on the output layer are stored in matrices (2D numpy arrays) and computation is done with matrices and vectors operations.