tfjs-vis kitchen sink

tfjs-vis is a small set of visualization utilities to make it easier to understand what is going on with your tfjs models. It is designed in a way to work along side regular web apps. This page is a testbed for the api.

Visor


Render Functions

render.table(data, container, options)

render.barchart(data, container, options)

render.barchart with custom color

Individual bars can also be given custom colos

Re-rendering

You can update a bar chart by calling render.barchart again with the same container.

This is also true for any render.* function, to re-render or update just call the function with new data and the same container.


render.histogram(data, container, opts)

render.histogram custom color

re-render histogram


render.linechart(data, container, opts)

render.linechart supports custom colors for lines

Zoom to fit linechart

Truncated linechart: Custom y axis domain


render.scatterplot(data, container, opts)

render.scatterplot supports custom colors for marks

Zoom to fit scatter plot

Custom domain scatter plot


render.confusionMatrix

The diagonal can also be excluded from shading.

Perfect classification.

In a perfect classification scenario where shadeDiagonal is false the chart will override that option as all values lie on the diagonal.


render.heatmap(data, container, opts)

We can also pass in custom labels

Alternate color maps are also supported.

Heatmap displays labels in order provided

Tensor2D's are also supported

Repeated labels are supported