pub struct ProbabilityUpdate {Show 14 fields
pub id: String,
pub session_id: String,
pub hypothesis: String,
pub prior: f64,
pub posterior: f64,
pub confidence_lower: Option<f64>,
pub confidence_upper: Option<f64>,
pub confidence_level: Option<f64>,
pub update_steps: Value,
pub uncertainty_analysis: Option<Value>,
pub sensitivity: Option<Value>,
pub interpretation: Value,
pub created_at: DateTime<Utc>,
pub metadata: Option<Value>,
}Expand description
Stored probability update result.
Fields§
§id: StringUnique update identifier.
session_id: StringParent session ID.
hypothesis: StringThe hypothesis evaluated.
prior: f64Prior probability (0-1).
posterior: f64Posterior probability (0-1).
confidence_lower: Option<f64>Lower bound of confidence interval.
confidence_upper: Option<f64>Upper bound of confidence interval.
confidence_level: Option<f64>Confidence interval level (e.g., 0.95).
update_steps: ValueBayesian update steps (JSON array).
uncertainty_analysis: Option<Value>Uncertainty analysis (JSON object).
sensitivity: Option<Value>Sensitivity analysis (JSON object).
interpretation: ValueHuman interpretation (JSON object).
created_at: DateTime<Utc>When the update was created.
metadata: Option<Value>Optional metadata.
Implementations§
Source§impl ProbabilityUpdate
impl ProbabilityUpdate
Sourcepub fn new(
session_id: impl Into<String>,
hypothesis: impl Into<String>,
prior: f64,
posterior: f64,
update_steps: Value,
interpretation: Value,
) -> Self
pub fn new( session_id: impl Into<String>, hypothesis: impl Into<String>, prior: f64, posterior: f64, update_steps: Value, interpretation: Value, ) -> Self
Create a new probability update.
Sourcepub fn with_confidence_interval(
self,
lower: Option<f64>,
upper: Option<f64>,
level: Option<f64>,
) -> Self
pub fn with_confidence_interval( self, lower: Option<f64>, upper: Option<f64>, level: Option<f64>, ) -> Self
Set confidence interval.
Sourcepub fn with_uncertainty(self, analysis: Value) -> Self
pub fn with_uncertainty(self, analysis: Value) -> Self
Set uncertainty analysis.
Sourcepub fn with_sensitivity(self, sensitivity: Value) -> Self
pub fn with_sensitivity(self, sensitivity: Value) -> Self
Set sensitivity analysis.
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Set metadata.
Trait Implementations§
Source§impl Clone for ProbabilityUpdate
impl Clone for ProbabilityUpdate
Source§fn clone(&self) -> ProbabilityUpdate
fn clone(&self) -> ProbabilityUpdate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProbabilityUpdate
impl Debug for ProbabilityUpdate
Source§impl<'de> Deserialize<'de> for ProbabilityUpdate
impl<'de> Deserialize<'de> for ProbabilityUpdate
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
Auto Trait Implementations§
impl Freeze for ProbabilityUpdate
impl RefUnwindSafe for ProbabilityUpdate
impl Send for ProbabilityUpdate
impl Sync for ProbabilityUpdate
impl Unpin for ProbabilityUpdate
impl UnwindSafe for ProbabilityUpdate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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