FitResultData

@Serializable
data class FitResultData(val datasetName: String, val kind: DistributionKind, val empProbConvention: EmpProbConvention = EmpProbConvention.CONTINUITY1, val dataSummary: DataSummaryDTO, val fits: List<DistributionFitDTO>, val recommendedFamilyId: String?, val histogram: HistogramDTO? = null, val shiftAnalysis: ShiftAnalysisDTO? = null, val frequency: IntegerFrequencyDTO? = null, val dispersion: DispersionAnalysisDTO? = null, val scoring: ModaResultDTO? = null, val standardReportHtml: String? = null)(source)

Wire-safe machine result for one distribution-fitting job over one dataset — the contract a CLI / REST / MCP client consumes, and the payload carried by a completed async fit. The payload is bounded and independent of sample size: it carries estimated parameters, goodness-of-fit, full MODA scoring, bootstrap summaries, and a data summary, but no plot-data series (a client reconstructs plots from its own raw data plus the returned fitted distribution — see the design plan).

recommendedFamilyId is the family ID of the top-ranked successful fit, or null when no estimator produced a usable result. fits is sorted best-first (rank 1 first) with failed attempts at the bottom.

The exploratory-data fields follow the engine's continuous/discrete asymmetry: histogram and shiftAnalysis are populated only on the continuous path, while frequency and dispersion are populated only on the discrete path. scoring (full MODA) is continuous-only. Each is null on the other path.

Constructors

Link copied to clipboard
constructor(datasetName: String, kind: DistributionKind, empProbConvention: EmpProbConvention = EmpProbConvention.CONTINUITY1, dataSummary: DataSummaryDTO, fits: List<DistributionFitDTO>, recommendedFamilyId: String?, histogram: HistogramDTO? = null, shiftAnalysis: ShiftAnalysisDTO? = null, frequency: IntegerFrequencyDTO? = null, dispersion: DispersionAnalysisDTO? = null, scoring: ModaResultDTO? = null, standardReportHtml: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The standard PDF/PMF modeling report rendered to a complete HTML page, present only when the fit was run with FitConfiguration.includeStandardReport. Lets a front-end display the canonical report without a live engine.

Functions

Link copied to clipboard
fun FitResultData.toCanonicalDocument(rawData: DoubleArray, title: String? = null, catalog: FittingCatalog = FittingCatalog, confidenceLevel: Double = 0.95, allGoodnessOfFit: Boolean = false): ReportNode.Document

Renders the canonical engine report from this result plus the client's raw data, via the same report extensions a live PDFModeler/PMFModeler uses — so a remote client holding only the DTO reproduces the standard report. The stochastic bootstrap quantities are served from carried snapshots (the DTO adapters never recompute), so this render is deterministic; it will not byte-match a live render, which still recomputes bootstrap during its build.

Link copied to clipboard
fun FitResultData.toDocument(rawData: DoubleArray? = null, title: String? = null, catalog: FittingCatalog = FittingCatalog, allGoodnessOfFit: Boolean = false): ReportNode.Document

Builds the full report document from this result. Tables are always included; the goodness-of-fit detail and bootstrap summaries are added for the recommended fit (or every successful fit when allGoodnessOfFit is true); the four fit plots are added only when rawData is supplied.

Link copied to clipboard

Builds a lightweight, plot-free summary document: data summary, the ranked fits table, and the MODA scoring tables. Renders deterministically from the DTO with no plot files. Use for an immediate in-app or console preview.