Skip to content

Deadddorks/Neural-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural-Network

A feed-forward Neural Network which has I imputs, H hidden layers, N Nodes per hidden layer, and O ouputs.

Data is passed in and received via a double[]. Training is done via passing in an ArrayList<double[]> for the inputs and the coresponding outputs. Eventually I would like to set up a better system for this.

Proper procedure for network setup:

  • new Network(I, H, N, O);
  • setHiddenLayerFunctions(activation function via Function<Double, Double>, derivitive of that function via Function<Double, Double>);
  • setOutputLayerFunction(activation function via Function<Double, Double>, derivitive of that function via Function<Double, Double>);
  • initRandomWeights();
  • adjustDataScalingsToDataSet(input data as ArrayList<double[]>, expected outputs as ArrayList<double[]>);

Once the network is set up, you can then do 3 things:

  • pass in data via input(input data as double[]);
  • pass in data then check the output via getOutputs();
  • train the network via train(list of input datas as ArrayList<double[]>, list of output datas as ArrayList<double[]>, learning rate as double, number of epochs to run through as int, show outputs every this many epochs as int)

Example Successes

13 logical comparisons of 3 booleans

13booleans_1 13booleans_2

Sorting the X and Y coordinates of a tic-tac toe board into 9 bins

x y-9bins

Turning the X and Y coordinates of a tic-tac-toe board into a linear Z

x y-z

About

My attempt at making a feed forward neural network that learns through back-propegation.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages