mod bayes_profile

module bayes_profile

Versioned Bayesian configuration with validation and parameter provenance.

Enums

enum ParameterSource
InputProfile
NamedProfile
Cli
Derived
enum PrevalencePriorProfile
Fixed
probability: f64
Beta
alpha: f64
beta: f64

Implementations

impl PrevalencePriorProfile
enum ProfileError
Parse(toml::de::Error)
Encode(toml::ser::Error)
InvalidValue
field: &'static str
reason: String

Traits implemented

impl Display for ProfileError
impl Error for ProfileError
impl From<toml::de::Error> for ProfileError
impl From<toml::ser::Error> for ProfileError

Structs and Unions

struct BayesFactorProfile
alternative_group1: BetaPriorProfile
alternative_group2: BetaPriorProfile
null: BetaPriorProfile

Implementations

impl BayesFactorProfile

Functions

const fn uniform_v1() -> Self
struct BayesProfile
schema_version: u32
profile_name: String
model_id: String
model_version: u32
observation: ObservationProfile
model: ModelProfile
estimation: EstimationProfile
decision: DecisionProfile
execution: ExecutionProfile
struct BayesProfileInput
schema_version: u32
profile_name: String
model_id: String
model_version: u32
observation: ObservationProfile
model: ModelProfile
estimation: EstimationProfile
decision: DecisionProfile
execution: ExecutionProfile

Implementations

impl BayesProfileInput

Functions

fn hydrate(&self, overrides: &ProfileOverrides) -> Result<HydratedBayesProfile, ProfileError>
fn parse_toml(input: &str) -> Result<Self, ProfileError>
struct BetaPriorProfile
alpha: f64
beta: f64

Implementations

impl BetaPriorProfile

Functions

const fn uniform() -> Self
struct DecisionProfile
posterior_threshold: f64
bayes_factor_threshold: f64
significance_threshold: f64
correction: String
struct EstimationProfile
linkage_prior: String
max_iterations: u32
tolerance: f64
minimum_probability: f64
maximum_probability: f64
struct ExecutionProfile
test: String
pvalue_backend: String
struct HydratedBayesProfile
profile: BayesProfile

Implementations

impl HydratedBayesProfile

Functions

fn digest_sha256(&self) -> String
fn source_for(&self, field: &str) -> Option<ParameterSource>
fn to_toml(&self) -> Result<String, ProfileError>
struct ModelProfile
linkage_prior: f64
linked_prevalence: f64
null_prevalence: f64
group1_linked_weight: f64
posterior: Option<PosteriorProfile>
bayes_factor: BayesFactorProfile

Implementations

impl ModelProfile

Functions

fn to_runtime(&self) -> Result<DirectionalModel, ProfileError>
struct ObservationProfile
group1: String
group2: String
min_depth: u32
struct PosteriorProfile
linked: PrevalencePriorProfile
null: PrevalencePriorProfile

Implementations

impl PosteriorProfile

Functions

const fn fixed(linked_probability: f64, null_probability: f64) -> Self
struct ProfileOverrides
linkage_prior: Option<f64>
linked_prevalence: Option<f64>
null_prevalence: Option<f64>
group1_linked_weight: Option<f64>
posterior_threshold: Option<f64>
bayes_factor_threshold: Option<f64>
significance_threshold: Option<f64>
test: Option<String>
pvalue_backend: Option<String>