7
$\begingroup$

As part of the Improved Machine Learning in Mathematica 11, Wolfram advertises the Method "GaussianProcess" which can be used with Predict[] to obtain smooth Gaussian random fields. The screenshot below from the official documentation shows how this is applied.

However, I was wondering if I can somehow specify the mean function $\boldsymbol{\mu}$ and covariance kernel function $k(x_i, x_j)$? I cannot find it in the documentation of Predict[], or anywhere else in the Wolfram documentation. Perhaps there is an undocumented option to provide the mean and kernel function?

I am referring $\mu$ and $k$ as used in this paper this paper.

enter image description here

$\endgroup$

1 Answer 1

7
$\begingroup$

As far as I know, it's not yet possible to specify arbitrary covariance kernels. However, there are a few ways to control the kernel type. You can specify the type of covariance function using the "CovarianceType" suboption like so:

pred = Predict[data, 
  Method -> {
      "GaussianProcess", 
      "CovarianceType" -> "Linear"
  }
]

The possible kernels for "CovarianceType" are:

{
   "Periodic", "SquaredExponential", "RationalQuadratic", "Linear", 
   "Mattern5/2", "Mattern3/2", "NN", "WN"
}

You can also specify algebraic combinations of these kernels, such as:

"CovarianceType" -> "Linear" + "Periodic" * "RationalQuadratic"

Finally, there is the "Composite" option value, which will try and find a sensible combination of kernels that works well. Furthermore, there is the "SearchMethod" suboption for composite kernels, which can be set to "Greedy" or "SimulatedAnnealing". E.g.:

Method -> {
      "GaussianProcess", 
      "CovarianceType" -> "Composite",
      "SearchMethod" -> "SimulatedAnnealing"
  }

After the predictor pred has been computed, you can investigate what it's using by evaluating:

pred[[1]]

Edit

As far as I know, there is currently no implementation of mean functions, but I might be wrong about that.

Edit 2

Since I answered this question, the documentation has been updated. Be sure to check it for any updates to the GaussianProcess method:

http://reference.wolfram.com/language/ref/method/GaussianProcess.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.