Package ann4j
Class InputFileReader
java.lang.Object
ann4j.InputFileReader
- Direct Known Subclasses:
MNISTDataBaseFileReader
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis function returns an ArrayList of Doubles that represents the expected output of the neural networkThis function returns an ArrayList of Doubles that represents the input layer of the neural networkdouble
getLabel()
This function returns the label.double
getPredictionFromNeuronNum
(int mostSignificantNeuronNumAsPrediction) > This function takes in the most significant neuron number and returns the predictionvoid
next()
This function goes to next line of the inputfile and is responsible for setting all input parametersvoid
restart()
This function restarts the file reader.
-
Field Details
-
filename
-
-
Constructor Details
-
InputFileReader
InputFileReader(String filename) throws FileNotFoundException - Throws:
FileNotFoundException
-
-
Method Details
-
getExpectedOutputArray
This function returns an ArrayList of Doubles that represents the expected output of the neural network- Returns:
- Nothing is being returned.
-
getInputArray
This function returns an ArrayList of Doubles that represents the input layer of the neural network- Returns:
- An ArrayList of Doubles
-
next
public void next()This function goes to next line of the inputfile and is responsible for setting all input parameters -
getLabel
public double getLabel()This function returns the label. One of the most important method.- Returns:
- The label of the instance.
-
getPredictionFromNeuronNum
public double getPredictionFromNeuronNum(int mostSignificantNeuronNumAsPrediction) > This function takes in the most significant neuron number and returns the prediction- Parameters:
mostSignificantNeuronNumAsPrediction
- The neuron number that has the highest activation value.- Returns:
- The prediction from the most significant neuron number.
-
restart
public void restart()This function restarts the file reader.
-