Struct rusty_machine::learning::gp::GaussianProcess [] [src]

pub struct GaussianProcess<T: Kernel, U: MeanFunc> {
    pub noise: f64,
    // some fields omitted
}

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.

Methods

impl<T: Kernel, U: MeanFunc> GaussianProcess<T, U>
[src]

fn new(ker: T, mean: U, noise: f64) -> GaussianProcess<T, U>

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);

impl<T: Kernel, U: MeanFunc> GaussianProcess<T, U>
[src]

fn get_posterior(&self, inputs: &Matrix<f64>) -> (Vector<f64>, Matrix<f64>)

Compute the posterior distribution [UNSTABLE]

Requires the model to be trained first.

Outputs the posterior mean and covariance matrix.

Trait Implementations

impl<T: Debug + Kernel, U: Debug + MeanFunc> Debug for GaussianProcess<T, U>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for GaussianProcess<SquaredExpConstMean>
[src]

Construct a default Gaussian Process

The defaults are:

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

fn default() -> GaussianProcess<SquaredExpConstMean>

Returns the "default value" for a type. Read more

impl<T: Kernel, U: MeanFunc> SupModel<Matrix<f64>, Vector<f64>> for GaussianProcess<T, U>
[src]

fn predict(&self, inputs: &Matrix<f64>) -> Vector<f64>

Predict output from inputs.

fn train(&mut self, inputs: &Matrix<f64>, targets: &Vector<f64>)

Train the model using data and outputs.