/** * Print history. * * @param log the logger * @param history the history */ public static void printHistory(@Nonnull final NotebookOutput log, @Nonnull final List<StepRecord> history) { if (!history.isEmpty()) { log.out("Convergence Plot: "); log.eval(() -> { final DoubleSummaryStatistics valueStats = history.stream().mapToDouble(x -> x.fitness).filter(x -> x > 0).summaryStatistics(); @Nonnull final PlotCanvas plot = ScatterPlot.plot(history.stream().map(step -> new double[]{step.iteration, Math.log10(Math.max(valueStats.getMin(), step.fitness))}) .toArray(i -> new double[i][])); plot.setTitle("Convergence Plot"); plot.setAxisLabels("Iteration", "log10(Fitness)"); plot.setSize(600, 400); return plot; }); } }
/** * Print history. * * @param log the logger * @param history the history */ public static void printHistory(@Nonnull final NotebookOutput log, @Nonnull final List<StepRecord> history) { if (!history.isEmpty()) { log.out("Convergence Plot: "); log.eval(() -> { final DoubleSummaryStatistics valueStats = history.stream().mapToDouble(x -> x.fitness).filter(x -> x > 0).summaryStatistics(); @Nonnull final PlotCanvas plot = ScatterPlot.plot(history.stream().map(step -> new double[]{step.iteration, Math.log10(Math.max(valueStats.getMin(), step.fitness))}) .toArray(i -> new double[i][])); plot.setTitle("Convergence Plot"); plot.setAxisLabels("Iteration", "log10(Fitness)"); plot.setSize(600, 400); return plot; }); } }
/** * Print history. * * @param log the logger * @param history the history */ public static void printHistory(@Nonnull final NotebookOutput log, @Nonnull final List<StepRecord> history) { if (!history.isEmpty()) { log.out("Convergence Plot: "); log.eval(() -> { final DoubleSummaryStatistics valueStats = history.stream().mapToDouble(x -> x.fitness).filter(x -> x > 0).summaryStatistics(); @Nonnull final PlotCanvas plot = ScatterPlot.plot(history.stream().map(step -> new double[]{step.iteration, Math.log10(Math.max(valueStats.getMin(), step.fitness))}) .toArray(i -> new double[i][])); plot.setTitle("Convergence Plot"); plot.setAxisLabels("Iteration", "log10(Fitness)"); plot.setSize(600, 400); return plot; }); } }
for (int col = 1; col < data[0].length; col++) { final int c = col; log.out("Learned Representation Statistics for Column " + col + " (all bands)"); log.eval(() -> { @Nonnull final ScalarStatistics scalarStatistics = new ScalarStatistics(); }); final int _col = col; log.out("Learned Representation Statistics for Column " + col + " (by band)"); log.eval(() -> { @Nonnull final int[] dimensions = data[0][_col].getDimensions();
for (int col = 1; col < data[0].length; col++) { final int c = col; log.out("Learned Representation Statistics for Column " + col + " (all bands)"); log.eval(() -> { @Nonnull final ScalarStatistics scalarStatistics = new ScalarStatistics(); }); final int _col = col; log.out("Learned Representation Statistics for Column " + col + " (by band)"); log.eval(() -> { @Nonnull final int[] dimensions = data[0][_col].getDimensions();
for (int col = 1; col < data[0].length; col++) { final int c = col; log.out("Learned Representation Statistics for Column " + col + " (all bands)"); log.eval(() -> { @Nonnull final ScalarStatistics scalarStatistics = new ScalarStatistics(); }); final int _col = col; log.out("Learned Representation Statistics for Column " + col + " (by band)"); log.eval(() -> { @Nonnull final int[] dimensions = data[0][_col].getDimensions();
log.out(results.toMarkdownTable());
log.out(results.toMarkdownTable());
@Nullable final Tensor tensor = imageNetwork.eval(input).getData().get(0); TestUtil.renderToImages(tensor, true).forEach(img -> { log.out(log.png(img, "")); });
@Nullable final Tensor tensor = imageNetwork.eval(input).getData().get(0); TestUtil.renderToImages(tensor, true).forEach(img -> { log.out(log.png(img, "")); });
@Nullable final Tensor tensor = imageNetwork.eval(input).getData().get(0); TestUtil.renderToImages(tensor, true).forEach(img -> { log.out(log.png(img, "")); });
@Nonnull final Tensor input = new Tensor(features).set(featureNumber, 1); @Nullable final Tensor tensor = revNetwork.eval(input).getData().get(0); log.out(log.png(tensor.toImage(), ""));
@Nonnull final Tensor input = new Tensor(features).set(featureNumber, 1); @Nullable final Tensor tensor = revNetwork.eval(input).getData().get(0); log.out(log.png(tensor.toImage(), ""));
@Nonnull final Tensor input = new Tensor(features).set(featureNumber, 1); @Nullable final Tensor tensor = revNetwork.eval(input).getData().get(0); log.out(log.png(tensor.toImage(), ""));