resultsAsDatabase

fun resultsAsDatabase(dbName: String, dir: Path = KSL.dbDir, deleteIfExists: Boolean = true, modaName: String = name): DatabaseIfc(source)

Writes this result to a database holding the metric, score, value, overall and rank-frequency tables.

A result is worth keeping after the model that produced it has gone, which is the reason a snapshot exists at all, so writing one must not require the model back. Everything the tables hold is either recorded here or derived from what is: the ranks come from the values and the ranking method, as they did when the model computed them.

Parameters

dbName

the name of the database on the disk

dir

the directory to hold the database on the disk

deleteIfExists

whether an existing database of that name is replaced

modaName

the name to record in every row, defaulting to this result's own