initializeGraph: Create an signal graph object that is unfitted

Description Usage Arguments Value

Description

igraph objects have three kinds attributes; graph attributes, edge attributes, and vertex attributes. This function builds a signalgraph object from an igraph object using these attributes. First the graph attributes are added, then vertex attributes. The model takes a data frame as an input. Fixed variables have to be named in the fixed argument, or else variables will be considered random. The name of each variable in the data must match a vertex name in the graph. The values for a given variable are added as a vertex attribute to that vertex. Next, edge weights are added as edge attributes. Finally, the weights are updated.

Usage

1
initializeGraph(g, data, fixed = NULL, graph_attr = NULL)

Arguments

g

igraph object. The vertices must be named.

data

a data frame. All of the names in the data from must match a vertex name.

fixed

character array, vertex names of fixed variables in data. Defaults to NULL meaning all variables in the data are treated as random.

graph_attr

list of graph attributes. Graph attributes include:

  • L1_penpenalized least squares error L1 penalty parameter value

  • L2_penpenalized least squares error L2 penalty parameter value

  • activationthe activation function (this actually is an R function), defaults to logistic.

  • activation.primeThe derivative of the activation function, used in gradient calculation. Defaults to NULL

  • min.max.constraints2 element numeric containing the acceptable range for each rate.

Value

A graph with all the attributes needed to fit the neural network model.


robertness/signalgraph documentation built on May 27, 2019, 10:33 a.m.