Java mean meanSquaredError(double[] x, double[] y)

Here you can find the source of meanSquaredError(double[] x, double[] y)

Description

mean Squared Error

License

Open Source License

Declaration

public static double meanSquaredError(double[] x, double[] y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double meanSquaredError(double[] x, double[] y) {
        double mse = 0;
        for (int i = 0; i < x.length; ++i) {
            mse += Math.pow(x[i] - y[i], 2);
        }//from w ww. j av  a 2s.  com
        return mse / (double) x.length;
    }
}

Related

  1. meanLow(final int a, final int b)
  2. means(double[][] input)
  3. meanSlow(final double[] values)
  4. meanSml(final int a, final int b)
  5. meanSquare(float[] a, int off, int length)
  6. meanSquaredError(double[][] vectorBatch1, double[][] vectorBatch2)
  7. meanWithoutZeros(int[] in, int x1, int x2)
  8. meanWithoutZerosCentered(int[] in, int center, int width)
  9. std(double[] a, double mean, boolean isUnbiasedEstimator)