Trait pmcore::algorithms::Algorithm

source ·
pub trait Algorithm<E: Equation> {
Show 24 methods // Required methods fn new( config: Settings, equation: E, data: Data, ) -> Result<Box<Self>, Error> where Self: Sized; fn get_settings(&self) -> &Settings; 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<(), (Error, NPResult<E>)>; fn condensation(&mut self) -> Result<(), (Error, NPResult<E>)>; fn optimizations(&mut self) -> Result<(), (Error, NPResult<E>)>; fn logs(&self); fn expansion(&mut self) -> Result<(), (Error, NPResult<E>)>; fn into_npresult(&self) -> NPResult<E>; // Provided methods 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, (Error, NPResult<E>)> { ... } fn fit(&mut self) -> Result<NPResult<E>, (Error, 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 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<(), (Error, NPResult<E>)>

source

fn condensation(&mut self) -> Result<(), (Error, NPResult<E>)>

source

fn optimizations(&mut self) -> Result<(), (Error, NPResult<E>)>

source

fn logs(&self)

source

fn expansion(&mut self) -> Result<(), (Error, NPResult<E>)>

source

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

Provided Methods§

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, (Error, NPResult<E>)>

source

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

Implementors§

source§

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

source§

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

source§

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