RegressionFitRecord

data class RegressionFitRecord(val timestamp: LocalDateTime, val response: String, val modelExpression: String, val coded: Boolean, val confidenceLevel: Double, val fit: RegressionResultsIfc, val savedPaths: List<Path> = emptyList())(source)

One record in the experiment-app regression-fit history. Records are appended on every successful fit and survive until the host's bound (typically MAX_RECENT_FITS on its controller) evicts them, the user removes them, or an R1 lifecycle event (Simulate / structural mutation / reset) clears the whole list.

Substrate-level DTO so any experiment-app host (Swing today; web / CLI tomorrow) reuses the same record shape. Carries the fit itself (a self-contained numeric object), enough metadata to re-render its HTML report at any time, and a (possibly-empty) list of paths previously written to disk by the user's Save action. savedPaths is the only mutable surface: it grows when the user re-saves. Hosts use savedPaths.isEmpty() as the "unsaved" badge predicate.

Parameters

timestamp

wall clock time of the fit (for the Recent Fits list's time column)

response

response variable name the fit was against

modelExpression

the LinearModel as a parsable string (output of LinearModel.asString)

coded

true if factor levels were coded (-1, +1 style), false if natural units

confidenceLevel

CI level used to render the report (passed through to toReport(confidenceLevel=...))

fit

the substrate regression results object

savedPaths

paths under <workspace>/output/<analysisName>/reports/ that this fit has been materialised to; empty until the user clicks Save

Constructors

Link copied to clipboard
constructor(timestamp: LocalDateTime, response: String, modelExpression: String, coded: Boolean, confidenceLevel: Double, fit: RegressionResultsIfc, savedPaths: List<Path> = emptyList())

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