pub struct QuestionScore {
pub question_id: String,
pub kind: QuestionKind,
pub logits: Tensor,
}Expand description
The scored output for one question: the raw per-anchor logits plus the primitive’s distribution readout, derived on demand.
Fields§
§question_id: StringCaller-facing question id (carried through from the anchor map).
kind: QuestionKindThe primitive type.
logits: TensorRaw scorer logits: 1 for noul (the sigmoid logit), one per option for choice, one per level for score.
Implementations§
Source§impl QuestionScore
impl QuestionScore
Sourcepub fn probabilities(&self) -> Tensor
pub fn probabilities(&self) -> Tensor
The distribution over the question’s labels, in canonical order:
sigmoid → [P(false), P(true)] for noul; softmax for choice; binned softmax
over levels for score.
Sourcepub fn expected_value(&self) -> Option<Tensor>
pub fn expected_value(&self) -> Option<Tensor>
The probability-weighted value Σᵢ i·pᵢ over score levels (the expectation
readout pinned by S6b2). None for non-score primitives — their trust object is
the distribution itself.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuestionScore
impl RefUnwindSafe for QuestionScore
impl Send for QuestionScore
impl !Sync for QuestionScore
impl Unpin for QuestionScore
impl UnsafeUnpin for QuestionScore
impl UnwindSafe for QuestionScore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more