pub struct NullificationTest {
pub hypothesis_id: String,
pub n_runs: usize,
pub alpha: f64,
pub bootstrap_samples: usize,
pub expected_value: f64,
}Expand description
Popperian nullification test for ML simulation.
Following Princeton methodology: minimum 5 runs, bootstrap CI.
Fields§
§hypothesis_id: StringNull hypothesis identifier.
n_runs: usizeNumber of independent runs (minimum 5 per Princeton methodology).
alpha: f64Significance level (α = 0.05 standard).
bootstrap_samples: usizeNumber of bootstrap samples for CI.
expected_value: f64Expected value under H₀ (for one-sample tests).
Implementations§
Source§impl NullificationTest
impl NullificationTest
Sourcepub fn with_alpha(self, alpha: f64) -> Self
pub fn with_alpha(self, alpha: f64) -> Self
Set significance level.
Sourcepub fn with_expected(self, expected: f64) -> Self
pub fn with_expected(self, expected: f64) -> Self
Set expected value under H₀.
Sourcepub fn execute<F>(&self, test_fn: F) -> NullificationResult
pub fn execute<F>(&self, test_fn: F) -> NullificationResult
Execute nullification test with a test function.
The test_fn is called n_runs times and should return
the test statistic for each run.
Sourcepub fn evaluate(&self, observations: &[f64]) -> NullificationResult
pub fn evaluate(&self, observations: &[f64]) -> NullificationResult
Execute nullification test with provided observations.
Trait Implementations§
Source§impl Clone for NullificationTest
impl Clone for NullificationTest
Source§fn clone(&self) -> NullificationTest
fn clone(&self) -> NullificationTest
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 moreAuto Trait Implementations§
impl Freeze for NullificationTest
impl RefUnwindSafe for NullificationTest
impl Send for NullificationTest
impl Sync for NullificationTest
impl Unpin for NullificationTest
impl UnsafeUnpin for NullificationTest
impl UnwindSafe for NullificationTest
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