Scientific ML Studio
Learn/ Studio Tour/ 3.7
3.7 · The blocks, one at a time

Ask for plots and a results table

The Visualisation and Report blocks are optional. They tell the script what to draw and what to write down when training ends.

Both blocks hang off the end of the graph. Each has one input, Model, which you connect to the Train block's Model output. Neither has an output. You can leave them out entirely: the script then trains and saves the model and does nothing else. Starters include both, so you can see what they produce.

Visualisation

It draws the field, the loss curves and, if you ask, a map of where the equation is still not satisfied. All of them are saved as PNG files.

Field Default What it does
Field plot on Draws the trained field over the domain
Field style Auto Auto picks a line for a 1-D domain and a filled contour for a 2-D one. You can force Line, Filled contour or Surface
Grid resolution 200 Points per axis for the plot. More is smoother and slower
Time slices 0.0, 0.5, 1.0 For a time-dependent problem, the times at which to draw the field
Loss vs. epochs on Plots the total loss and each term against epoch
Log scale on Puts the loss curve's vertical axis on a log scale, which is usually clearer
Residual map off Plots where the PDE residual is still largest. That is often where more collocation points would help
Save to disk on Writes each figure as a PNG
Figure folder figures The folder they go in, created if needed
DPI 150 Resolution of the PNG files
Open windows off Leave off on a machine with no display

Files you can expect in the figure folder: field.png for a steady problem or field_t0.png, field_t0.5.png, field_t1.png for the time slices, loss.png, and residual.png if you ticked the residual map.

If your field style does not suit the dimension (a Line plot on a 2-D domain, or a Surface on a 1-D one), the Graph check says so, and the script falls back to the style that does fit.

Report

It writes a table of the trained field at a set of points.

Field Default What it does
File name results.csv The table's name
Format CSV CSV, TSV or JSON records
Rows Interior points Interior points are the same sample used for training; Regular grid is a fresh grid with Grid points per axis; Interior + boundary + initial is every point set the Domain produced
Residual column on Adds the PDE residual at each point
First-derivative columns off Adds the derivative of the first output with respect to each coordinate
Decimal places 6 Significant figures kept
Write a summary block on At the end of the file: the final loss per term, point counts and settings

The table is the easiest way to take a result into a spreadsheet, a plotting program or a comparison script. For an honest accuracy check, use Regular grid rows, so that you are not evaluating only at points the network trained on.

Your screenshot · a Train block wired to a Visualisation block and a Report block, with the Visualisation panel open.

Chapter 3 is finished. In chapter 4 you leave the canvas and get the script: checking the graph and generating the code.