@Test public void test7(){ double[] v1 = new double[]{9.629962536879205E8, 1.6826823387640044E8, 1.172045780576203E8, 6.409943660337736E7, 3.0154528518528813E8}; double[] v2 = new double[]{3.2714922830083424E8, 5.708280820465017E7, 6.131738568306583E8, 6.433943832389486E8, 8.06844862750207E8}; Asserts.assertEqualLength(v1, v2); Asserts.assertGreaterThanZero(v1); Asserts.assertGreaterThanZero(v2); double res = RMSLogSpectral.distance(v1, v2); Asserts.assertEquals(res, 1.5073293001300478); }
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);  }