pub struct PolynomialChaosExpansion {
pub coeffs: Vec<f64>,
pub multi_indices: Vec<Vec<usize>>,
pub n_dims: usize,
}Expand description
Polynomial Chaos Expansion surrogate model.
Represents an output Y as a linear combination of Hermite basis polynomials evaluated at standardised Gaussian inputs.
Fields§
§coeffs: Vec<f64>PCE coefficients, one per multi-index.
multi_indices: Vec<Vec<usize>>Multi-indices: each entry is a vector of polynomial degrees per dimension.
n_dims: usizeNumber of input dimensions.
Implementations§
Source§impl PolynomialChaosExpansion
impl PolynomialChaosExpansion
Sourcepub fn evaluate(&self, x: &[f64]) -> f64
pub fn evaluate(&self, x: &[f64]) -> f64
Evaluate the PCE at a point x (standardised Gaussian inputs).
x.len() must equal self.n_dims.
Sourcepub fn pce_variance(&self) -> f64
pub fn pce_variance(&self) -> f64
Variance of the PCE (= sum of squares of non-zero-order coefficients).
Uses the orthogonality of Hermite polynomials: ⟨He_α, He_α⟩ = α!.
Trait Implementations§
Source§impl Clone for PolynomialChaosExpansion
impl Clone for PolynomialChaosExpansion
Source§fn clone(&self) -> PolynomialChaosExpansion
fn clone(&self) -> PolynomialChaosExpansion
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 PolynomialChaosExpansion
impl RefUnwindSafe for PolynomialChaosExpansion
impl Send for PolynomialChaosExpansion
impl Sync for PolynomialChaosExpansion
impl Unpin for PolynomialChaosExpansion
impl UnsafeUnpin for PolynomialChaosExpansion
impl UnwindSafe for PolynomialChaosExpansion
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.