Description Usage Arguments Details Value See Also Examples
These functions can be used to export and import multilayer perceptron network to/from a text file in FCNN format.
1 2 3 | mlp_export_fcnn(fname, net)
mlp_import_fcnn(fname)
|
fname |
character string with the filename |
net |
an object of |
Files are organised as follows:
the first comment (beginning with #
) is treated as network
information (name) string,
all other comments are ignored,
network structure is represented by five block of numbers:
the first line determines numbers of neurons in consecutive layers,
the second block of 0's and 1's determines which weights are turned off/on,
the third block contains active weights' values,
the last block determines hidden and output layers' activation functions and their slope parameters - each line contains 2 numbers: the function index and its slope parameter.
mlp_export_fcnn
returns logical value, TRUE if export was successful,
FALSE otherwise.
mlp_import_fcnn
returns an object of mlp_net
class or NULL,
if import failed.
mlp_net
for network representation details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create a 2-3-1 network
net <- mlp_net(c(2, 3, 1))
# randomise weights
net <- mlp_rnd_weights(net)
# show the network
show(net)
# export network
mlp_export_fcnn("test.net", net)
# show the output file
file.show("test.net")
# import network
net2 <- mlp_import_fcnn("test.net")
# show the imported network
show(net2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.