@Test public void testLearn_doubleArrArr() { System.out.println("learn"); double[][] points = { {-41.5471709650684, 18.9187013341311}, {40.7205435629563, 17.8623927312285}, {49.9308397575605, 26.6606879579547}, {-10.3370642672217, 9.00224445858628}, {-35.0083289866438, -3.70032099791862}, {43.9817434767359, 30.0445008138371}, {53.9610358073703, -4.66266636863129}, {57.7358631824272, -1.30607492157220}, {56.1786495749734, 13.5816619077229}, {46.8127057228977, 19.2914454308493}, {59.0902226769002, 2.27622667625115}, {-23.9811287149359, -19.6680495340898}, {-31.6709879452205, -29.2396294358316}, {-30.8738335256604, -21.3164508659988}, {-26.4232478675269, -30.2889337565531}, {-8.3625949282234, -27.6077828194227}, {-43.2767141993124, 2.08695500610564}, {-34.0665151497352, 28.1479741110468}, {-53.6679739887328, 24.6906697729225}, {-26.3733795110345, -33.9315334064056}, {-27.8656506195448, -18.3462042689455}, {-37.9026356029680, -17.9173598811782}, {-23.8179637389194, -7.23898052191483}, {-32.046499530676, -14.3577517651184}, {-32.5177814790751, -35.3376717498908}, {-34.6763890636256, -19.8778449612201}, {-38.5490968653245, -28.9267632818002}, {-26.8781014349665, -21.0963329790359}, {-28.8485414670825, 17.9105069486671}, {-35.6302869743962, -10.9302638970488}, {69.706658204471, -19.5557970676609}, {64.6821432344783, -18.0296263346533}, {68.1001234975685, -23.5894780300945}, {62.6532937426116, -10.9032392932977}, {63.462749924443, 3.45363261991214}, {64.5812679253935, -7.74243025724959}, {68.873610264193, -17.9261405577515}, {55.4373848416417, 4.83812958553159}, {-35.5895808611236, 2.99810046659920}, {-44.557751875965, 32.6215827953748}, {-40.9386737894356, 22.3753055236014}, {-31.6319135101113, 36.7099431156778}, {-41.4105672588672, -1.45061022144205}, {-46.1905233212182, 17.4221608481553}, {-16.6819375141783, 66.7460385633789}, {7.48331523512227, 13.7411283989803}, {7.93068432504942, 33.5679481082113} }; SammonMapping sammon = SammonMapping.of(swiss); assertEquals(0.00383, sammon.stress, 1E-5); double[][] coords = sammon.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 SammonMapping of(double[][] proximity) { return of(proximity, new Properties()); }
SammonMapping { public static SammonMapping of(double[][] proximity) { return of(proximity, new Properties()); } }
SammonMapping { public static SammonMapping of(double[][] proximity) { return of(proximity, new Properties()); } SammonMapping(double stress, double[][] coordinates); }
SammonMapping { public static SammonMapping of(double[][] proximity) { return of(proximity, new Properties()); } SammonMapping(double stress, double[][] coordinates); static SammonMapping of(double[][] proximity); static SammonMapping of(double[][] proximity, int k); static SammonMapping of(double[][] proximity, Properties prop); static SammonMapping of(double[][] proximity, int k, double lambda, double tol, double stepTol, int maxIter); static SammonMapping of(double[][] proximity, double[][] init, double lambda, double tol, double stepTol, int maxIter); }
SammonMapping { public static SammonMapping of(double[][] proximity) { return of(proximity, new Properties()); } SammonMapping(double stress, double[][] coordinates); static SammonMapping of(double[][] proximity); static SammonMapping of(double[][] proximity, int k); static SammonMapping of(double[][] proximity, Properties prop); static SammonMapping of(double[][] proximity, int k, double lambda, double tol, double stepTol, int maxIter); static SammonMapping of(double[][] proximity, double[][] init, double lambda, double tol, double stepTol, int maxIter); final double stress; final double[][] coordinates; }