PartitionCutPlot

class PartitionCutPlot(data: DoubleArray, partitions: Map<Int, DataPartition>, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value") : BasePlot(source)

The sample, with the cuts the method actually made on it.

Where the partition meets the data. Every component is estimated from its own group, so every reported component depends on two cut positions — and nothing else in a fit's output shows where they fell. This answers the question the density panels cannot: not whether the fitted curve is close, but whether the divisions it is assembled from land anywhere the data suggests.

Read it beside PartitionStability. That reports a three-valued verdict on whether the density follows the cuts; this shows the reader the arrangement the verdict is about. Cuts standing in visible gaps and cuts standing in the middle of a dense stack look nothing alike, and no summary statistic conveys the difference as directly.

Several counts may be drawn at once, which is how an analyst compares a count they proposed against the one that was recommended.

Parameters

data

the sample, which need not be sorted

partitions

the fitted partition at each component count of interest

binWidth

the dot bin width, defaulting to a hundredth of the range

variableName

what the observations measure, for the axis label

Constructors

Link copied to clipboard
constructor(data: DoubleArray, partitions: Map<Int, DataPartition>, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value")

Properties

Link copied to clipboard

An optional caption. Empty by default; see AdmissibleCutPlot.caption for why.

Functions

Link copied to clipboard
open override fun buildPlot(): Plot

Builds a new instance of a Lets-Plot representation of the plot