pub struct GaussianProcess {
pub mean: f64,
pub length_scale: f64,
pub signal_variance: f64,
pub noise_variance: f64,
}Expand description
Gaussian process regression model.
Fields§
§mean: f64§length_scale: f64§signal_variance: f64§noise_variance: f64Implementations§
Source§impl GaussianProcess
impl GaussianProcess
pub fn new( mean: f64, length_scale: f64, signal_var: f64, noise_var: f64, ) -> Self
pub fn default_rbf() -> Self
Sourcepub fn rbf_kernel(&self, x: f64, xp: f64) -> f64
pub fn rbf_kernel(&self, x: f64, xp: f64) -> f64
RBF (squared exponential) kernel: k(x, x’) = σ^2 exp(-|x-x’|^2 / (2l^2)).
Sourcepub fn predictive_variance(&self, x: f64, train_x: &[f64]) -> f64
pub fn predictive_variance(&self, x: f64, train_x: &[f64]) -> f64
Predictive variance at a new point (simplified: just signal variance).
pub fn log_marginal_likelihood_approx(&self, n: usize) -> f64
Trait Implementations§
Source§impl Clone for GaussianProcess
impl Clone for GaussianProcess
Source§fn clone(&self) -> GaussianProcess
fn clone(&self) -> GaussianProcess
Returns a duplicate of the value. Read more
1.0.0 · 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 GaussianProcess
impl RefUnwindSafe for GaussianProcess
impl Send for GaussianProcess
impl Sync for GaussianProcess
impl Unpin for GaussianProcess
impl UnsafeUnpin for GaussianProcess
impl UnwindSafe for GaussianProcess
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