Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AnalysisDatasetEntry(val config: NamedFitConfiguration, val included: Boolean = true)

One dataset within an AnalysisDocument: the per-dataset fit configuration (name + source reference + fit settings) plus whether it is included in a run.

Link copied to clipboard
@Serializable
data class AnalysisDocument(val analysisName: String, val datasets: List<AnalysisDatasetEntry>)

The persistable, hand-editable form of a distribution-fitting analysis. It is a configuration of references — each dataset is identified by its DataSourceReference (a file/table/generated-RV locator), never by embedded data — so the saved TOML stays small and editable. (Inline-pasted data is spilled to a sidecar file by the front-end before saving, and referenced like any other file.) This mirrors how the Single/Scenario apps persist a RunConfiguration that references a model bundle rather than embedding it.

Link copied to clipboard

TOML codec for AnalysisDocument. Uses tomlkt (which integrates with kotlinx-serialization), mirroring RunConfigurationToml. Because the document is reference-based — every dataset's dataSource is a file/table/ generated-RV reference, never inline data — the encoded TOML is compact and hand-editable.

Link copied to clipboard
@Serializable
data class BootstrapConfig(val sampleSize: Int = 399, val level: Double = 0.95, val streamNumber: Int = 0)

Opt-in request for engine-side bootstrap of the fitted parameters. When a FitConfiguration carries a non-null BootstrapConfig, the engine performs the resampling and returns summary results only (estimate, bias, MSE, standard error, and confidence intervals) — never the raw replicate arrays. A null bootstrap config skips bootstrapping entirely.

Link copied to clipboard
@Serializable
sealed class CredentialSource

How database credentials are obtained at run time. The connection reference itself never carries secrets — only references to where the secret lives (an env-var name, a file path) or a hint to prompt for it.

Link copied to clipboard
@Serializable
data class DatabaseConnectionRef(val dbType: DbType, val location: String, val serverName: String? = null, val portNumber: Int? = null, val credentials: CredentialSource = CredentialSource.None)

Credential-free locator for a database connection. Embedded databases (SQLite, Derby) put the file path in location and use CredentialSource.None. Server databases (Postgres) additionally set serverName / portNumber and a non-None credential source; that path lands in the server-database phase.

Link copied to clipboard

Physical arrangement of one or more datasets in a delimited input source.

Link copied to clipboard
@Serializable
sealed class DataSourceReference

Serializable locator for one or more numeric datasets that feed a distribution-fitting job.

Link copied to clipboard
@Serializable
sealed class DbSource

What to read from the database: a whole table, or the result of a query.

Link copied to clipboard
@Serializable
enum DbType : Enum<DbType>

Supported database backends.

Link copied to clipboard

Field separator for a delimited text input source.

Link copied to clipboard

Whether a fitting job models a continuous distribution (real-valued data, PDF-based scoring) or a discrete one (integer-valued data, PMF-based GoF).

Link copied to clipboard

Serializable mirror of the engine's recommendation criterion (ksl.utilities.distributions.fitting.EvaluationMethod), surfaced so a caller can choose how the recommended distribution and the fit ordering are determined. The default (SCORING) matches the engine default.

Link copied to clipboard
@Serializable
data class FamilyBootstrapConfig(val numSamples: Int = 400, val streamNumber: Int = 0)

Opt-in configuration for the family-frequency bootstrap analysis — a separate (continuous-only) analysis that resamples the data numSamples times, re-runs the full fit + evaluation on each resample, and tallies how often each family is recommended. It quantifies recommendation/model-selection stability.

Link copied to clipboard
@Serializable
data class FitConfiguration(val dataSource: DataSourceReference, val kind: DistributionKind = DistributionKind.CONTINUOUS, val estimatorIds: Set<String> = emptySet(), val scoringModelIds: Set<String> = emptySet(), val automaticShifting: Boolean = true, val rankingMethod: RankingMethod = RankingMethod.ORDINAL, val evaluationMethod: EvaluationMethod = EvaluationMethod.SCORING, val bootstrap: BootstrapConfig? = null, val includeStandardReport: Boolean = false)

Serializable description of one distribution-fitting analysis: where the data comes from, what kind of distribution to fit, and which estimators and scoring models to use.

Link copied to clipboard
sealed class FitSpec

Type-safe job spec for a distribution-fitting request, parallel to ksl.app.RunSpec. Cardinality (single vs. batch) is encoded in the variant rather than a flag, so a downstream session can dispatch by exhaustive when without re-validating which fields are present.

Link copied to clipboard
@Serializable
data class NamedFitConfiguration(val name: String, val config: FitConfiguration)

One entry in a FitSpec.Batch: a human-readable name paired with the analysis configuration for that dataset. The name labels the entry in batch results, events, and the cross-dataset summary report; for batches produced by expanding a multi-dataset source it is the dataset name.

Link copied to clipboard

Serializable mirror of the engine's rank-assignment method (ksl.utilities.statistic.Statistic.Companion.Ranking), surfaced so a caller can choose how ties are handled when MODA ranks the fitted distributions. The default (ORDINAL) matches the engine default.