mlp_prune_mag: Minimum magnitude pruning

Description Usage Arguments Value

View source: R/mlp_prune.R

Description

Minimum magnitude pruning is a brute force, easy-to-implement pruning algorithm in which in each step the weight with the smallest absolute value is turned off. This algorithm requires reteaching network in almost every step and yields suboptimal results.

Usage

1
2
mlp_prune_mag(net, input, output, tol_level, max_reteach_epochs, report,
  plots = FALSE)

Arguments

net

an object of mlp_net class

input

numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the network input layer

output

numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the network output layer, the number of rows must be equal to the number of input rows

tol_level

numeric value, error (MSE) tolerance level

max_reteach_epochs

integer value, maximal number of epochs (iterations) allowed when reteaching network

report

logical value, if TRUE, information about the pruning process will be printed on the console (FALSE by default)

plots

logical value, if TRUE, the initial network is plotted and then replotted every time neuron is removed and at the end of pruning (FALSE by default)

Value

Three-element list, the first field (net) contains the pruned network, the second (wcount) - the number of connections removed (inactivated), the third (ncount) - the number of neurons removed.


FCNN4R documentation built on May 29, 2017, 4:26 p.m.