Bases: object
Gaussian Process object.
Parameters : | K : Kernel
x : numpy.ndarray
y : numpy.ndarray
s : number (default=0)
|
---|
Kernel covariance matrix between new sample locations and given locations.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | Kxox : numpy.ndarray
|
Notes
This is defined as \(K(\mathbf{x^*},\mathbf{x})\), where \(\mathbf{x^*}\) are the new sample locations and \(\mathbf{x}\) are the given locations
Kernel covariance matrix of new sample locations.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | Kxoxo : numpy.ndarray
|
Notes
This is defined as \(K(\mathbf{x^*}, \mathbf{x^*})\), where \(\mathbf{x^*}\) are the new locations.
Kernel covariance matrix \(\mathbf{K}_{xx}\).
Returns : | Kxx : numpy.ndarray
|
---|
Notes
The entry at index \((i, j)\) is defined as:
where \(K(\cdot{})\) is the kernel function, \(s\) is the standard deviation of the observation noise, and \(\delta\) is the Dirac delta function.
Kernel covariance matrix between given locations and new sample locations.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | Kxxo : numpy.ndarray
|
Notes
This is defined as \(K(\mathbf{x},\mathbf{x^*})\), where \(\mathbf{x}\) are the given locations and \(\mathbf{x^*}\) are the new sample locations.
Cholesky decomposition of the kernel covariance matrix.
Returns : | Lxx : numpy.ndarray
|
---|
Notes
The value is \(\mathbf{L}_{xx}\), such that \(\mathbf{K}_{xx} = \mathbf{L}_{xx}\mathbf{L}_{xx}^\top\).
Create a copy of the gaussian process object.
Parameters : | deep : bool (default=True)
|
---|---|
Returns : | gp : GP
|
Predictive covariance of the gaussian process.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | cov : numpy.ndarray
|
Notes
This is defined by Eq. 2.24 of [RW06]:
Second derivative of the marginal likelihood.
Returns : | d2lh_dtheta2 : numpy.ndarray
|
---|
Notes
This is a matrix of second partial derivatives of the likelihood with respect to its parameters \(\theta\).
Derivative of the marginal likelihood.
Returns : | dlh_dtheta : numpy.ndarray
|
---|
Notes
This is a vector of first partial derivatives of the likelihood with respect to its parameters \(\theta\).
Derivative of the marginal log likelihood.
Returns : | dloglh_dtheta : numpy.ndarray
|
---|
Notes
This is a vector of first partial derivatives of the log likelihood with respect to its parameters \(\theta\). It is defined by Equation 5.9 of [RW06]:
Derivative of the mean of the gaussian process with respect to its parameters, and evaluated at xo.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | dm_dtheta : numpy.ndarray
|
Notes
The analytic form is:
Inverse kernel covariance matrix, \(\mathbf{K}_{xx}^{-1}\).
Note that this inverse is provided mostly just for reference. If you actually need to use it, use the Cholesky decomposition (self.Lxx) instead.
Returns : | inv_Kxx : numpy.ndarray
|
---|
Dot product of the inverse kernel covariance matrix and of observation vector.
This uses scipy’s cholesky solver to compute the solution.
Returns : | inv_Kxx_y : numpy.ndarray
|
---|
Notes
This is defined as \(\mathbf{K}_{xx}^{-1}\mathbf{y}\).
Marginal likelihood.
Returns : | lh : numpy.float64
|
---|
Notes
This is the likelihood of observations \(\mathbf{y}\) given locations \(\mathbf{x}\) and kernel parameters \(\theta\). It is defined as:
where \(d\) is the dimensionality of \(\mathbf{x}\).
Marginal log likelihood.
Returns : | log_lh : numpy.float64
|
---|
Notes
This is the log likelihood of observations \(\mathbf{y}\) given locations \(\mathbf{x}\) and kernel parameters \(\theta\). It is defined by Eq. 5.8 of [RW06]:
where \(d\) is the dimensionality of \(\mathbf{x}\).
Predictive mean of the gaussian process.
Parameters : | xo : numpy.ndarray
|
---|---|
Returns : | mean : numpy.ndarray
|
Notes
This is defined by Equation 2.23 of [RW06]:
Gaussian process parameters.
Returns : | params : numpy.ndarray
|
---|
Plot the predictive mean and variance of the gaussian process.
Parameters : | ax : matplotlib.pyplot.axes.Axes (optional)
xlim : (lower x limit, upper x limit) (optional)
color : str (optional)
markercolor : str (optional)
|
---|
Standard deviation of the observation noise for the gaussian process.
Returns : | s : numpy.float64 |
---|