fitGNN {gnn}R Documentation

Functions and Methods for Training of Generative Neural Networks

Description

Functions and methods for training generative neural networks.

Usage

## S3 method for class 'gnn_GNN'
fitGNN(x, data, batch.size = nrow(data), n.epoch = 100,
    prior = NULL, max.n.prior = 5000, verbose = 2, ...)
## S3 method for class 'gnn_GNN'
fitGNNonce(x, data, batch.size = nrow(data), n.epoch = 100,
    prior = NULL, verbose = 2, file = NULL, name = NULL, ...)
## S3 method for class 'gnn_GNN'
is.trained(x)
## S3 method for class 'list'
is.trained(x)

Arguments

x
fitGNN(), fitGNNonce(), is.trained.gnn_GNN()

object of class "gnn_GNN" to be trained.

is.trained.gnn_GNN()

object of class "gnn_GNN" to be trained or a list of such.

data

(n, d)-matrix containing the n d-dimensional observations of the training data.

batch.size

number of samples used per stochastic gradient step.

n.epoch

number of epochs (one epoch equals one pass through the complete training dataset while updating the GNN's parameters through stochastic gradient steps).

prior

(n, d)-matrix of prior samples; see also rPrior(). If prior = NULL a sample of independent N(0,1) random variates is generated.

max.n.prior

maximum number of prior samples stored in x after training.

verbose

integer verbose level. Choices are:

0

silent (no output).

1

progress bar (via txtProgressBar()).

2

output after each block of epochs (block size is ceiling(n.epoch/10) if n.epoch <= 100 and ceiling(sqrt(n.epoch)) if n.epoch > 100).

3

output after each expoch.

file

NULL or a character string specifying the file in which the trained GNN(s) is (are) saved. If file is provided and the specified file exists, it is loaded and returned via load_gnn().

name

character string giving the name under which the fitted x is saved (if NULL the fitted x is saved under the name "x").

...

additional arguments passed to the underlying fit() (which is keras:::fit.keras.engine.training.Model()).

Value

fitGNN()

the trained x.

fitGNNonce()

object of class as x with the trained GNN.

is.trained.gnn_GNN()

logical indicating whether x is trained.

is.trained.list()

logical of length length(x) indicating, for each component, whether it is trained.

Author(s)

Marius Hofert

See Also

FNN(), save_gnn(), load_gnn().


[Package gnn version 0.0-4 Index]