pub struct ChiSquared {
pub yates: bool,
}Expand description
Pearson chi-squared test for discrete data (power divergence with λ = 1).
When yates is set, Yates’ continuity correction is applied on 2×2
(sub-)tables, matching scipy.stats.chi2_contingency(correction=True) and
pgmpy. Cramér’s V is reported as the effect size.
Fields§
§yates: boolWhether to apply Yates’ continuity correction on 2×2 (sub-)tables.
Implementations§
Source§impl ChiSquared
impl ChiSquared
Trait Implementations§
Source§impl CITest for ChiSquared
impl CITest for ChiSquared
Source§fn test_impl(
&self,
data: &Dataset,
x: usize,
y: usize,
z: &[usize],
) -> Result<CIResult, CIError>
fn test_impl( &self, data: &Dataset, x: usize, y: usize, z: &[usize], ) -> Result<CIResult, CIError>
Test-specific computation for
x ⊥ y | z. Implementations may assume
the query has already been validated by CITest::test; call sites
should use CITest::test, not this method. Read moreSource§fn validate(&self, _data: &Dataset) -> Result<(), CIError>
fn validate(&self, _data: &Dataset) -> Result<(), CIError>
Check the test’s own configuration against
data (e.g. kernel
parameters, column names). The default accepts everything. Bindings call
this at construction so a bad configuration fails early; the provided
CITest::test also runs it on every call. Read moreSource§impl Clone for ChiSquared
impl Clone for ChiSquared
impl Copy for ChiSquared
Source§impl Debug for ChiSquared
impl Debug for ChiSquared
Source§impl Default for ChiSquared
impl Default for ChiSquared
impl Eq for ChiSquared
Source§impl PartialEq for ChiSquared
impl PartialEq for ChiSquared
impl StructuralPartialEq for ChiSquared
Auto Trait Implementations§
impl Freeze for ChiSquared
impl RefUnwindSafe for ChiSquared
impl Send for ChiSquared
impl Sync for ChiSquared
impl Unpin for ChiSquared
impl UnsafeUnpin for ChiSquared
impl UnwindSafe for ChiSquared
Blanket Implementations§
impl<T> Boilerplate for T
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