ModaWarning

sealed interface ModaWarning(source)

Something worth telling the user about that came up while a model was being set up or its metric domains adjusted.

These are not errors. In each case the model has a defined, defensible result, and evaluation continues. They are reported because the result is one a user would want to know the reason for: a metric that turned out not to separate the alternatives at all, or a domain adjustment that was proposed and then not applied, is easy to misread as a mistake in the model when it is actually a property of the data.

Every case names the metric it concerns, so a caller can report the warning without having to work out which metric produced it.

Inheritors

Types

Link copied to clipboard
data class DegenerateDomain(val metric: String, val candidate: String) : ModaWarning

A domain was proposed for this metric that has no width once the metric's own limits were respected, so it was not applied and the declared domain was kept.

Link copied to clipboard
data class DomainNotApplied(val metric: String, val candidate: String) : ModaWarning

A domain of candidate was proposed for this metric from the realized scores but not applied, because at least one realized score falls outside it. The metric keeps its declared domain for every alternative.

Link copied to clipboard
data class TiedScores(val metric: String, val score: Double) : ModaWarning

Every alternative scored the same on this metric, so its domain was widened around that common score rather than fitted to a range of zero width.

Properties

Link copied to clipboard
abstract val message: String

A description suitable for showing to a user.

Link copied to clipboard
abstract val metric: String

The name of the metric the warning concerns.