Description Usage Arguments Value Author(s) Examples
Sampling method for objects of S3
class "gnn_GNN"
.
1 2 
x 
object of 
size 
sample size, a positive 
prior 
one of

pobs 

... 
additional arguments passed to the underlying

(size, dim(x)[1])
matrix
of samples.
Marius Hofert
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  if(TensorFlow_available()) { # rather restrictive (due to RForge, winbuilder)
library(gnn) # for being standalone
## Define dummy model
d < 2 # bivariate case
GMMN < FNN(c(d, 300, d)) # Feedforward NN with MMD loss (a GMMN; random weights)
## Sampling
n < 3
(X1 < rGNN(GMMN, size = n)) # default (independent N(0,1) samples as prior)
(X2 < rGNN(GMMN, size = n, # passing additional arguments to rPrior()
qmargins = qexp, method = "sobol", seed = 271))
(X3 < rGNN(GMMN, prior = matrix(rexp(n * d), ncol = d))) # providing 'prior'
stopifnot(dim(X1) == c(n, d), dim(X2) == c(n, d), dim(X3) == c(n, d))
}

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.