GNN_basics {gnn}R Documentation

Basic Functions and Methods

Description

Basic functions and methods for objects of S3 class "gnn_GNN".

Usage

## S3 method for class 'gnn_GNN'
print(x, ...)
## S3 method for class 'gnn_GNN'
str(object, ...)
## S3 method for class 'gnn_GNN'
summary(object, ...)
## S3 method for class 'gnn_GNN'
dim(x)
## S3 method for class 'gnn_GNN'
is.GNN(x)
## S3 method for class 'list'
is.GNN(x)

Arguments

x
print(), dim()

object of S3 class "gnn_GNN".

is.GNN()

object of S3 class "gnn_GNN" or a list of such.

object

object of S3 class "gnn_GNN".

...

currently not used.

Value

print()

return value of the print() method for objects of class "list".

str()

nothing, as str() returns nothing when applied to objects of class "list".

summary()

return value of the summary() method for objects of class "list".

dim()

slot dim of x, so a vector of dimensions of input, hidden and output layers.

is.GNN()

logical of length equal to the length of x indicating, for each component, whether it is an object of class "gnn_GNN".

Author(s)

Marius Hofert

Examples

if(TensorFlow_available()) { # rather restrictive (due to R-Forge, winbuilder)
library(gnn) # for being standalone

d <- 2
dim <- c(d, 300, d) # dimensions of the input, hidden and output layers
GMMN <- FNN(dim) # define the GMMN model
stopifnot(is.GNN(GMMN)) # check for being a GNN
GMMN # print() method
str(GMMN) # str() method
summary(GMMN) # summary() method
stopifnot(dim(GMMN) == c(d, 300, d)) # dim() method

}

[Package gnn version 0.0-4 Index]