My own implementation of a neural Network.
- Clone the Repository / Download the source code.
- Make a new java file.
- Import the MyNeuralNetwork repository.
- After importing Create a new Object of type
MyNeuralNetwork
. - In constructor you have to provide 3 parameter.
- Desired Number of Inputs for your model.
- Desired Number of Hidden layers.
- Desired Number of Outputs.
- Call the function
objectName.init()
. - You need to provide Number of hidden nodes for all the hidden layers specified in the form of an array OR You need to provide an array of weight matrix and an array of bias matrix for all the hidden layers and the outputs layer.
- After initialization you can call
objectname.train()
orobjectname.predict()
. - The
train()
function expects 2 parameters:- An array of Inputs.
- An array of Outputs.
- It only trains for 1 input at a time (Stochastic) so u can loop if for your data.
- User
objectname.predict()
to get a prediction. It expects 1 parameter for inputs.
Its uses Stochastic method for training a NeuralNetwork.
It is a classic implementation of NeuralNetworks. Uses Feed Forwarding and Back Propagation. Also uses the concept of gradial decend and regression
https://www.youtube.com/playlist?list=PLRqwX-V7Uu6aCibgK1PTWWu9by6XFdCfh