FactorSpec

@Serializable
data class FactorSpec(val name: String, val levels: List<Double>, val binding: ControlBinding)(source)

One factor in a designed experiment.

A factor is a variable whose levels are explored by the design. Each level is a raw value applied at run time to a model control or a random-variable parameter (see binding). Two-level factors carry exactly two levels; higher-level (3+) factors are allowed for full-factorial designs, and level counts may differ across factors in the same document (heterogeneous-level full factorials are supported by the underlying FactorialDesign).

Validation (all enforced at init time so every code path — GUI, TOML decode, programmatic construction — fails fast on bad data):

  • name must be non-blank.

  • levels must contain at least 2 values.

  • levels must be strictly increasing (no duplicates, ordered smallest to largest). Mirrors the substrate Factor constructor's precondition so the user finds out at factor-entry time instead of at preview / submit time.

Cross-factor invariants (name uniqueness, count constraints per design family) are enforced in ExperimentConfiguration.init.

Constructors

Link copied to clipboard
constructor(name: String, levels: List<Double>, binding: ControlBinding)

Properties

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