rGNN  R Documentation 
Sampling method for objects of S3
class "gnn_GNN"
.
## S3 method for class 'gnn_GNN'
rGNN(x, size, prior = NULL, pobs = FALSE, ...)
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
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.