Struct rv::process::gaussian::GaussianProcess
source · pub struct GaussianProcess<K>where
K: Kernel,{
pub kernel: K,
pub noise_model: NoiseModel,
/* private fields */
}
Fields§
§kernel: K
Covariance Kernel
noise_model: NoiseModel
Noise Model
Implementations§
source§impl<K> GaussianProcess<K>where
K: Kernel,
impl<K> GaussianProcess<K>where
K: Kernel,
sourcepub fn train(
kernel: K,
x_train: DMatrix<f64>,
y_train: DVector<f64>,
noise_model: NoiseModel
) -> Result<Self, GaussianProcessError>
pub fn train( kernel: K, x_train: DMatrix<f64>, y_train: DVector<f64>, noise_model: NoiseModel ) -> Result<Self, GaussianProcessError>
Train a Gaussian Process on the given data points
§Arguments
kernel
- Kernel to use to determine covariancex_train
- Values to use for input intof
y_train
- Known values forf(x)
noise_model
- Noise model to use for fitting
Trait Implementations§
source§impl<K> Clone for GaussianProcess<K>
impl<K> Clone for GaussianProcess<K>
source§fn clone(&self) -> GaussianProcess<K>
fn clone(&self) -> GaussianProcess<K>
Returns a copy 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 moresource§impl<K> Debug for GaussianProcess<K>
impl<K> Debug for GaussianProcess<K>
source§impl<'de, K> Deserialize<'de> for GaussianProcess<K>where
K: Kernel + Deserialize<'de>,
impl<'de, K> Deserialize<'de> for GaussianProcess<K>where
K: Kernel + Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<K> RandomProcess<f64> for GaussianProcess<K>where
K: Kernel,
impl<K> RandomProcess<f64> for GaussianProcess<K>where
K: Kernel,
§type SampleFunction = GaussianProcessPrediction<K>
type SampleFunction = GaussianProcessPrediction<K>
Type of the sample function, aka trajectory of the process.
§type Error = GaussianProcessError
type Error = GaussianProcessError
Error from
source§fn sample_function(&self, indicies: &[Self::Index]) -> Self::SampleFunction
fn sample_function(&self, indicies: &[Self::Index]) -> Self::SampleFunction
Create a sample function at the indices given.
source§fn ln_m_with_params(
&self,
parameter: &DVector<f64>
) -> Result<(f64, DVector<f64>), GaussianProcessError>
fn ln_m_with_params( &self, parameter: &DVector<f64> ) -> Result<(f64, DVector<f64>), GaussianProcessError>
Compute the log marginal likelihood with an different set of parameters and compute the
gradient.
source§fn parameters(&self) -> DVector<f64>
fn parameters(&self) -> DVector<f64>
Get the parameters
source§fn set_parameters(
self,
parameters: &DVector<f64>
) -> Result<Self, GaussianProcessError>
fn set_parameters( self, parameters: &DVector<f64> ) -> Result<Self, GaussianProcessError>
Set with the given parameters
source§impl<K> RandomProcessMle<f64> for GaussianProcess<K>where
K: Kernel,
impl<K> RandomProcessMle<f64> for GaussianProcess<K>where
K: Kernel,
§type Solver = LBFGS<MoreThuenteLineSearch<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64>
type Solver = LBFGS<MoreThuenteLineSearch<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64>
Error type from Optimization errors
source§fn generate_solver() -> Self::Solver
fn generate_solver() -> Self::Solver
Generator for optimizer
Auto Trait Implementations§
impl<K> Freeze for GaussianProcess<K>where
K: Freeze,
impl<K> RefUnwindSafe for GaussianProcess<K>where
K: RefUnwindSafe,
impl<K> Send for GaussianProcess<K>where
K: Send,
impl<K> Sync for GaussianProcess<K>where
K: Sync,
impl<K> Unpin for GaussianProcess<K>where
K: Unpin,
impl<K> UnwindSafe for GaussianProcess<K>where
K: 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
Mutably borrows from an owned value. Read more
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.