krisht / MLP-Implementation

Full implementation of a single-layer perceptron with inference and back-propagation algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multilayer Perceptron Implementation

To run program : python3 MLP.py [train|test] (Requires python3 or it crashes)

Krishna's Dataset

The data set was generated using sklearn.datasets.make_multilabel_classification function which creates an integral inputs with binary outputs indicating which classes the data point comes from. I modified this by dividing all the input data points by the number 17.0, the maximum integer in the inputs since the sample data given to us by Professor Sable were all decimal points and not integers. Initial weights were generated by a uniform distribution in the range [0, 1).

Contains:

  • krishna.train, the training set
  • krishna.test, the testing set
  • krishna.init, the initial weights file
  • krishna.trained, the trained weights file after 1000 epochs and 0.01 learning rate with 25 nodes in the hidden layer. Leads to around 75% overall accuracy, which I considered reasonable
  • krishna.results, the test set evaluation results for running network on data from krishna.test with weights from krishna.trained

About

Full implementation of a single-layer perceptron with inference and back-propagation algorithm


Languages

Language:Python 100.0%