pub struct NonParametricResult<E: Equation> { /* private fields */ }Expand description
Contains the results of a nonparametric estimation, including the final parameter
Implementations§
Source§impl<E: Equation> NonParametricResult<E>
impl<E: Equation> NonParametricResult<E>
pub fn cycles(&self) -> usize
pub fn objf(&self) -> f64
pub fn converged(&self) -> bool
pub fn get_theta(&self) -> &Theta
pub fn data(&self) -> &Data
pub fn equation(&self) -> &E
pub fn cycle_log(&self) -> &CycleLog
Sourcepub fn chain<A>(self, algorithm: A) -> Result<NonParametricResult<E>>
pub fn chain<A>(self, algorithm: A) -> Result<NonParametricResult<E>>
pub fn psi(&self) -> &Psi
pub fn weights(&self) -> &Weights
pub fn error_models(&self) -> &AssayErrorModels
Sourcepub fn predictions(&self, idelta: f64, tad: f64) -> Result<NPPredictions>
pub fn predictions(&self, idelta: f64, tad: f64) -> Result<NPPredictions>
Compute predictions on demand. Nothing is cached on the result; callers that need the predictions repeatedly should hold on to the returned value themselves.
pub fn write_theta(&self, path: &Path) -> Result<()>
pub fn write_posterior(&self, path: &Path) -> Result<()>
pub fn write_covariates(&self, path: &Path) -> Result<()>
Sourcepub fn write_cycles(&self, path: &Path) -> Result<()>
pub fn write_cycles(&self, path: &Path) -> Result<()>
Write the cycle log to a CSV file readable by Pmetrics.
Sourcepub fn write_predictions(
&self,
path: &Path,
idelta: f64,
tad: f64,
) -> Result<()>
pub fn write_predictions( &self, path: &Path, idelta: f64, tad: f64, ) -> Result<()>
Compute and write the population and posterior predictions to a CSV file readable by Pmetrics.
idelta is the interval used to densify the prediction grid and tad is
the additional time after the last event to simulate.
Sourcepub fn write_json(&self, path: &Path, idelta: f64, tad: f64) -> Result<()>
pub fn write_json(&self, path: &Path, idelta: f64, tad: f64) -> Result<()>
Serialize the complete result to a single JSON file.
This includes the data, error models, prior, optimized support points,
likelihoods, weights, objective function, status, cycle log, posterior
probabilities, and predictions. idelta and tad control the density of
the embedded predictions (see predictions).
Sourcepub fn write_outputs(
&self,
directory: impl AsRef<Path>,
idelta: f64,
tad: f64,
) -> Result<()>
pub fn write_outputs( &self, directory: impl AsRef<Path>, idelta: f64, tad: f64, ) -> Result<()>
Write the full set of result artifacts to directory.
The directory is created if it does not exist, and the following files are produced (matching the names expected by Pmetrics):
theta.csv— optimized support points with weightsposterior.csv— per-subject posterior probabilitiespred.csv— population and posterior predictionscovs.csv— interpolated covariatescycles.csv— cycle logresult.json— the complete result as JSON
The posterior and predictions are computed once and shared across the CSV
and JSON outputs. idelta and tad control the density of the
predictions (see predictions).
Trait Implementations§
Source§impl<E: Equation> FitResult for NonParametricResult<E>
impl<E: Equation> FitResult for NonParametricResult<E>
fn objf(&self) -> f64
fn converged(&self) -> bool
fn summary(&self) -> FitSummary
fn population_summary(&self) -> PopulationSummary
fn individual_summaries(&self) -> Vec<IndividualSummary>
Auto Trait Implementations§
impl<E> Freeze for NonParametricResult<E>where
E: Freeze,
impl<E> RefUnwindSafe for NonParametricResult<E>where
E: RefUnwindSafe,
impl<E> Send for NonParametricResult<E>where
E: Send,
impl<E> Sync for NonParametricResult<E>
impl<E> Unpin for NonParametricResult<E>where
E: Unpin,
impl<E> UnsafeUnpin for NonParametricResult<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for NonParametricResult<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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§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>
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>
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.