pub struct GaussianProcess<T: Kernel, U: MeanFunc> {
    pub noise: f64,
    /* private fields */
}
Expand description

Gaussian Process struct

Gaussian process with generic kernel and deterministic mean function. Can be used for gaussian process regression with noise. Currently does not support classification.

Fields

noise: f64

The observation noise of the GP.

Implementations

Construct a new Gaussian Process.

Examples
use rusty_machine::learning::gp;
use rusty_machine::learning::toolkit::kernel;

let ker = kernel::SquaredExp::default();
let mean = gp::ConstMean::default();
let gaussp = gp::GaussianProcess::new(ker, mean, 1e-3f64);

Compute the posterior distribution [UNSTABLE]

Requires the model to be trained first.

Outputs the posterior mean and covariance matrix.

Trait Implementations

Formats the value using the given formatter. Read more

Construct a default Gaussian Process

The defaults are:

  • Squared Exponential kernel.
  • Zero-mean function.
  • Zero noise.

Note that zero noise can often lead to numerical instability. A small value for the noise may be a better alternative.

Returns the “default value” for a type. Read more

Predict output from inputs.

Train the model using data and outputs.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.