ChoiceAnswer

data class ChoiceAnswer<K : Any>(val choice: K, val probabilities: Map<K, Double>, val confidence: Double) : Answer(source)

The answer to a Choice: the highest-probability option, the probability of every option, and a confidence from 0 to 1 derived from how concentrated probabilities is. Confidence is not the winner's probability.

Constructors

Link copied to clipboard
constructor(choice: K, probabilities: Map<K, Double>, confidence: Double)

Properties

Link copied to clipboard
val choice: K
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The largest probability of any option.

Functions

Link copied to clipboard
fun probability(option: K): Double
Link copied to clipboard
fun ranked(): List<Pair<K, Double>>

Options from most to least likely.