Learn R Programming

gnn (version 0.0-4)

GNN_basics: Basic Functions and Methods

Description

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

Usage

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

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".

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.

Author

Marius Hofert

Examples

Run this code
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

}

Run the code above in your browser using DataLab