Index

A B C D E F G H I L M N O P R S T U W 
All Classes and Interfaces|All Packages

A

addLeftConnections(Connection) - Method in class ann4j.Neuron
This function adds a connection to the leftConnections list.
addNeuron(Neuron) - Method in class ann4j.Layer
This function adds a neuron to the list of neurons
addNeuronToBeObserved(int, int) - Method in class ann4j.NeuronObserver
Add a neuron to the list of objects to be observed.
addObjectToBeObserved(Observable) - Method in class ann4j.NeuronObserver
This function adds an object to the list of objects that this object will observe.
addObjectToBeObserved(Observable) - Method in interface ann4j.Observer
Add an object to the list of objects to be observed.
addRightConnections(Connection) - Method in class ann4j.Neuron
This function adds a connection to the rightConnections list
ann4j - package ann4j
 
average(double[]) - Static method in class ann4j.NN
It takes an array of doubles, adds them all together, divides by the length of the array, and returns the result
average(ArrayList<Double>) - Static method in class ann4j.NN
It takes an ArrayList of Doubles as input, and returns the average of the elements in the ArrayList

B

backPropagate() - Method in class ann4j.Connection
The backpropagation algorithm is calculating the gradient of the loss function with respect to the weight.
backwardPropagate() - Method in class ann4j.Layer
This function iterates through the list of neurons and calls the backwardPropagate method on each neuron
backwardPropagate() - Method in class ann4j.LayerManager
For each layer in the network, starting from the last layer, call the backwardPropagate function of that layer
backwardPropagate() - Method in class ann4j.Neuron
The neuron first sets its delta, then backpropagates through all of its left connections, and then changes its bias
bias - Variable in class ann4j.Neuron
 

C

calculateActivationForwardPropagation() - Method in class ann4j.Connection
Calculate the activation of the left neuron times the weight of the connection.
calculateMSE() - Method in class ann4j.LayerManager
This function calculates the mean squared error of the network
calculateMSE(OutputLayer, ArrayList<Double>) - Static method in class ann4j.MeanSquaredErrorCalculator
The function takes in an output layer and an array list of expected outputs.
changeWishlist - Variable in class ann4j.Connection
 
clear() - Method in class ann4j.NeuronObserver
Clearing the list of objects that this object will observe.
clear() - Method in interface ann4j.Observer
 
confusionMatrix - Variable in class ann4j.ModelEvaluator
 
Connection - Class in ann4j
 
Connection(Neuron, Neuron) - Constructor for class ann4j.Connection
 

D

delta - Variable in class ann4j.Neuron
 
deregisterObserver(NeuronObserver) - Method in class ann4j.Neuron
 
deregisterObserver(NeuronObserver) - Method in interface ann4j.Observable
Deregisters the observer from the observable
display() - Static method in class ann4j.parameter
Ends the display of the current page.

E

end() - Static method in class ann4j.Writer
This function closes the file that we opened in the start() function
exclude() - Method in class ann4j.Neuron
This function sets the value of the isIncluded variable to false, after which it wont be included in forward propagation
expectedLayer - Variable in class ann4j.Trainer
 
expectedOutputArray - Variable in class ann4j.MNISTDataBaseFileReader
 
ExpectedOutputArrayList - Static variable in class ann4j.LayerManager
 

F

filename - Variable in class ann4j.InputFileReader
 
fileName - Variable in class ann4j.MNISTDataBaseFileReader
 
forwardPropagate() - Method in class ann4j.Layer
The forwardPropagate function iterates through the list of neurons and calls the forwardPropagate method on each neuron
forwardPropagate() - Method in class ann4j.LayerManager
The forwardPropagate() method is called on every layer in the listOfLayers ArrayList, except the input layer
forwardPropagate() - Method in class ann4j.Neuron
The activation of the neuron is set to the rectified value of the weighted sum of the left connections plus the bias
forwardPropagatewithExclusionInputLayer() - Method in class ann4j.LayerManager
The function calculates the relevance of each pixel in the input image by excluding each pixel and calculating the loss function
forwardPropagatewithExclusionInputLayerOnKSamples(int) - Method in class ann4j.Trainer
 

G

generateExpectedOutputArrayFromLabel() - Method in class ann4j.MNISTDataBaseFileReader
This function is responsible for generating the output neurons
generateInputFromBigArray(ArrayList<Double>) - Method in class ann4j.MNISTDataBaseFileReader
It takes the array of all the values in the dataset and returns an array of all the values except the first one
getAccuracy() - Method in class ann4j.ModelEvaluator
It returns the accuracy of the player as a percentage
getActivation() - Method in class ann4j.Neuron
This function returns the activation of the neuron
getBackwardWeightedSum() - Method in class ann4j.Connection
The function returns the gradient of the loss function with respect to the weight
getBatchsize() - Static method in class ann4j.parameter
 
getBias() - Method in class ann4j.Neuron
This function returns the bias of the neuron
getBiasLearningRate() - Static method in class ann4j.parameter
This function returns the bias learning rate
getconfidence() - Method in class ann4j.LayerManager
It returns the confidence of the most significant neuron in the output layer
getDelta() - Method in class ann4j.Neuron
This function returns the value of the delta variable
getEpsillion() - Static method in class ann4j.parameter
Get the value of epsillion for relevance propagation
getExpectedOutputArray() - Method in class ann4j.InputFileReader
This function returns an ArrayList of Doubles that represents the expected output of the neural network
getExpectedOutputArray() - Method in class ann4j.MNISTDataBaseFileReader
This function returns the expected output array
getInputArray() - Method in class ann4j.InputFileReader
This function returns an ArrayList of Doubles that represents the input layer of the neural network
getInputArray() - Method in class ann4j.MNISTDataBaseFileReader
This function returns the inputArray
getInputLayer() - Method in class ann4j.LayerManager
This function returns the input layer of the neural network.
getInstance() - Static method in class ann4j.HiddenLayerNeuronBehaviour
The function returns an instance of the class if one exists, otherwise it creates a new instance and returns it
getInstance() - Static method in class ann4j.InputLayerNeuronBehaviour
(singleton pattern) If the instance of the class is null, create a new instance of the class and return it
getInstance() - Static method in class ann4j.OutputLayerNeuronBehaviour
If myInstance is null, create a new instance of OutputLayerNeuronBehaviour and assign it to myInstance.
getLabel() - Method in class ann4j.InputFileReader
This function returns the label.
getLabel() - Method in class ann4j.MNISTDataBaseFileReader
This function is responsible for setting the labels of the data.
getLayer(int) - Method in class ann4j.LayerManager
This function returns the layer at the specified index
getLayerArray() - Static method in class ann4j.parameter
 
getLayerManager() - Method in class ann4j.Trainer
Returns the LayerManager object that is used to manage the layers in this map.
getLayerNum() - Method in class ann4j.Neuron
This function returns the layer number of the neuron
getLearningRate() - Static method in class ann4j.parameter
 
getListOfNeurons() - Method in class ann4j.Layer
This function returns the list of neurons in the layer
getModelEvaluator() - Static method in class ann4j.parameter
> The function `getModelEvaluator()` returns a new instance of the class `ModelEvaluator`
getModelEvaluator() - Method in class ann4j.Trainer
This function returns the model evaluator
getMostSignificantNeuronAsPredictionInHiddenLayer() - Method in class ann4j.LayerManager
It returns the index of the most significant neuron in the hidden layer
getMostSignificantNeuronNumAsPrediction() - Method in class ann4j.LayerManager
It returns the index of the neuron in the output layer that has the highest activation value
getNeuron(int) - Method in class ann4j.Layer
This function returns the neuron at the specified index in the list of neurons
getNeuronNum() - Method in class ann4j.Neuron
This function returns the number of neurons in the layer
getNeuronNumberToBeTestedinRelavancePropagation() - Static method in class ann4j.LayerManager
This function returns the number of neurons to be tested in relevance propagation
getOutput() - Method in class ann4j.LayerManager
Return the last layer in the listOfLayers ArrayList.
getOutputLayer() - Method in class ann4j.LayerManager
This function returns the output layer of the neural network
getPredictionFromNeuronNum(int) - Method in class ann4j.InputFileReader
> This function takes in the most significant neuron number and returns the prediction
getPredictionFromNeuronNum(int) - Method in class ann4j.MNISTDataBaseFileReader
 
getRandom() - Static method in class ann4j.NN
This function returns a random number between 0 and 1.
getSize() - Method in class ann4j.Layer
This function returns the number of neurons in the layer
getSmallSignedRandom() - Static method in class ann4j.NN
It returns a random number between -0.5 and 0.5
getTestingAccuracy() - Method in class ann4j.ModelEvaluator
This function returns the testing accuracy of the model
getTestingFileReader() - Static method in class ann4j.parameter
This function returns the testingFileReader object
getTrainingAccuracy() - Method in class ann4j.ModelEvaluator
This function returns the training accuracy of the model
getTrainingFileReader() - Static method in class ann4j.parameter
This function returns the trainingFileReader object
getWeight() - Method in class ann4j.Connection
This function returns the weight of the object
getWeightedSum() - Method in class ann4j.Neuron
It calculates the weighted sum of the left connections of the neuron

H

HiddenLayer - Class in ann4j
 
HiddenLayer(int) - Constructor for class ann4j.HiddenLayer
 
HiddenLayerNeuronBehaviour - Class in ann4j
 

I

include() - Method in class ann4j.Neuron
This function sets the isIncluded variable to true after which it will be included in forward propagation
initializeList(int) - Method in class ann4j.ModelEvaluator
Initialize the confusion matrix to all zeros
initializeWeights() - Method in class ann4j.Connection
This function initializes the weight of the connection to a small random number
inputArray - Variable in class ann4j.MNISTDataBaseFileReader
 
InputFileReader - Class in ann4j
 
InputFileReader(String) - Constructor for class ann4j.InputFileReader
 
inputLayer - Variable in class ann4j.LayerManager
 
inputLayer - Variable in class ann4j.Trainer
 
InputLayer - Class in ann4j
 
InputLayer(int) - Constructor for class ann4j.InputLayer
 
InputLayerNeuronBehaviour - Class in ann4j
 

L

label - Variable in class ann4j.MNISTDataBaseFileReader
 
label - Variable in class ann4j.Trainer
 
Layer - Class in ann4j
 
Layer(int) - Constructor for class ann4j.Layer
 
LayerManager - Class in ann4j
 
LayerManager(int[]) - Constructor for class ann4j.LayerManager
 
layerNum - Variable in class ann4j.Layer
 
layerNum - Variable in class ann4j.Neuron
 
leakyrelu(double) - Static method in class ann4j.NN
If the number is greater than 0, return the number, else return 0.1 times the number
leftConnections - Variable in class ann4j.Neuron
 
leftNeuron - Variable in class ann4j.Connection
 
listOfLayers - Variable in class ann4j.LayerManager
 
listOfNeurons - Variable in class ann4j.Layer
 
lossFunction - Static variable in class ann4j.LayerManager
 

M

main(String[]) - Static method in class Main
 
Main - Class in Unnamed Package
 
Main() - Constructor for class Main
 
MeanSquaredErrorCalculator - Class in ann4j
 
MeanSquaredErrorCalculator() - Constructor for class ann4j.MeanSquaredErrorCalculator
 
MNISTDataBaseFileReader - Class in ann4j
 
MNISTDataBaseFileReader(String, int) - Constructor for class ann4j.MNISTDataBaseFileReader
 
ModelEvaluator - Class in ann4j
 
ModelEvaluator() - Constructor for class ann4j.ModelEvaluator
 
myBehaviour - Variable in class ann4j.Layer
 
myBehaviour - Variable in class ann4j.Neuron
 
myLayerManager - Variable in class ann4j.Trainer
 
myWriter - Static variable in class ann4j.Writer
 

N

Neuron - Class in ann4j
 
Neuron() - Constructor for class ann4j.Neuron
 
NeuronBehaviour - Interface in ann4j
 
neuronNum - Variable in class ann4j.Neuron
 
NeuronObserver - Class in ann4j
 
NeuronObserver() - Constructor for class ann4j.NeuronObserver
 
next() - Method in class ann4j.InputFileReader
This function goes to next line of the inputfile and is responsible for setting all input parameters
next() - Method in class ann4j.MNISTDataBaseFileReader
It reads the next line of the file, converts it into a two double arrays, and then sets the label and expected output array
NN - Class in ann4j
 
notifyObservers(String) - Method in class ann4j.Neuron
For each observer in the observerList, call the update function of that observer, passing in the info and this neuron, which will be typecasted later.
notifyObservers(String) - Method in interface ann4j.Observable
Notify all observers of a change in the subject.
numberOfInputNeurons - Static variable in class ann4j.parameter
 
numberOfOutputNeurons - Static variable in class ann4j.parameter
 

O

Observable - Interface in ann4j
 
observableList - Variable in class ann4j.NeuronObserver
 
Observer - Interface in ann4j
 
observerList - Variable in class ann4j.Neuron
 
outputLayer - Variable in class ann4j.LayerManager
 
OutputLayer - Class in ann4j
 
OutputLayer(int) - Constructor for class ann4j.OutputLayer
 
outputLayerLength - Variable in class ann4j.MNISTDataBaseFileReader
 
OutputLayerNeuronBehaviour - Class in ann4j
 

P

parameter - Class in ann4j
 
parameter() - Constructor for class ann4j.parameter
 
printConfusionMatrix() - Method in class ann4j.Trainer
This function prints the confusion matrix of the model
printConfusionMatrix(InputFileReader) - Method in class ann4j.ModelEvaluator
It prints the confusion matrix
printWeights() - Method in class ann4j.Layer
It prints the weights of the neurons

R

readLineToDoubleArray() - Method in class ann4j.MNISTDataBaseFileReader
It reads the next line of the file, splits it into an array of strings, and then converts that array of strings into an array of doubles
rectify(double) - Static method in class ann4j.parameter
 
registerObserver(Observer) - Method in class ann4j.Neuron
 
registerObserver(Observer) - Method in interface ann4j.Observable
Register an observer to be notified when the data changes.
relevance - Variable in class ann4j.Neuron
 
relevancePropagate() - Method in class ann4j.Layer
This function iterates through the list of neurons and calls the relevancePropagate method on each neuron
relevancePropagate() - Method in class ann4j.Neuron
The function `relevancePropagate()` is called on the `myBehaviour` object, which is of type `Behaviour`, and the `this` object is passed as an argument
relevancePropagate(int, int) - Method in class ann4j.LayerManager
The function takes in the layer number and the neuron number of the output layer and then calculates the relevance of each pixel in the input layer
relevancePropagate(int, int) - Method in class ann4j.Trainer
This function propagates relevance from the output layer to the input layer
relevancePropagate(Neuron) - Method in class ann4j.HiddenLayerNeuronBehaviour
 
relevancePropagate(Neuron) - Method in class ann4j.InputLayerNeuronBehaviour
 
relevancePropagate(Neuron) - Method in interface ann4j.NeuronBehaviour
This function propagates the relevance from the output layer to the input layer
relevancePropagate(Neuron) - Method in class ann4j.OutputLayerNeuronBehaviour
 
relu(double) - Static method in class ann4j.NN
If the number is greater than 0, return the number.
reset() - Method in class ann4j.ModelEvaluator
This function resets the confusion matrix, the correct counter, and the turns counter
resetConfusionMatrix() - Method in class ann4j.ModelEvaluator
 
restart() - Method in class ann4j.InputFileReader
This function restarts the file reader.
restart() - Method in class ann4j.MNISTDataBaseFileReader
 
rightConnections - Variable in class ann4j.Neuron
 
rightNeuron - Variable in class ann4j.Connection
 

S

setActivation(double) - Method in class ann4j.Neuron
This function sets the activation of the neuron to the value passed in as a parameter
setBatchsize(int) - Static method in class ann4j.parameter
 
setBehaviour() - Method in class ann4j.HiddenLayer
 
setBehaviour() - Method in class ann4j.InputLayer
 
setBehaviour() - Method in class ann4j.Layer
The setBehaviour() function is an abstract function that is used to set the behaviour of the animal.
setBehaviour() - Method in class ann4j.OutputLayer
 
setBehaviour(NeuronBehaviour) - Method in class ann4j.Neuron
This function sets the behaviour of the neuron to the behaviour passed in as a parameter.
setBias() - Static method in class ann4j.NN
This function returns a random number between 0 and 0.1
setBiasLearningRate(double) - Static method in class ann4j.parameter
This function sets the learning rate for the bias
setDelta() - Method in class ann4j.Neuron
The delta difference of the neuron in layer has been changed
setDelta(Neuron) - Method in class ann4j.HiddenLayerNeuronBehaviour
 
setDelta(Neuron) - Method in class ann4j.InputLayerNeuronBehaviour
 
setDelta(Neuron) - Method in interface ann4j.NeuronBehaviour
This function sets the delta value of the neuron
setDelta(Neuron) - Method in class ann4j.OutputLayerNeuronBehaviour
 
setEpsillion(double) - Static method in class ann4j.parameter
This function sets the epsillion value to the value passed in
setExpectedOutputArray(ArrayList<Double>) - Method in class ann4j.LayerManager
This function takes an ArrayList of Doubles as an argument and sets the ExpectedOutputArrayList variable to the argument
setFile(String) - Static method in class ann4j.Writer
 
setInput(ArrayList<Double>) - Method in class ann4j.InputLayer
This is setting the activation of each neuron in the input layer to the corresponding value in the input array
setInputLayer(ArrayList<Double>) - Method in class ann4j.LayerManager
This function takes an ArrayList of Doubles and sets the inputLayer's input to that ArrayList
setLayerArray(int...) - Static method in class ann4j.parameter
 
setLayerNum(int) - Method in class ann4j.Layer
This function sets the layer number for each neuron in the layer
setLayerNum(int) - Method in class ann4j.Neuron
This function sets the layer number of the neuron
setLearningRate(double) - Static method in class ann4j.parameter
This function sets the learning rate of the neural network
setModel(LayerManager) - Method in class ann4j.NeuronObserver
This function sets the model to be observed.
setNeuronNum(int) - Method in class ann4j.Neuron
This function sets the number of neurons in the layer
setNeuronNumberToBeTestedinRelavancePropagation(double) - Static method in class ann4j.parameter
 
setNeuronNumberToBeTestedinRelavancePropagation(Double) - Static method in class ann4j.LayerManager
This function sets the number of neurons to be tested in relevance propagation
setOutputFile(String, boolean) - Static method in class ann4j.parameter
It sets the output file and enables/disables printing in console.
setPrintInConsoleEnabled(boolean) - Static method in class ann4j.Writer
It sets the value of the static variable printInConsole to the value of the parameter bool.
setRectificationFunction(String) - Static method in class ann4j.parameter
This function sets the rectification function to be used in the network
setTestingaccuracy(double) - Method in class ann4j.ModelEvaluator
This function sets the testing accuracy of the model
setTestingFileReader(InputFileReader) - Static method in class ann4j.parameter
 
setTestingFileReader(String, String) - Static method in class ann4j.parameter
It sets the testing file reader to the required file reader.
setTrainingaccuracy(double) - Method in class ann4j.ModelEvaluator
This function sets the training accuracy of the model
setTrainingFileReader(InputFileReader) - Static method in class ann4j.parameter
 
setTrainingFileReader(String, String) - Static method in class ann4j.parameter
 
sigmoid(double) - Static method in class ann4j.NN
The sigmoid function takes a number and returns a number between 0 and 1
singleFileReader - Variable in class ann4j.MNISTDataBaseFileReader
 
softplus(double) - Static method in class ann4j.NN
The softplus function is a smooth approximation of the rectifier function

T

tanh(double) - Static method in class ann4j.NN
The tanh function takes a number and returns the hyperbolic tangent of that number
test(int) - Method in class ann4j.Trainer
Used to test the model.
testingFileReader - Variable in class ann4j.Trainer
 
toString() - Method in class ann4j.Connection
This function returns a string that contains the neuron numbers of the neurons that are connected by this connection, as well as the weight of the connection
toString() - Method in class ann4j.Layer
This function returns a string that contains the layer number, the length of the list of neurons, and the toString() function of each neuron in the list of neurons
toString() - Method in class ann4j.LayerManager
This function returns a string representation of the neural network
toString() - Method in class ann4j.Neuron
The toString() function returns a string representation of the object
train() - Method in class ann4j.Trainer
The function takes in an input layer and an expected output layer, and then it uses the input layer to predict the expected output layer
train(int, int) - Method in class ann4j.Trainer
The function trains the neural network by reading the training data from the mnist database and updating the weights and biases of the neural network
Trainer - Class in ann4j
 
Trainer() - Constructor for class ann4j.Trainer
 
trainingFileReader - Variable in class ann4j.Trainer
 

U

update(String, Observable) - Method in class ann4j.NeuronObserver
The update function is called when the observable object is changed
update(String, Observable) - Method in interface ann4j.Observer
The update function is called when the observable object is changed.
updateConfusionMatrix(ArrayList<Double>, int) - Method in class ann4j.ModelEvaluator
This function updates the confusion matrix by comparing the expected output array with the predicted output array
updateConfusionMatrix(ArrayList<Double>, ArrayList<Double>) - Method in class ann4j.ModelEvaluator
This function takes in two arrays, one of expected outputs and one of actual outputs, and updates the confusion matrix accordingly __ __ __ __ |TP FP | 0 1 |FN TN | 2 3
updatePredictionData(double, double, double) - Method in class ann4j.ModelEvaluator
This function updates the prediction data

W

write(Object...) - Static method in class ann4j.Writer
It takes in a variable number of arguments and prints them out
writeln(Object...) - Static method in class ann4j.Writer
 
Writer - Class in ann4j
 
Writer() - Constructor for class ann4j.Writer
 
A B C D E F G H I L M N O P R S T U W 
All Classes and Interfaces|All Packages