Tracer { public static void showHtml(Matrix mtx) throws IOException { showHtml(mtx, false); }  static void showAscii(Vector vec, IgniteLogger log, String fmt); static void showAscii(Vector vec, IgniteLogger log); static void showAscii(Vector vec, String fmt); static String asAscii(Vector vec, String fmt, boolean showMeta); static void showAscii(Matrix mtx); static void showAscii(Matrix mtx, String fmt); static String asAscii(Matrix mtx, String fmt); static void showAscii(Matrix mtx, IgniteLogger log, String fmt); static void showAscii(Vector vec); static void saveAsCsv(Vector vec, String fmt, String filePath); static void saveAsCsv(Matrix mtx, String fmt, String filePath); static void showHtml(Matrix mtx); static void showHtml(Matrix mtx, boolean useAsciiFallback); static void showHtml(Matrix mtx, ColorMapper cm); static void showHtml(Matrix mtx, ColorMapper cm, boolean useAsciiFallback); static void showHtml(Vector vec); static void showHtml(Vector vec, boolean useAsciiFallback); static void showRegressionDatasetInHtml(String name, DataStreamGenerator generator, int limit,
        int xIdx); static void showRegressionDatasetInHtml(DataStreamGenerator generator, int limit,
        int xIdx); static void showClassificationDatasetHtml(DataStreamGenerator generator, int limit,
        int xIdx, int yIdx, boolean isLabeled); static void showClassificationDatasetHtml(String name, DataStreamGenerator generator, int limit,
        int xIdx, int yIdx, boolean isLabeled); static void showHtml(Vector vec, ColorMapper cm); static void showHtml(Vector vec, ColorMapper cm, boolean useAsciiFallback);  }
@Test public void testHtmlVectorTracer() throws IOException { Vector vec1 = makeRandomVector(1000); verifyShowHtml(() -> Tracer.showHtml(vec1)); verifyShowHtml(() -> Tracer.showHtml(vec1, COLOR_MAPPER)); verifyShowHtml(() -> Tracer.showHtml(vec1.copy().sort())); }
@Test public void testHtmlMatrixTracer() throws IOException { Matrix mtx1 = makeRandomMatrix(100, 100); verifyShowHtml(() -> Tracer.showHtml(mtx1, COLOR_MAPPER)); Matrix mtx2 = new DenseMatrix(100, 100); double MAX = (double)(mtx2.rowSize() * mtx2.columnSize()); mtx2.assign((x, y) -> (double)(x * y) / MAX); verifyShowHtml(() -> Tracer.showHtml(mtx2)); }
@Test public void testHtmlVectorTracerWithAsciiFallback() throws IOException { Vector vec1 = makeRandomVector(1000); Tracer.showHtml(vec1, true); Tracer.showHtml(vec1, COLOR_MAPPER, true); Tracer.showHtml(vec1.copy().sort(), true); }
@Test public void testHtmlMatrixTracerWithAsciiFallback() throws IOException { Matrix mtx1 = makeRandomMatrix(100, 100); Tracer.showHtml(mtx1, COLOR_MAPPER, true); Matrix mtx2 = new DenseMatrix(100, 100); double MAX = (double)(mtx2.rowSize() * mtx2.columnSize()); mtx2.assign((x, y) -> (double)(x * y) / MAX); Tracer.showHtml(mtx2, true); }