Simulation of a Gaussian process on $R^2$ with a stationary kernel using the Karhunen-Loève expansion

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Assume $X(omega, t) sim mathcalN(0, K(cdot, cdot))$ is a real-valued, centered Gaussian process on $R^2$, i.e., $X: Omega times R^2 to R$. Let the covariance function of the process be stationary, i.e., $K(t, s) = K(t - s)$, $forall t, s in R^2$. More specifically, let it be exponential: $K(t, s) = exp(-|t - s|/L)$ where $|cdot|$ stands for the Euclidean distance, and $L$ denotes the correlation length. Using the Karhunen-Loève expansion, $X$ can be represented as the following summation:
$X(t, omega) = sum_i=1^infty sqrtlambda_i phi_i(t) xi_i(omega)$
where $xi_i$ are independent, standard Gaussians, and $phi_i$ and $lambda_i$ are the eigenfunctions and eigenvalues of the covariance function $K$, which, in our case, can be computed analytically. For practical computations, the expansion above is truncated to keep, say, $n$ terms.
The question is: How to draw samples of the process on $R^2$, i.e., on a two-dimensional grid of fixed points, using the first $n$ eigenfunctions and eigenvalues of $K$? The problem is that the eigenfunctions are somewhat one-dimensional, and I cannot figure out how to properly use them to get realizations of $X$ on a plane. To be honest, the analytical solution that I claimed previously was initially obtained for processes on $R$, so I am not even sure that it applies directly to $R^2$. When I plug in the norms of points' coordinates into $phi_i$, I get radial patterns, which is presumably not correct.
Also, it is easy to simulate $X$ by constructing the corresponding covariance matrix for a set of points, which boils down to drawing samples from a multivariate Gaussian distribution. I am not interested in this approach.
I would be very grateful for any ideas. Thank you.
probability-theory stochastic-processes normal-distribution simulation
add a comment |Â
up vote
1
down vote
favorite
Assume $X(omega, t) sim mathcalN(0, K(cdot, cdot))$ is a real-valued, centered Gaussian process on $R^2$, i.e., $X: Omega times R^2 to R$. Let the covariance function of the process be stationary, i.e., $K(t, s) = K(t - s)$, $forall t, s in R^2$. More specifically, let it be exponential: $K(t, s) = exp(-|t - s|/L)$ where $|cdot|$ stands for the Euclidean distance, and $L$ denotes the correlation length. Using the Karhunen-Loève expansion, $X$ can be represented as the following summation:
$X(t, omega) = sum_i=1^infty sqrtlambda_i phi_i(t) xi_i(omega)$
where $xi_i$ are independent, standard Gaussians, and $phi_i$ and $lambda_i$ are the eigenfunctions and eigenvalues of the covariance function $K$, which, in our case, can be computed analytically. For practical computations, the expansion above is truncated to keep, say, $n$ terms.
The question is: How to draw samples of the process on $R^2$, i.e., on a two-dimensional grid of fixed points, using the first $n$ eigenfunctions and eigenvalues of $K$? The problem is that the eigenfunctions are somewhat one-dimensional, and I cannot figure out how to properly use them to get realizations of $X$ on a plane. To be honest, the analytical solution that I claimed previously was initially obtained for processes on $R$, so I am not even sure that it applies directly to $R^2$. When I plug in the norms of points' coordinates into $phi_i$, I get radial patterns, which is presumably not correct.
Also, it is easy to simulate $X$ by constructing the corresponding covariance matrix for a set of points, which boils down to drawing samples from a multivariate Gaussian distribution. I am not interested in this approach.
I would be very grateful for any ideas. Thank you.
probability-theory stochastic-processes normal-distribution simulation
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Assume $X(omega, t) sim mathcalN(0, K(cdot, cdot))$ is a real-valued, centered Gaussian process on $R^2$, i.e., $X: Omega times R^2 to R$. Let the covariance function of the process be stationary, i.e., $K(t, s) = K(t - s)$, $forall t, s in R^2$. More specifically, let it be exponential: $K(t, s) = exp(-|t - s|/L)$ where $|cdot|$ stands for the Euclidean distance, and $L$ denotes the correlation length. Using the Karhunen-Loève expansion, $X$ can be represented as the following summation:
$X(t, omega) = sum_i=1^infty sqrtlambda_i phi_i(t) xi_i(omega)$
where $xi_i$ are independent, standard Gaussians, and $phi_i$ and $lambda_i$ are the eigenfunctions and eigenvalues of the covariance function $K$, which, in our case, can be computed analytically. For practical computations, the expansion above is truncated to keep, say, $n$ terms.
The question is: How to draw samples of the process on $R^2$, i.e., on a two-dimensional grid of fixed points, using the first $n$ eigenfunctions and eigenvalues of $K$? The problem is that the eigenfunctions are somewhat one-dimensional, and I cannot figure out how to properly use them to get realizations of $X$ on a plane. To be honest, the analytical solution that I claimed previously was initially obtained for processes on $R$, so I am not even sure that it applies directly to $R^2$. When I plug in the norms of points' coordinates into $phi_i$, I get radial patterns, which is presumably not correct.
Also, it is easy to simulate $X$ by constructing the corresponding covariance matrix for a set of points, which boils down to drawing samples from a multivariate Gaussian distribution. I am not interested in this approach.
I would be very grateful for any ideas. Thank you.
probability-theory stochastic-processes normal-distribution simulation
Assume $X(omega, t) sim mathcalN(0, K(cdot, cdot))$ is a real-valued, centered Gaussian process on $R^2$, i.e., $X: Omega times R^2 to R$. Let the covariance function of the process be stationary, i.e., $K(t, s) = K(t - s)$, $forall t, s in R^2$. More specifically, let it be exponential: $K(t, s) = exp(-|t - s|/L)$ where $|cdot|$ stands for the Euclidean distance, and $L$ denotes the correlation length. Using the Karhunen-Loève expansion, $X$ can be represented as the following summation:
$X(t, omega) = sum_i=1^infty sqrtlambda_i phi_i(t) xi_i(omega)$
where $xi_i$ are independent, standard Gaussians, and $phi_i$ and $lambda_i$ are the eigenfunctions and eigenvalues of the covariance function $K$, which, in our case, can be computed analytically. For practical computations, the expansion above is truncated to keep, say, $n$ terms.
The question is: How to draw samples of the process on $R^2$, i.e., on a two-dimensional grid of fixed points, using the first $n$ eigenfunctions and eigenvalues of $K$? The problem is that the eigenfunctions are somewhat one-dimensional, and I cannot figure out how to properly use them to get realizations of $X$ on a plane. To be honest, the analytical solution that I claimed previously was initially obtained for processes on $R$, so I am not even sure that it applies directly to $R^2$. When I plug in the norms of points' coordinates into $phi_i$, I get radial patterns, which is presumably not correct.
Also, it is easy to simulate $X$ by constructing the corresponding covariance matrix for a set of points, which boils down to drawing samples from a multivariate Gaussian distribution. I am not interested in this approach.
I would be very grateful for any ideas. Thank you.
probability-theory stochastic-processes normal-distribution simulation
probability-theory stochastic-processes normal-distribution simulation
edited Feb 20 '13 at 6:48
asked Jan 12 '13 at 17:52
Ivan
538416
538416
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
%choose a kernel (covariance function)
kernel = 2;
switch kernel
case 1; k = @(x,y) 1*x'*y; %linear
case 2; k = @(x,y) exp(-100*(x-y)'*(x-y));
case 3; k = @(x,y) exp(-1*sqrt((x-y)'*(x-y)));
end
%choose points at which to sample
points = (0:0.02:1)';
[U,V] = meshgrid(points, points);
x=[U(:) V(:)]';
n=size(x,2);
%construct the covariance matrix
C = zeros(n,n);
for i = 1:n
for j = 1:n
C(i,j) = k(x(:,i), x(:,j));
end
end
%sample from the Gaussian process at these points
u = randn(n,1);
[A,S,B]= svd(C);
z = A*sqrt(S)*u;
%plot
figure(2); clf;
Z = reshape(z, sqrt(n), sqrt(n));
surf(U,V,Z);
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
%choose a kernel (covariance function)
kernel = 2;
switch kernel
case 1; k = @(x,y) 1*x'*y; %linear
case 2; k = @(x,y) exp(-100*(x-y)'*(x-y));
case 3; k = @(x,y) exp(-1*sqrt((x-y)'*(x-y)));
end
%choose points at which to sample
points = (0:0.02:1)';
[U,V] = meshgrid(points, points);
x=[U(:) V(:)]';
n=size(x,2);
%construct the covariance matrix
C = zeros(n,n);
for i = 1:n
for j = 1:n
C(i,j) = k(x(:,i), x(:,j));
end
end
%sample from the Gaussian process at these points
u = randn(n,1);
[A,S,B]= svd(C);
z = A*sqrt(S)*u;
%plot
figure(2); clf;
Z = reshape(z, sqrt(n), sqrt(n));
surf(U,V,Z);
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
add a comment |Â
up vote
0
down vote
%choose a kernel (covariance function)
kernel = 2;
switch kernel
case 1; k = @(x,y) 1*x'*y; %linear
case 2; k = @(x,y) exp(-100*(x-y)'*(x-y));
case 3; k = @(x,y) exp(-1*sqrt((x-y)'*(x-y)));
end
%choose points at which to sample
points = (0:0.02:1)';
[U,V] = meshgrid(points, points);
x=[U(:) V(:)]';
n=size(x,2);
%construct the covariance matrix
C = zeros(n,n);
for i = 1:n
for j = 1:n
C(i,j) = k(x(:,i), x(:,j));
end
end
%sample from the Gaussian process at these points
u = randn(n,1);
[A,S,B]= svd(C);
z = A*sqrt(S)*u;
%plot
figure(2); clf;
Z = reshape(z, sqrt(n), sqrt(n));
surf(U,V,Z);
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
add a comment |Â
up vote
0
down vote
up vote
0
down vote
%choose a kernel (covariance function)
kernel = 2;
switch kernel
case 1; k = @(x,y) 1*x'*y; %linear
case 2; k = @(x,y) exp(-100*(x-y)'*(x-y));
case 3; k = @(x,y) exp(-1*sqrt((x-y)'*(x-y)));
end
%choose points at which to sample
points = (0:0.02:1)';
[U,V] = meshgrid(points, points);
x=[U(:) V(:)]';
n=size(x,2);
%construct the covariance matrix
C = zeros(n,n);
for i = 1:n
for j = 1:n
C(i,j) = k(x(:,i), x(:,j));
end
end
%sample from the Gaussian process at these points
u = randn(n,1);
[A,S,B]= svd(C);
z = A*sqrt(S)*u;
%plot
figure(2); clf;
Z = reshape(z, sqrt(n), sqrt(n));
surf(U,V,Z);
%choose a kernel (covariance function)
kernel = 2;
switch kernel
case 1; k = @(x,y) 1*x'*y; %linear
case 2; k = @(x,y) exp(-100*(x-y)'*(x-y));
case 3; k = @(x,y) exp(-1*sqrt((x-y)'*(x-y)));
end
%choose points at which to sample
points = (0:0.02:1)';
[U,V] = meshgrid(points, points);
x=[U(:) V(:)]';
n=size(x,2);
%construct the covariance matrix
C = zeros(n,n);
for i = 1:n
for j = 1:n
C(i,j) = k(x(:,i), x(:,j));
end
end
%sample from the Gaussian process at these points
u = randn(n,1);
[A,S,B]= svd(C);
z = A*sqrt(S)*u;
%plot
figure(2); clf;
Z = reshape(z, sqrt(n), sqrt(n));
surf(U,V,Z);
edited Jul 20 '14 at 4:23
snarski
4,1691119
4,1691119
answered Feb 22 '13 at 0:22
ibrahim
1
1
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
add a comment |Â
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
Some information is lacking ; it should especially be said that the Singular Value Decomposition (svd operator in Matlab) is the finite equivalent of Karhuenen-Loeve decomposition.
â Jean Marie
Dec 17 '17 at 23:23
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f276448%2fsimulation-of-a-gaussian-process-on-r2-with-a-stationary-kernel-using-the-kar%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password