build.nn: Builds a Neural Network object

Description Usage Arguments Value Examples

Description

Builds a Neural Network object

Usage

1
2
build.nn(inputs, outputs, hiddens = 0, weights = NULL,
  weight_range = c(-1, 1), enable_rate = 0.7)

Arguments

inputs, outputs

Numeric indicating the number of inputs and outputs

hiddens

Numeric Vector indicating the number of hidden neurons per layer (optional)

weights

Numeric Vector of the nodal weight, if NULL (default) random weights will be sampled from an uniform distribution over weight_range. missing values will be randomized and excess values will be cropped

weight_range

Numeric Vector of length 2 with the lower and upper bounds for the random weight generation

enable_rate

Numeric between 0 and 1 indicating the probability that a link will be enabled

Value

neural network object

Examples

1
2
3
4
build.nn(2, 1, enable_rate = 1) %>% plot
build.nn(2, 1, 2, enable_rate = 1) %>% plot
build.nn(2, 1, c(2,3), enable_rate = 1, weight_range = 0) %>% plot
build.nn(2, 2, c(5,5,5), enable_rate = 1, weight_range = 0) %>% plot

coldfir3/neatr documentation built on May 23, 2019, 4:24 p.m.