pub struct MixedBN { /* private fields */ }Expand description
A mixed Bayesian network.
Trait Implementations§
Source§impl AbsDiffEq for MixedBN
impl AbsDiffEq for MixedBN
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl BN for MixedBN
impl BN for MixedBN
Source§type Support = IndexMap<String, MixedSupport, BuildHasherDefault<FxHasher>>
type Support = IndexMap<String, MixedSupport, BuildHasherDefault<FxHasher>>
The type of the support metadata (variable ranges / state sets).
Source§type Sample = MixedSample
type Sample = MixedSample
The type of the sample.
Source§type Samples = MixedTable
type Samples = MixedTable
The type of the samples.
Source§type IncSamples = MixedIncTable
type IncSamples = MixedIncTable
The type of the incomplete samples.
Source§type WtdSamples = MixedWtdTable
type WtdSamples = MixedWtdTable
The type of the weighted samples.
Source§fn new<I>(graph: DiGraph, cpds: I) -> Result<Self>where
I: IntoIterator<Item = Self::CPD>,
fn new<I>(graph: DiGraph, cpds: I) -> Result<Self>where
I: IntoIterator<Item = Self::CPD>,
Constructs a new Bayesian network. Read more
Source§fn parameters_size(&self) -> usize
fn parameters_size(&self) -> usize
Returns the parameters size. Read more
Source§fn select(&self, x: &Set<usize>) -> Result<Self>where
Self: Sized,
fn select(&self, x: &Set<usize>) -> Result<Self>where
Self: Sized,
Restrict the model to the specified variables. Read more
Source§fn topological_order(&self) -> &[usize]
fn topological_order(&self) -> &[usize]
Returns the topological order of the graph. Read more
Source§impl<E> BNCausalInference<MixedBN> for CausalInference<'_, E>
impl<E> BNCausalInference<MixedBN> for CausalInference<'_, E>
Source§fn cpace_estimate(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
w: Option<&<MixedBN as BN>::Evidence>,
) -> Result<Option<<MixedBN as BN>::CPD>>
fn cpace_estimate( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, w: Option<&<MixedBN as BN>::Evidence>, ) -> Result<Option<<MixedBN as BN>::CPD>>
Estimate the conditional population average causal effect of
X on Y
given Z with optional evidence W = w as E(Y | do(X), Z, W = w). Read moreSource§fn csace_estimate<D>(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
data: D,
) -> Result<Option<Vec<<MixedBN as BN>::CPD>>>
fn csace_estimate<D>( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, data: D, ) -> Result<Option<Vec<<MixedBN as BN>::CPD>>>
Estimate the conditional sample average causal effect of
X on Y
given Z with evidence W = w from data D as E(Y | do(X), Z, W = w). Read moreSource§impl<R> BNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, ()>where
R: Rng,
impl<R> BNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, ()>where
R: Rng,
Source§impl<R, F> BNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, F>
impl<R, F> BNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, F>
Source§impl<R: Rng> BNSampler<MixedBN> for ForwardSampler<'_, R, MixedBN>
impl<R: Rng> BNSampler<MixedBN> for ForwardSampler<'_, R, MixedBN>
Source§impl<'de> Deserialize<'de> for MixedBN
impl<'de> Deserialize<'de> for MixedBN
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
Source§impl HasLabels for MixedBN
impl HasLabels for MixedBN
Source§fn label_to_index(&self, x: &str) -> Result<usize>
fn label_to_index(&self, x: &str) -> Result<usize>
Return the variable index for a given label. Read more
Source§fn index_to_label(&self, x: usize) -> Result<&str>
fn index_to_label(&self, x: usize) -> Result<&str>
Return the label for a given variable index. Read more
Source§fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
Maps an index from this model to another model with the same label. Read more
Source§fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
Maps a set of indices from this model to another model with the same labels. Read more
Source§impl JsonIO for MixedBN
impl JsonIO for MixedBN
Source§fn from_json_reader<R: Read>(reader: R) -> Result<Self>
fn from_json_reader<R: Read>(reader: R) -> Result<Self>
Create an instance of the type from a JSON reader. Read more
Source§fn to_json_writer<W: Write>(&self, writer: W) -> Result<()>
fn to_json_writer<W: Write>(&self, writer: W) -> Result<()>
Write the instance to a JSON writer. Read more
Source§fn from_json_string(json: &str) -> Result<Self>
fn from_json_string(json: &str) -> Result<Self>
Create an instance of the type from a JSON string. Read more
Source§impl<E> ParBNCausalInference<MixedBN> for CausalInference<'_, E>
impl<E> ParBNCausalInference<MixedBN> for CausalInference<'_, E>
Source§fn par_cpace_estimate(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
w: Option<&<MixedBN as BN>::Evidence>,
) -> Result<Option<<MixedBN as BN>::CPD>>
fn par_cpace_estimate( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, w: Option<&<MixedBN as BN>::Evidence>, ) -> Result<Option<<MixedBN as BN>::CPD>>
Estimate the conditional population average causal effect of
X on Y
given Z with optional evidence W = w as E(Y | do(X), Z, W = w) in parallel. Read moreSource§fn par_csace_estimate<D>(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
data: D,
) -> Result<Option<Vec<<MixedBN as BN>::CPD>>>
fn par_csace_estimate<D>( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, data: D, ) -> Result<Option<Vec<<MixedBN as BN>::CPD>>>
Estimate the conditional sample average causal effect of
X on Y
given Z with evidence W = w from data D as E(Y | do(X), Z, W = w) in parallel. Read moreSource§impl<R> ParBNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, ()>where
R: Rng + SeedableRng,
impl<R> ParBNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, ()>where
R: Rng + SeedableRng,
Source§impl<R, F> ParBNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, F>
impl<R, F> ParBNInference<MixedBN> for ApproximateInference<'_, R, MixedBN, F>
Source§impl<R: Rng + SeedableRng> ParBNSampler<MixedBN> for ForwardSampler<'_, R, MixedBN>
impl<R: Rng + SeedableRng> ParBNSampler<MixedBN> for ForwardSampler<'_, R, MixedBN>
Source§impl RelativeEq for MixedBN
impl RelativeEq for MixedBN
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.Auto Trait Implementations§
impl Freeze for MixedBN
impl RefUnwindSafe for MixedBN
impl Send for MixedBN
impl Sync for MixedBN
impl Unpin for MixedBN
impl UnsafeUnpin for MixedBN
impl UnwindSafe for MixedBN
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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