pmcore::algorithms

Trait Algorithms

Source
pub trait Algorithms<E: Equation>: Sync {
Show 26 methods // Required methods fn new( config: Settings, equation: E, data: Data, ) -> Result<Box<Self>, Error> where Self: Sized; fn get_settings(&self) -> &Settings; fn equation(&self) -> &E; fn get_data(&self) -> &Data; fn get_prior(&self) -> Array2<f64>; fn inc_cycle(&mut self) -> usize; fn get_cycle(&self) -> usize; fn set_theta(&mut self, theta: Array2<f64>); fn get_theta(&self) -> &Array2<f64>; fn psi(&self) -> &Array2<f64>; fn likelihood(&self) -> f64; fn convergence_evaluation(&mut self); fn converged(&self) -> bool; fn evaluation(&mut self) -> Result<()>; fn condensation(&mut self) -> Result<()>; fn optimizations(&mut self) -> Result<()>; fn logs(&self); fn expansion(&mut self) -> Result<()>; fn into_npresult(&self) -> NPResult<E>; // Provided methods fn validate_psi(&mut self) -> Result<()> { ... } fn write_psi(&self, path: &str) { ... } fn write_theta(&self, path: &str) { ... } fn n2ll(&self) -> f64 { ... } fn initialize(&mut self) -> Result<(), Error> { ... } fn next_cycle(&mut self) -> Result<bool> { ... } fn fit(&mut self) -> Result<NPResult<E>> { ... }
}

Required Methods§

Source

fn new(config: Settings, equation: E, data: Data) -> Result<Box<Self>, Error>
where Self: Sized,

Source

fn get_settings(&self) -> &Settings

Source

fn equation(&self) -> &E

Source

fn get_data(&self) -> &Data

Source

fn get_prior(&self) -> Array2<f64>

Source

fn inc_cycle(&mut self) -> usize

Source

fn get_cycle(&self) -> usize

Source

fn set_theta(&mut self, theta: Array2<f64>)

Source

fn get_theta(&self) -> &Array2<f64>

Source

fn psi(&self) -> &Array2<f64>

Source

fn likelihood(&self) -> f64

Source

fn convergence_evaluation(&mut self)

Source

fn converged(&self) -> bool

Source

fn evaluation(&mut self) -> Result<()>

Source

fn condensation(&mut self) -> Result<()>

Source

fn optimizations(&mut self) -> Result<()>

Source

fn logs(&self)

Source

fn expansion(&mut self) -> Result<()>

Source

fn into_npresult(&self) -> NPResult<E>

Provided Methods§

Source

fn validate_psi(&mut self) -> Result<()>

Source

fn write_psi(&self, path: &str)

Source

fn write_theta(&self, path: &str)

Source

fn n2ll(&self) -> f64

Source

fn initialize(&mut self) -> Result<(), Error>

Source

fn next_cycle(&mut self) -> Result<bool>

Source

fn fit(&mut self) -> Result<NPResult<E>>

Implementors§

Source§

impl<E: Equation> Algorithms<E> for NPAG<E>

Source§

impl<E: Equation> Algorithms<E> for NPOD<E>

Source§

impl<E: Equation> Algorithms<E> for POSTPROB<E>