Package ann4j

Class MeanSquaredErrorCalculator

java.lang.Object
ann4j.MeanSquaredErrorCalculator

public class MeanSquaredErrorCalculator extends Object
  • Constructor Details

    • MeanSquaredErrorCalculator

      public MeanSquaredErrorCalculator()
  • Method Details

    • calculateMSE

      public static double calculateMSE(OutputLayer outputLayer, ArrayList<Double> expectedOutputArrayList)
      The function takes in an output layer and an array list of expected outputs. It then calculates the mean squared error between the output layer and the expected output array list
      Parameters:
      outputLayer - The output layer of the neural network
      expectedOutputArrayList - The expected output of the neural network.
      Returns:
      The mean squared error.