Autoencoder

[Author: Hussain Mir Ali]

An autoencoder neural network with single hidden layer and multiclass ouput. This project has been written in JavaScript.

External Libraries Used:

Please perform Feature Scaling and/or Mean Normalization along with random shuffling of data for using this program.

Run 'npm i @softnami/autoencoder' .

Sample usage:

import { Autoencoder } from ' @softnami/autoencoder ' ; const callback = function ( data ) { console . log ( data ) ; } ; const autoencoder = new Autoencoder ( { ' hiddenLayerSize ' : 6 , ' p ' : 0 . 05 , ' beta ' : 0 . 3 , ' learningRate ' : 0 . 9 , ' threshold_value ' : undefined , ' regularization_parameter ' : 0 . 001 , ' optimization_mode ' : { ' mode ' : 0 } , ' notify_count ' : 10 , ' iteration_callback ' : callback , ' maximum_iterations ' : 500 } ) ; autoencoder . train_network ( [ [ 1 , 0 , 1 , 1 , 1 , 1 ] , [ 0 , 1 , 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 1 , 0 , 1 ] , [ 0 , 0 , 1 , 0 , 0 , 0 ] , [ 1 , 1 , 0 , 1 , 1 , 1 ] , [ 1 , 0 , 0 , 1 , 0 , 1 ] ] , [ [ 1 , 0 , 1 , 1 , 1 , 1 ] , [ 0 , 1 , 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 1 , 0 , 1 ] , [ 0 , 0 , 1 , 0 , 0 , 0 ] , [ 1 , 1 , 0 , 1 , 1 , 1 ] , [ 1 , 0 , 0 , 1 , 0 , 1 ] ] ) . then ( console . log ( "

Training done!

" ) ) ;

For unit testing Mocha and Sinon have been used.

Run 'npm test', if timeout occurs then increase timeout in test script.

Documentation

The documentation is available in the 'out' folder of this project. Open the 'index.html' file under the 'out' folder with Crhome or Firefox.

To generate the documentation run 'yuidoc .' command in the main directory of this project.

Theory and Background:

Find more about how autoencoders work and the theory behind it. Visit ufdl.standford.edu

💡 Practice Daily Coding