pub struct Pce {
pub indices: Vec<Vec<usize>>,
pub coefficients: Vec<f64>,
pub total_variance: f64,
pub sobol_first_order: Vec<f64>,
pub sobol_total: Vec<f64>,
pub r_squared: f64,
}Expand description
Polynomial chaos expansion — a Hermite-polynomial surrogate with analytic Sobol’ sensitivity indices.
Fields§
§indices: Vec<Vec<usize>>Multi-indices of the retained basis terms.
coefficients: Vec<f64>Regression coefficients per term.
total_variance: f64Total variance of the surrogate (Σ c²).
sobol_first_order: Vec<f64>Sobol’ main-effect indices per input dimension (first-order).
sobol_total: Vec<f64>Sobol’ total-effect indices per input dimension.
r_squared: f64R² of the surrogate fit (determination coefficient).
Implementations§
Source§impl Pce
impl Pce
Sourcepub fn fit(
x: &[Vec<f64>],
y: &[f64],
bounds: &[(f64, f64)],
max_degree: usize,
) -> Self
pub fn fit( x: &[Vec<f64>], y: &[f64], bounds: &[(f64, f64)], max_degree: usize, ) -> Self
Fit a PCE to the given samples.
x inputs must be normalized to the box bounds (each column in
[lo, hi]); standardization to N(0,1) happens internally via
ξ = 2·(x − lo)/(hi − lo) − 1 (an affine map — acceptable for
PCE on bounded boxes).
Auto Trait Implementations§
impl Freeze for Pce
impl RefUnwindSafe for Pce
impl Send for Pce
impl Sync for Pce
impl Unpin for Pce
impl UnsafeUnpin for Pce
impl UnwindSafe for Pce
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