pub struct BayesianNetworkParams {
pub genome_dim: usize,
pub max_parents: usize,
pub init_prob: f32,
pub smoothing_count: usize,
}Expand description
Per-run configuration for the BayesianNetwork model.
Held inside EdaParams::model
for the lifetime of a run. Use BayesianNetworkParams::default_for for
typical binary-optimisation defaults.
Fields§
§genome_dim: usizeNumber of bits per genome; the number of nodes D in the network and
the length of BayesianNetworkState::order and
BayesianNetworkState::parents.
max_parents: usizeMaximum number of parents per node (κ); bounds each node’s CPT to
2^κ cells and caps the greedy edge-addition search.
init_prob: f32Prior marginal probability of a 1 gene, used to seed every edgeless
CPT on the prior path (prev = None).
smoothing_count: usizeLaplace pseudo-count s added per CPT cell during estimation; s ≥ 1
keeps every probability strictly inside (0, 1). Applies only to CPT
estimation for sampling, never to the BIC structure score. The value is
floored to 1 inside fit, so a supplied 0
is treated as 1 to uphold the strictly-interior guarantee.
Implementations§
Source§impl BayesianNetworkParams
impl BayesianNetworkParams
Sourcepub fn default_for(genome_dim: usize) -> Self
pub fn default_for(genome_dim: usize) -> Self
Sensible BOA defaults for a genome_dim-bit problem.
Trait Implementations§
Source§impl Clone for BayesianNetworkParams
impl Clone for BayesianNetworkParams
Source§fn clone(&self) -> BayesianNetworkParams
fn clone(&self) -> BayesianNetworkParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BayesianNetworkParams
impl RefUnwindSafe for BayesianNetworkParams
impl Send for BayesianNetworkParams
impl Sync for BayesianNetworkParams
impl Unpin for BayesianNetworkParams
impl UnsafeUnpin for BayesianNetworkParams
impl UnwindSafe for BayesianNetworkParams
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
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>
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>
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