1.2 KiB
1.2 KiB
description: How to use the Random model network in Neataptic authors: Thomas Wagenaar keywords: recurrent, feed-forward, gates, neural-network, random, architecture
A random network is similar to a liquid network. This network will start of with a given pool of nodes, and will then create random connections between them. This network is really only useful for the initialization of the population for a genetic algorithm.
new architect.Random(input_size, hidden_size, output_size, options);
input_size
: amount of input nodeshidden_size
: amount of nodes inbetween input and outputoutput_size
: amount of output nodes
Options:
connections
: amount of connections (default is2 * hidden_size
, should always be bigger thanhidden_size
!)backconnections
: amount of recurrent connections (default is0
)selfconnections
: amount of selfconnections (default is0
)gates
: amount of gates (default is0
)
For example:
var network = architect.Random(1, 20, 2, {
connections: 40,
gates: 4,
selfconnections: 4
});
drawGraph(network.graph(1000, 800), '.svg');
will produce: