1
$\begingroup$

Previously, I have written implementation codes of Gaussian Process regression in Python and Matlab. However, for better interaction and visualisation, I am currently working on implementation in Mathematica, but I am really a beginner in Mathematica.

Different from Python and Matlab, Mathematica is not using something like linspace in plotting functions. Instead, we enter the range to Plot such that it can generate continuous function itself. This makes me confused about how to generate sample functions given Gaussian Process prior. Let say my prior is distributed with zero mean and Squared Exponential kernel. I have

seKern[x1_,x2_,params_List]:=params[[1]]*Exp[-(Norm[x1-x2]^2/(2*params[[2]]))]

Knowing that $$\mathbf{f}\sim\mathcal{GP}(0,\,k(\mathbf{x},\,\mathbf{x}'))$$ I am trying to sample the functions from

RandomVariate[MultinormalDistribution[0, seKern[i, j, {1, 20}]], 1]

But, here, I don't know how to express this sample function in Plot such that I can generate functions as enter image description here

$\endgroup$

closed as unclear what you're asking by MarcoB, user9660, Mr.Wizard Feb 28 '16 at 11:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Apr 11 '15 at 20:31

Browse other questions tagged or ask your own question.