pub struct AnalysisMetrics {
pub total_tokens: usize,
pub avg_confidence: f64,
pub min_confidence: f64,
pub max_confidence: f64,
pub low_confidence_tokens: usize,
pub flagged_tokens: usize,
}Expand description
Calculate various metrics from token analysis
Fields§
§total_tokens: usizeNumber of tokens.
avg_confidence: f64Mean confidence.
min_confidence: f64Lowest confidence.
max_confidence: f64Highest confidence.
low_confidence_tokens: usizeTokens below 0.5 confidence.
flagged_tokens: usizeTokens covered by at least one flag.
Implementations§
Source§impl AnalysisMetrics
impl AnalysisMetrics
Sourcepub fn from_analysis(analysis: &TokenAnalysis) -> Self
pub fn from_analysis(analysis: &TokenAnalysis) -> Self
Compute the metrics of analysis.
Auto Trait Implementations§
impl Freeze for AnalysisMetrics
impl RefUnwindSafe for AnalysisMetrics
impl Send for AnalysisMetrics
impl Sync for AnalysisMetrics
impl Unpin for AnalysisMetrics
impl UnsafeUnpin for AnalysisMetrics
impl UnwindSafe for AnalysisMetrics
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