pub struct NPResult<E: Equation> { /* private fields */ }
Expand description
Defines the result objects from an NPAG run An NPResult contains the necessary information to generate predictions and summary statistics
Implementations§
source§impl<E: Equation> NPResult<E>
impl<E: Equation> NPResult<E>
sourcepub fn new(
equation: E,
data: Data,
theta: Array2<f64>,
psi: Array2<f64>,
w: Array1<f64>,
objf: f64,
cycles: usize,
converged: bool,
settings: Settings,
cyclelog: CycleLog,
) -> Self
pub fn new( equation: E, data: Data, theta: Array2<f64>, psi: Array2<f64>, w: Array1<f64>, objf: f64, cycles: usize, converged: bool, settings: Settings, cyclelog: CycleLog, ) -> Self
Create a new NPResult object
pub fn cycles(&self) -> usize
pub fn objf(&self) -> f64
pub fn converged(&self) -> bool
pub fn get_theta(&self) -> &Array2<f64>
pub fn get_psi(&self) -> &Array2<f64>
pub fn get_w(&self) -> &Array1<f64>
pub fn write_outputs(&self) -> Result<()>
sourcepub fn write_obspred(&self) -> Result<()>
pub fn write_obspred(&self) -> Result<()>
Writes the observations and predictions to a single file
sourcepub fn write_theta(&self) -> Result<()>
pub fn write_theta(&self) -> Result<()>
Writes theta, which contains the population support points and their associated probabilities Each row is one support point, the last column being probability
sourcepub fn write_posterior(&self) -> Result<()>
pub fn write_posterior(&self) -> Result<()>
Writes the posterior support points for each individual
sourcepub fn write_obs(&self) -> Result<()>
pub fn write_obs(&self) -> Result<()>
Write the observations, which is the reformatted input data
sourcepub fn write_covs(&self) -> Result<()>
pub fn write_covs(&self) -> Result<()>
Writes the covariates
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for NPResult<E>where
E: Freeze,
impl<E> RefUnwindSafe for NPResult<E>where
E: RefUnwindSafe,
impl<E> Send for NPResult<E>where
E: Send,
impl<E> Sync for NPResult<E>
impl<E> Unpin for NPResult<E>where
E: Unpin,
impl<E> UnwindSafe for NPResult<E>where
E: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.