@Test public void test6(){ double[] v1 = new double[]{19415.212429584662, 191257.52282304363, 913239.9167389673, 566196.942598401, 153677.14241202734}; double[] v2 = new double[]{208269.3339067423, 664207.5606130534, 76527.14625467494, 767410.7016052309, 602059.2951081641}; Asserts.assertEqualLength(v1, v2); Asserts.assertGreaterThanZero(v1); Asserts.assertGreaterThanZero(v2); double res = RMSLogSpectral.distance(v1, v2); Asserts.assertEquals(res, 1.7483863663536607); }
public static double distance(double[] v1,double[] v2){ double res=0; for(int i=0;i<v1.length;i++){ res += Math.pow(Math.log(v1[i])-Math.log(v2[i]),2); } return Math.sqrt(res/v1.length); }
RMSLogSpectral { public static double distance(double[] v1,double[] v2){ double res=0; for(int i=0;i<v1.length;i++){ res += Math.pow(Math.log(v1[i])-Math.log(v2[i]),2); } return Math.sqrt(res/v1.length); } }
RMSLogSpectral { public static double distance(double[] v1,double[] v2){ double res=0; for(int i=0;i<v1.length;i++){ res += Math.pow(Math.log(v1[i])-Math.log(v2[i]),2); } return Math.sqrt(res/v1.length); }  }
RMSLogSpectral { public static double distance(double[] v1,double[] v2){ double res=0; for(int i=0;i<v1.length;i++){ res += Math.pow(Math.log(v1[i])-Math.log(v2[i]),2); } return Math.sqrt(res/v1.length); }  static double distance(double[] v1,double[] v2); }
RMSLogSpectral { public static double distance(double[] v1,double[] v2){ double res=0; for(int i=0;i<v1.length;i++){ res += Math.pow(Math.log(v1[i])-Math.log(v2[i]),2); } return Math.sqrt(res/v1.length); }  static double distance(double[] v1,double[] v2);  }