Package ann4j

Class InputFileReader

java.lang.Object
ann4j.InputFileReader
Direct Known Subclasses:
MNISTDataBaseFileReader

public class InputFileReader extends Object
  • Field Details

    • filename

      public String filename
  • Constructor Details

  • Method Details

    • getExpectedOutputArray

      public ArrayList<Double> getExpectedOutputArray()
      This function returns an ArrayList of Doubles that represents the expected output of the neural network
      Returns:
      Nothing is being returned.
    • getInputArray

      public ArrayList<Double> 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.