generateK: Generate Standard Gaussian samples with a Gaussian transiiton...

Description Usage Arguments Details Value Author(s) Examples

View source: R/generateK.R

Description

Generate Standard Gaussian samples with a Gaussian transiiton kernel

Usage

1
generateK(X, N = 100, thinning = 4, sigma = 1, lsf, burnin = 20)

Arguments

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 thinning draw.

sigma

the exploration parameter for the transition kernel

lsf

a boolean limit-state function for definig a subdomain of the input space.

burnin

the burnin parameter, ie. the number of discarded samples before keeping one.

Details

This function generates standard Gaussian samples with a Markov Chain using a suitable transition kernel

Value

A matrix X with the number of desired samples

Author(s)

Clement WALTER clementwalter@icloud.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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()

clemlaflemme/mistral documentation built on Jan. 3, 2020, 9:13 a.m.