Package org.jetbrains.kotlinx.dl.visualization.letsplot

Types

PlotFeature
Link copied to clipboard
class PlotFeature(scale: Scale)

PlotFeature represents the filling options for plots that defines its color scale. Used mainly with predefined scales that are available as properties of companion object but can be parametrized with some custom Scale for filling from lets-plot library.

Functions

columnPlot
Link copied to clipboard
fun columnPlot(plots: Iterable<Plot>, columns: Int, imageSize: Int): Figure

Column plot arranges the given iterable of plots in specified number of columns and creates a single figure from all given plots

filtersPlot
Link copied to clipboard
fun filtersPlot(conv2DLayer: Conv2D, plotFeature: PlotFeature = PlotFeature.GRAY, imageSize: Int = 64, columns: Int = 8): Figure

Create a column plot of tile plots for weights of Conv2D layer filters.

flattenImagePlot
Link copied to clipboard
fun flattenImagePlot(sampleNumber: Int, dataset: Dataset, predict: (FloatArray) -> Int? = { null }, labelEncoding: (Int) -> Any? = { it }, plotFeature: PlotFeature = PlotFeature.GRAY): Plot

Create a xyPlot for image data given as array of the following intensities of the plot tiles. Function intended to use with the inputs images from some Dataset for model as it offers to plot extra label that the specified image is labeled by (and additionally supports plotting some predicted label when model prediction is given)

modelActivationOnLayersPlot
Link copied to clipboard
fun modelActivationOnLayersPlot(model: TrainableModel, x: FloatArray, plotFeature: PlotFeature = PlotFeature.GRAY, imageSize: Int = 64, columns: Int = 8): List<Figure>

Create a list of columns plots for model activation on layers. The model is evaluated on given input and the obtained activations arrays of the following layers are converted into separated figures with columns plots of the weights for the filters in Conv2D layers

soundPlot
Link copied to clipboard
fun soundPlot(wavFile: WavFile, beginDrop: Double = 0.0, endDrop: Double = 0.0): Plot

Create a soundPlot for all channels of given WavFile. If it is needed, the plot data can be cut from the beginning or its end because there may be extra noises that disturbs visualization.

xyPlot
Link copied to clipboard
fun xyPlot(imageSize: Int, plotFeature: PlotFeature, f: (Int, Int) -> Float): Plot
fun xyPlot(xSize: Int, ySize: Int, plotFeature: PlotFeature, f: (Int, Int) -> Float): Plot

Create a tile plot with weights from specified function f(x, y) that specifies the intensity of the single tile on the plot (x, y) position.