mlp_graph: Generate a Multilayer Perceptron Graph

Description Usage Arguments Value Examples

View source: R/graph-sim.R

Description

Generate a multi-layer perceptron graph structure.

Usage

1
mlp_graph(inputs, layers, outputs)

Arguments

inputs

character, the names of the input nodes

outputs

character, the names of the output nodes

layers

a vector of integers specifying the number of hidden neurons (vertices) in each hidden layer

Value

igraph object, a structure with an input layer, an output layer and hidden layers in between. Each node is named. The graph has a vertex attribute called "layer" that describes whether it is an input, output, or hidden layer node.

Examples

1
2
g <- mlp_graph(c("I1", "I2"), c("O1", "O2", "O3"), c(3, 2, 4))
igraphviz(g)

robertness/lucy documentation built on May 27, 2019, 10:32 a.m.