public static double rmse(double[] sim, double[] obs) {
        sameArrayLen(sim, obs);
        double error = 0;
        for (int i = 0; i < sim.length; i++) {
            double diff = sim[i] - obs[i];
            error += diff * diff;
        }
        error /= sim.length;
        return Math.sqrt(error);
    }