flattenImagePlot

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)

Return

Plot representing model sample with prediction label if available

Parameters

sampleNumber

index of sample in dataset to be plotted

dataset

that contains the input data to be plotted as model input image and base label

predict

function that can define the label based on model input Defaults to no predict function so no model predict label is plotted.

labelEncoding

mapping from output label number to some human readable label that is plotted. Defaults to identity function.

plotFeature

filling colors of the created plot