/neural-net-scratch

A multi-layer perceptron trained using Backpropagation in Java for Multi-class Classification.

Primary LanguageJavaApache License 2.0Apache-2.0

Neural Network (Multi Layer Perceptron) from Scratch

A multi-layer perceptron trained using Backpropagation in Java for Multi-class Classification. The algorithm has been implemented from scratch without using any package or library. All the computation operations has been implemented from scratch. The code is designed using Object Oriented Programming(OOP) approach considering robustness & reuseability.

alt text

The algorithm has been designed to comprise any number of hidden layers and any number of nodes in a layer. The algorithm can be used as multi-class classifier. So far it has been trained and tested on two datasets few Urdu Language Alphabets and Iris Flower Dataset for multi-class classification.

It uses sigmoid activation function in hidden layers of model and softmax in output layer used for multi-class classification. The error calculated for softmax output is Cross Entropy Loss.

alt text

Requirments

  • javac 1.8.0_121