AlternativeRejection

sealed interface AlternativeRejection(source)

The reason an alternative offered to a model was not taken into it.

An alternative that is not taken in is simply absent from the results, which on its own looks indistinguishable from never having been offered. Each case names the alternative and says enough to correct the call.

Inheritors

Types

Link copied to clipboard
data class MissingScore(val alternative: String, val metricName: String) : AlternativeRejection

The alternative was offered the right number of scores, all on metrics the model holds, but the metric named metricName was left without one because another was scored twice.

Link copied to clipboard
data class UnknownMetric(val alternative: String, val metricName: String) : AlternativeRejection

The alternative was scored on a metric the model does not hold, named metricName.

Link copied to clipboard
data class WrongScoreCount(val alternative: String, val expected: Int, val actual: Int) : AlternativeRejection

The alternative was offered actual scores where the model has expected metrics. Every alternative has to be scored on every metric for the alternatives to be comparable.

Properties

Link copied to clipboard
abstract val alternative: String

The name of the alternative that was not taken in.

Link copied to clipboard
abstract val message: String

A description suitable for showing to a user.