Skip to main content

MultipleHypothesisTester

Struct MultipleHypothesisTester 

Source
pub struct MultipleHypothesisTester { /* private fields */ }
Expand description

Sequential testing for multiple hypotheses

Implementations§

Source§

impl MultipleHypothesisTester

Source

pub fn new(hypotheses: Vec<Uncertain<bool>>, names: Vec<&str>) -> Self

Create a new multiple hypothesis tester

§Example
use uncertain_rs::{Uncertain, hypothesis::MultipleHypothesisTester, operations::Comparison};

let temp = Uncertain::normal(22.0, 2.0);
let hypotheses = vec![
    Comparison::gt(&temp, 20.0),
    Comparison::gt(&temp, 25.0),
    Comparison::lt(&temp, 18.0),
];
let names = vec!["warm", "hot", "cold"];

let tester = MultipleHypothesisTester::new(hypotheses, names);
Source

pub fn test_all( &self, overall_alpha: f64, max_samples: usize, ) -> Vec<(String, HypothesisResult)>

Test all hypotheses and return results

Uses Bonferroni correction to control family-wise error rate.

Source

pub fn find_most_likely(&self, sample_count: usize) -> Option<(String, f64)>

Find the hypothesis with the highest probability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V