expectedLevel property
double?
get
expectedLevel
A DeciderQuestionType.score answer's expected level, Σ pᵢ · i over
the levels 0 … K − 1; null for other types. choice is the most
probable level, which can differ from the expected one.
Implementation
double? get expectedLevel {
if (!identical(questionType, DeciderQuestionType.score)) return null;
final p = probabilities!;
var level = 0.0;
for (var i = 0; i < p.length; i++) {
level += p['$i']! * i;
}
return level;
}