@Test public void testLearn_doubleArrArr() { System.out.println("learn"); double[] eigs = {19538377.0895, 11856555.3340}; double[][] points = { { 2290.274680, 1798.80293}, { -825.382790, 546.81148}, { 59.183341, -367.08135}, { -82.845973, -429.91466}, { -352.499435, -290.90843}, { 293.689633, -405.31194}, { 681.931545, -1108.64478}, { -9.423364, 240.40600}, {-2048.449113, 642.45854}, { 561.108970, -773.36929}, { 164.921799, -549.36704}, {-1935.040811, 49.12514}, { -226.423236, 187.08779}, {-1423.353697, 305.87513}, { -299.498710, 388.80726}, { 260.878046, 416.67381}, { 587.675679, 81.18224}, { -156.836257, -211.13911}, { 709.413282, 1109.36665}, { 839.445911, -1836.79055}, { 911.230500, 205.93020} }; MDS mds = MDS.of(eurodist); assertTrue(MathEx.equals(eigs, mds.scores, 1E-4)); double[][] coords = mds.coordinates; for (int i = 0; i < points.length; i++) { for (int j = 0; j < points[0].length; j++) { assertEquals(Math.abs(points[i][j]), Math.abs(coords[i][j]), 1E-2); } } }
public static MDS of(double[][] proximity) { return of(proximity, new Properties()); }
MDS { public static MDS of(double[][] proximity) { return of(proximity, new Properties()); } }
MDS { public static MDS of(double[][] proximity) { return of(proximity, new Properties()); } MDS(double[] scores, double[] proportion, double[][] coordinates); }
MDS { public static MDS of(double[][] proximity) { return of(proximity, new Properties()); } MDS(double[] scores, double[] proportion, double[][] coordinates); static MDS of(double[][] proximity); static MDS of(double[][] proximity, int k); static MDS of(double[][] proximity, Properties prop); static MDS of(double[][] proximity, int k, boolean positive); }
MDS { public static MDS of(double[][] proximity) { return of(proximity, new Properties()); } MDS(double[] scores, double[] proportion, double[][] coordinates); static MDS of(double[][] proximity); static MDS of(double[][] proximity, int k); static MDS of(double[][] proximity, Properties prop); static MDS of(double[][] proximity, int k, boolean positive); final double[] scores; final double[][] coordinates; final double[] proportion; }