pub struct ExperimentalComparison {
pub experimental: Vec<f64>,
pub simulation: Vec<f64>,
}Expand description
Simulation vs experiment comparison tool.
Fields§
§experimental: Vec<f64>Experimental (reference) values.
simulation: Vec<f64>Simulation (predicted) values.
Implementations§
Source§impl ExperimentalComparison
impl ExperimentalComparison
Sourcepub fn rmse(&self) -> Result<f64, ComparisonError>
pub fn rmse(&self) -> Result<f64, ComparisonError>
Compute RMSE.
Sourcepub fn nrmse(&self) -> Result<f64, ComparisonError>
pub fn nrmse(&self) -> Result<f64, ComparisonError>
Compute normalized RMSE (divided by the experimental data range).
Sourcepub fn correlation(&self) -> Result<f64, ComparisonError>
pub fn correlation(&self) -> Result<f64, ComparisonError>
Compute Pearson correlation coefficient.
Sourcepub fn mae(&self) -> Result<f64, ComparisonError>
pub fn mae(&self) -> Result<f64, ComparisonError>
Compute mean absolute error.
Sourcepub fn max_error(&self) -> Result<f64, ComparisonError>
pub fn max_error(&self) -> Result<f64, ComparisonError>
Compute maximum absolute error.
Sourcepub fn r_squared(&self) -> Result<f64, ComparisonError>
pub fn r_squared(&self) -> Result<f64, ComparisonError>
Compute R² (coefficient of determination).
Sourcepub fn all_metrics(&self) -> Result<ComparisonMetrics, ComparisonError>
pub fn all_metrics(&self) -> Result<ComparisonMetrics, ComparisonError>
Compute all metrics at once.
Sourcepub fn bias(&self) -> Result<f64, ComparisonError>
pub fn bias(&self) -> Result<f64, ComparisonError>
Bias (mean of simulation - experiment).
Sourcepub fn relative_errors(&self) -> Result<Vec<f64>, ComparisonError>
pub fn relative_errors(&self) -> Result<Vec<f64>, ComparisonError>
Relative error for each point: (sim - exp) / exp.
Trait Implementations§
Source§impl Clone for ExperimentalComparison
impl Clone for ExperimentalComparison
Source§fn clone(&self) -> ExperimentalComparison
fn clone(&self) -> ExperimentalComparison
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExperimentalComparison
impl RefUnwindSafe for ExperimentalComparison
impl Send for ExperimentalComparison
impl Sync for ExperimentalComparison
impl Unpin for ExperimentalComparison
impl UnsafeUnpin for ExperimentalComparison
impl UnwindSafe for ExperimentalComparison
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.