| generateK | R Documentation | 
Generate Standard Gaussian samples with a Gaussian transiiton kernel
generateK(X, N = 100, thinning = 4, sigma = 1, lsf, burnin = 20)
X | 
 the seeds for the Markov Chain. There are as many MC drawn as given seeds  | 
N | 
 the number of desired samples"'  | 
thinning | 
 the proportion of kept samples, ie. 1 each   | 
sigma | 
 the exploration parameter for the transition kernel  | 
lsf | 
 a boolean limit-state function for definig a subdomain of the input space.  | 
burnin | 
 the   | 
This function generates standard Gaussian samples with a Markov Chain using a suitable transition kernel
A matrix X with the number of desired samples
Clement WALTER clementwalter@icloud.com
# Get a seed in dimension 2
X <- matrix(rnorm(2), nrow = 2)
X <- generateK(X, N = 1000)
library(ggplot2)
ggplot(as.data.frame(t(X)), aes(x_1,x_2)) + geom_point()
# One can also specify a limit-state function
lsf <- function(X){
     sqrt(colSums(X^2)) > 2
}
X <- matrix(c(2, 2), nrow = 2)
X <- generateK(X, N = 1000, lsf = lsf)
ggplot(as.data.frame(t(X)), aes(x_1,x_2)) + geom_point()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.