Package-level declarations

Types

Link copied to clipboard

Whether a sample is large enough for the number of components to be answerable at all.

Link copied to clipboard
class AdmissibilityCertificate(sortedData: DoubleArray, val minimumGroupSize: Int = defaultMinimumGroupSize, val minimumDistinctValues: Int = defaultMinimumDistinctValues)

Structural facts about a sorted sample that determine which partitions can exist, computed once in O(n) and reused by every partition generator, refiner, and search over that sample.

Link copied to clipboard
class AdmissibleCutPlot(data: DoubleArray, certificate: AdmissibilityCertificate, variableName: String = "observed value") : BasePlot

Which cut positions a run of equal values rules out.

Link copied to clipboard
data class ComponentCandidate(val distribution: ContinuousDistributionIfc, val estimationResult: EstimationResult, val rvType: RVParametersTypeIfc, val numParameters: Int, val name: String)

One family successfully fitted to one group, retained as a candidate component.

Link copied to clipboard
class ComponentCountEvidence(val rows: List<ComponentCountRow>, val hypothesisedCount: Int?, val criterionChoices: Map<String, Int>)

Why the criterion chose the number of components it chose, and how much that is worth.

Link copied to clipboard
data class ComponentCountRow(val numComponents: Int, val logLikelihood: Double?, val marginalGain: Double?, val penaltyIncrement: Double?, val criterionValues: Map<String, Double>, val isFeasible: Boolean)

What is known about one candidate number of components.

Link copied to clipboard
class ComponentCountTest(val hypothesisedNumComponents: Int, val alternativeNumComponents: Int, val numObservations: Int, val improvementStatistic: Double?, nullStatistics: DoubleArray, val numReplicates: Int, val level: Double = defaultLevel)

A procedure-calibrated test of a hypothesised component count against one more than itself.

Link copied to clipboard

Memoizes group fits by index range, so that a group range fitted once is never fitted again for the same sample.

Link copied to clipboard

Fits the catalog of candidate families to a contiguous group of sorted observations.

Link copied to clipboard
data class ComponentRejection(val rvType: RVParametersTypeIfc?, val message: String)

One family that was attempted for a group and rejected, with the estimator's own explanation.

Link copied to clipboard
data class CountAdequacy(val hypothesisedCount: Int, val separability: Double, val sampleSize: Int, val verdict: AdequacyVerdict)

How much data the fitted component count needs, and whether this sample has it.

Link copied to clipboard

What a sample says about a component count the analyst proposed.

Link copied to clipboard

What moving the cuts revealed about the reported fit.

Link copied to clipboard
class DataPartition(val numObservations: Int, cuts: IntArray)

An immutable contiguous partition of sorted data into k groups, represented by the interior cut positions rather than by copying the data.

Link copied to clipboard

What the workflow advises after looking at the data but before fitting anything.

Link copied to clipboard
data class EstimationWindow(val startIndex: Int, val endIndex: Int)

A half-open range of observation indices from which a component is estimated.

Link copied to clipboard

Computes estimation windows from assignment groups.

Link copied to clipboard
class FitAdequacy(val numObservations: Int, val observedStatistic: Double?, nullStatistics: DoubleArray, val numReplicates: Int, val functionals: List<FunctionalAgreement> = emptyList(), val level: Double = defaultLevel)

Whether a fitted mixture reproduces the sample it came from.

Link copied to clipboard
class FittedAgainstDataPlot(data: DoubleArray, fitted: ContinuousDistributionIfc, numDrawn: Int = data.size, streamNum: Int = 1, streamProvider: RNStreamProviderIfc = ksl.utilities.random.rvariable.KSLRandom.DefaultRNStreamProvider, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value") : BasePlot

The real sample against a sample drawn from the fitted density, side by side.

Link copied to clipboard

Whether the fitted density is consistent with the data it was fitted to.

Link copied to clipboard
data class FunctionalAgreement(val name: String, val fromData: Double, val fromFit: Double)

One summary of the data set beside the same summary of the fitted density.

Link copied to clipboard

What the criterion gained by adding each component, against what it charged for it.

Link copied to clipboard
data class GroupFitResult(val startIndex: Int, val endIndex: Int, val candidates: List<ComponentCandidate>, val rejections: List<ComponentRejection>)

The outcome of fitting every candidate family to one group: those that succeeded, and those that did not together with why.

Link copied to clipboard

Assesses how much a mixture recommendation depends on the particular sample it was fitted to.

Link copied to clipboard
class MixtureBootstrapResults(val componentCountFrequency: IntegerFrequency, val familyByPosition: Map<Int, Map<String, Int>>, val modalComponentCount: Int?, val numSamples: Int, val numFitted: Int, val distinctValues: Statistic, val isParametric: Boolean, val originalDistinctValues: Int = 0)

What repeated refitting on resampled data said about a recommendation.

Link copied to clipboard
class MixtureCandidate(val partition: DataPartition, components: List<ComponentCandidate>)

One assembled mixture: a partition, one fitted component per group, and the mixing weights implied by the group sizes.

Link copied to clipboard
data class MixtureCoverage(val numEvaluated: Int, val numZeroDensity: Int, val averageLogLikelihood: Double?)

How much of a fresh sample a fitted mixture accounts for.

Link copied to clipboard
class MixtureDataDescription(val numObservations: Int, val numDistinctValues: Int, val statistics: StatisticIfc, val maximumFeasibleComponents: Int, val modality: ModalityAssessment)

Everything known about a sample before a mixture is fitted to it.

Link copied to clipboard
data class MixtureLogLikelihoodResult(val value: Double, val numZeroDensity: Int, val numResponsibilityUndefined: Int)

The observed-data log-likelihood of a mixture, together with the diagnostics needed to know whether that number can be compared with another one.

Link copied to clipboard
class MixtureModeler(data: DoubleArray, fitter: ComponentFitterIfc = PDFComponentFitter(), val criterion: MixtureCriterionIfc = MixtureBICCriterion(), minimumGroupSize: Int = AdmissibilityCertificate.defaultMinimumGroupSize, minimumDistinctValues: Int = AdmissibilityCertificate.defaultMinimumDistinctValues)

Fits a mixture of continuous distributions to univariate data by partitioning the sorted sample, fitting a component to each part, and ranking the assembled mixtures.

Link copied to clipboard
class MixtureModelingResults(val results: List<RankedMixture>, val certificate: AdmissibilityCertificate, val groupFitsByGroupCount: Map<Int, List<GroupFitResult>>, val rejectedGroupCounts: Map<Int, String>, val cacheHitRate: Double, val truncatedGroupCounts: Map<Int, String> = emptyMap(), val refinementsByGroupCount: Map<Int, RefinementResult> = emptyMap(), sortedData: DoubleArray = DoubleArray(0), val criterion: MixtureCriterionIfc = MixtureBICCriterion(), val specifiedComponentCounts: Set<Int>? = null)

Everything produced by one modeling run.

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

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

Link copied to clipboard
class PartitionStability(val baselineNumComponents: Int, val numObservations: Int, val displacements: List<Double>, val hellingerFromBaseline: List<Double?>, val numObservationsReassigned: List<Int?>, val gapShare: Double = defaultGapShare, val gapMovement: Double = defaultGapMovement, val followsShare: Double = defaultFollowsShare)

How far the fitted density moves, and how much of the sample changes hands, when the cuts between the components are nudged.

Link copied to clipboard
class PDFComponentFitter(estimators: Set<ParameterEstimatorIfc> = PDFModeler.allEstimators, val automaticShifting: Boolean = defaultAutomaticShifting) : ComponentFitterIfc

Fits continuous families to a group by delegating to KSL's continuous distribution modeler.

Link copied to clipboard
class PlausibleComponentCounts(val numComponentsConsidered: List<Int>, val tests: Map<Int, ComponentCountTest>, val level: Double)

The component counts a sample does not rule out.

Link copied to clipboard
data class RankedMixture(val candidate: MixtureCandidate, val criterionValue: MixtureCriterionValue)

One evaluated candidate: the assembled mixture and its criterion value.

Link copied to clipboard

Computes how close a fitted mixture is to the truth.

Link copied to clipboard
data class RecoveryResult(val hellinger: Double, val l1Distance: Double, val kolmogorov: Double, val numComponentsCorrect: Boolean, val familyAccuracy: Double?, val weightMeanAbsoluteError: Double?, val matching: IntArray?, val quadratureError: Double = 0.0)

How well a fitted mixture recovered the mixture that generated the data.

Link copied to clipboard
class SampleDotPlot(data: DoubleArray, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value") : BasePlot

Every observation, as a dot.

Link copied to clipboard

How far a k-component mixture is from the nearest mixture with one component fewer, and the sample size that distance implies.

Link copied to clipboard
class WindowedComponentFitter(fitter: ComponentFitterIfc, val delta: Double = defaultDelta) : ComponentFitterIfc

Estimates each component from a window that reaches past its group into the neighbours, while leaving the assignment alone.