Package ann4j
Class MeanSquaredErrorCalculator
java.lang.Object
ann4j.MeanSquaredErrorCalculator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateMSE
(OutputLayer outputLayer, ArrayList<Double> expectedOutputArrayList) The function takes in an output layer and an array list of expected outputs.
-
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 networkexpectedOutputArrayList
- The expected output of the neural network.- Returns:
- The mean squared error.
-