@Test public void testLearn_doubleArrArr_double() { System.out.println("learn"); double[] eigs = {42274973.8, 31666186.4}; double[][] points = { { 2716.561820, 3549.216493}, {-1453.753109, 455.895291}, { 217.426476, -1073.442137}, { 1.682974, -1135.742982}, { -461.875781, -871.913389}, { 594.256798, -1029.818247}, { 1271.216005, -1622.039302}, { -88.721376, 4.068005}, {-3059.180990, 836.535103}, { 1056.316198, -1350.037932}, { 445.663432, -1304.392098}, {-2866.160085, 211.043554}, { -436.147722, -140.147837}, {-2300.753691, 234.863677}, { -586.877042, 217.428075}, { 336.906562, 350.948939}, { 928.407679, -112.132182}, { -193.653844, -847.157498}, { 908.682100, 1742.395923}, { 1499.140467, -1897.522865}, { 1319.918808, 295.010834} }; MDS mds = MDS.of(eurodist, 2, true); assertTrue(MathEx.equals(eigs, mds.scores, 1E-1)); 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; }