pub struct Answer {
pub choice: Option<String>,
pub score: Option<f64>,
pub noul: Option<f64>,
pub probabilities: Option<IndexMap<String, f64>>,
pub confidence: Option<f64>,
pub gating: Option<GatingMetadata>,
}Expand description
単一の質問に対する判定結果。
Fields§
§choice: Option<String>Choice 型の採択候補ラベル。
score: Option<f64>Score 型の加重平均スコア値。
noul: Option<f64>Noul 型の言明真実確率値(0.0 <= P <= 1.0)。
probabilities: Option<IndexMap<String, f64>>各候補または各段階レベルの確率分布マップ。
confidence: Option<f64>分布の尖り度に基づく正規化確信度(0.0 <= C <= 1.0)。
gating: Option<GatingMetadata>確信度ゲーティングによるルーティングおよび監査メタデータ(任意)。
Implementations§
Source§impl Answer
impl Answer
Sourcepub fn choice(
selected: impl Into<String>,
probabilities: IndexMap<String, f64>,
confidence: f64,
) -> Self
pub fn choice( selected: impl Into<String>, probabilities: IndexMap<String, f64>, confidence: f64, ) -> Self
Choice 判定結果を生成する。
Sourcepub fn score(
value: f64,
probabilities: IndexMap<String, f64>,
confidence: f64,
) -> Self
pub fn score( value: f64, probabilities: IndexMap<String, f64>, confidence: f64, ) -> Self
Score 判定結果を生成する。
Sourcepub fn with_gating(self, gating: GatingMetadata) -> Self
pub fn with_gating(self, gating: GatingMetadata) -> Self
ゲーティングメタデータを付与して自身を返却する。
Sourcepub fn route(&self) -> Option<DecisionRoute>
pub fn route(&self) -> Option<DecisionRoute>
割り当てられたルーティング種別を取得する。
Sourcepub fn effective_confidence(&self) -> Option<f64>
pub fn effective_confidence(&self) -> Option<f64>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Answer
impl<'de> Deserialize<'de> for Answer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnsafeUnpin for Answer
impl UnwindSafe for Answer
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