Package FCNN4R. March 9, 2016

Size: px
Start display at page:

Download "Package FCNN4R. March 9, 2016"

Transcription

1 Type Package Title Fast Compressed Neural Networks for R Version Date Package FCNN4R March 9, 2016 Author Grzegorz Klima <gklima@users.sourceforge.> Maintainer Grzegorz Klima <gklima@users.sourceforge.> Provides an interface to kernel routines from the FCNN C++ library. FCNN is based on a completely new Artificial Neural Network representation that offers unmatched efficiency, modularity, and extensibility. FCNN4R provides standard teaching (backpropagation, Rprop, simulated annealing, stochastic gradient) and pruning algorithms (minimum magnitude, Optimal Brain Surgeon), but it is first and foremost an efficient computational engine. Users can easily implement their algorithms by taking advantage of fast gradient computing routines, as well as work reconstruction functionality (removing weights and redundant neurons, reordering inputs, merging works). Networks can be exported to C functions in order to integrate them into virtually any software solution. Depends R (>= 3.0), stats, graphics, methods, Rcpp License GPL (>= 2) NeedsCompilation yes Repository CRAN Date/Publication :57:57 R topics documented: FCNN4R-package is.mlp_ mlp_eval mlp_export_c mlp_ mlp_-absolute-weight-indices mlp_-accessing-individual-weights

2 2 FCNN4R-package mlp_-class mlp_-combining-two-works mlp_-display mlp_-export-import mlp_-general-information mlp_-manipulating-work-inputs mlp_-mse-gradients mlp_-names mlp_-weights-access mlp_plot mlp_prune_mag mlp_prune_obs mlp_rm_neurons mlp_rnd_weights mlp_set_activation mlp_teach_bp mlp_teach_grprop mlp_teach_rprop mlp_teach_sa mlp_teach_sgd read-write-fcnndataset Index 28 FCNN4R-package Fast Compressed Neural Networks for R Provides an interface to kernel routines from the FCNN C++ library. FCNN is based on a completely new Artificial Neural Network representation that offers unmatched efficiency, modularity, and extensibility. FCNN4R provides standard teaching (backpropagation, Rprop, simulated annealing, stochastic gradient) and pruning algorithms (minimum magnitude, Optimal Brain Surgeon), but it is first and foremost an efficient computational engine. Users can easily implement their algorithms by taking advantage of fast gradient computing routines, as well as work reconstruction functionality (removing weights and redundant neurons, reordering inputs, merging works). Networks can be exported to C functions in order to integrate them into virtually any software solution. Author(s) Grzegorz Klima <gklima@users.sourceforge.> References G. Klima. A new approach towards implementing artificial neural works. Technical Report,

3 is.mlp_ 3 Examples # set up the XOR problem inputs and outputs inp <- c(0, 0, 1, 1, 0, 1, 0, 1) dim(inp) <- c(4, 2) outp <- c(0, 1, 1, 0) dim(outp) <- c(4, 1) # create a work <- mlp_(c(2, 6, 1)) # set activation function in all layers <- mlp_set_activation(, layer = "a", "sigmoid") # randomise weights <- mlp_rnd_weights() # tolerance level tol <- 0.5e-4 # teach using Rprop, assign trained work and plot learning history mse <- mlp_teach_rprop(, inp, outp, tol_level = tol, max_epochs = 500, report_freq = 10) <- mse$ plot(mse$mse, type = l ) # plot work with weights mlp_plot(, TRUE) # if the algorithm had converged, prune using Optimal Brain Surgeon and plot if (mlp_mse(, inp, outp) <= tol) { <- mlp_prune_obs(, inp, outp, tol_level = tol, max_reteach_epochs = 500, report = TRUE)[[1]] mlp_plot(, TRUE) } # check work output round(mlp_eval(, inp), digits = 3) is.mlp_ Is it? This function checks whether argument is. is.mlp_(x) x an object to be checked Logical value.

4 4 mlp_export_c mlp_eval Evaluation Evaluate work output. mlp_eval(, input) input numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer Numeric matrix with rows representing work outputs corresponding to input rows. mlp_export_c Export multilayer perceptron work to a C function This function exports multilayer perceptron work to a C function with optional affine input and output transformations: Ax+b for inputs and Cx+d for outputs. mlp_export_c(fname,, with_bp = FALSE, A = NULL, b = NULL, C = NULL, d = NULL) fname with_bp A b C d character string with the filename logical, should backpropagation code for online learning be exported? numeric matrix (optional), input linear transformation numeric vector (optional), input translation numeric matrix (optional), output linear transformation numeric vector (optional), output translation

5 mlp_ 5 Logical value, TRUE if export was successful, FALSE otherwise. Examples # create a work <- mlp_(c(2, 3, 1)) # randomise weights <- mlp_rnd_weights() # show the work show() # export work to a C function mlp_export_c("test.c", ) # show the output file file.show("test.c") mlp_ Create objects of mlp_ class Function used for creating multilayer perceptron works. mlp_(layers, name = NULL) layers name vector providing numbers of neurons in each layer character string, work name (optional) Returns. See Also mlp_ for details.

6 6 mlp_-absolute-weight-indices Examples # create a work <- mlp_(c(2, 3, 1)) # randomise weights <- mlp_rnd_weights() # show basic information about the work show() mlp_-absolute-weight-indices Retrieving absolute weight index In some situations absolute weight index (i.e. index within all weights including inactive ones) needs to be computed based on information about connected neurons indices or weight index within actives ones. The latter functionality is especially useful in implementation of pruning algorithms. mlp_get_w_idx(, layer, nidx, nplidx) mlp_get_w_abs_idx(, idx) layer nidx nplidx idx integer value (vector), layer index integer value (vector), neuron index integer value (vector), index of the neuron in the previous layer determining connection from neuron nidx in layer, 0 denotes bias of neuron nidx in layer integer value (vector), weight index (indices) within active ones Absolute weight index.

7 mlp_-accessing-individual-weights 7 mlp_-accessing-individual-weights Setting and retrieving status (on/off) and value of individual weight(s) The following functions can be used to access individual weight(s), i.e. set or retrieve status(es) (on/off) and value(s). mlp_set_w_st(, on, idx = NULL, layer = NULL, nidx = NULL, nplidx = NULL) mlp_set_w(, val, idx = NULL, layer = NULL, nidx = NULL, nplidx = NULL) mlp_get_w_st(, idx = NULL, layer = NULL, nidx = NULL, nplidx = NULL) mlp_get_w(, idx = NULL, layer = NULL, nidx = NULL, nplidx = NULL) on idx layer nidx nplidx val logical value (vector), should the weight be set on or off? integer value (vector), weight absolute index integer value (vector), layer index integer value (vector), neuron index integer value (vector), index of the neuron in the previous layer determining connection from neuron nidx in layer, 0 denotes bias of neuron nidx in layer numeric value (vector), connection (or bias) value to be set mlp_set_w_st returns work () with state(s) (on/off) of selected weight(s) set. mlp_set_w returns work () with value(s) of selected weight(s) set. mlp_get_w_st returns logical value (vector), TRUE if connection/bias is active, FALSE otherwise. mlp_get_w returns numeric value (vector), selected weight value(s).

8 8 mlp_-class mlp_-class An S4 class representing Multilayer Perception Network. The mlp_ class represents the Multilayer Perception Network employing the so-called compressed representation, which was inspired by the Compressed Column Storage familiar from sparse matrix algebra. Although the representation and algorithms working with it are somewhat complicated, the user is provided with a simple and intuitive interface that completely hides the internal workings of the package, which in its large part is written in C++. Slots m_name character string, work name m_layers integer vector, stores the numbers of neurons in layers m_n_pointers integer vector, stores the so-called pointers to neurons m_n_prev integer vector, stores the number of connected neurons in the previous layer m_n_next integer vector, stores the number of connected neurons in the next layer m_w_pointers integer vector, stores the so-called pointers to weights m_w_values numeric vector, values of connection weights and biases m_w_flags logical vector, states (active/inactive) of weights and biases m_w_on integer value, the number of active weights m_af integer vector, activation functions indices m_af_p numeric vector, activation functions slope parameters References G. Klima. A new approach towards implementing artificial neural works. Technical Report, See Also mlp_ for creating objects of this class.

9 mlp_-combining-two-works 9 mlp_-combining-two-works Combining two works into one These functions construct new work by merging two works (they must have the same number of layers) or by connecting one work outputs to another work inputs (the numbers of output and input neurons must agree). These functions may be used in constructing deep learning works or constructing works with some special topologies. mlp_merge(1, 2, same_inputs = FALSE) mlp_stack(1, 2) 1 2 same_inputs logical, if TRUE both merged works are assumed to take the same inputs (they share the input layer), default is FALSE Both functions return. Examples # create two works with random weights and plot them 1 <- mlp_(c(2, 2, 2)) 1 <- mlp_rnd_weights(1) mlp_plot(1, TRUE) 2 <- mlp_(c(2, 2, 2)) 2 <- mlp_rnd_weights(2) mlp_plot(2, TRUE) # create a work with random weights and plot it 3 <- mlp_(c(4, 3, 2)) 3 <- mlp_rnd_weights(3) mlp_plot(3, TRUE) # construct new work using 1, 2, and 3 and plot it 4 <- mlp_stack(mlp_merge(1, 2), 3) mlp_plot(4, TRUE)

10 10 mlp_-export-import mlp_-display Displaying works (objects of mlp_ class) These methods can be used to display objects of mlp_ class. show and print provide short information about work structure and activation functions, summary gives detailed information about all work connections. ## S4 method for signature mlp_ show(object) ## S4 method for signature mlp_ print(x) ## S4 method for signature mlp_ summary(object) object x mlp_-export-import Export and import multilayer perceptron work to/from a text file in FCNN format These functions can be used to export and import multilayer perceptron work to/from a text file in FCNN format. mlp_export_fcnn(fname, ) mlp_import_fcnn(fname) fname character string with the filename

11 mlp_-general-information 11 Details See Also Files are organised as follows: the first comment (beginning with #) is treated as work information (name) string, all other comments are ignored, work 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 or NULL, if import failed. mlp_ for work representation details. Examples # create a work <- mlp_(c(2, 3, 1)) # randomise weights <- mlp_rnd_weights() # show the work show() # export work mlp_export_fcnn("test.", ) # show the output file file.show("test.") # import work 2 <- mlp_import_fcnn("test.") # show the imported work show(2) mlp_-general-information General information about work The following functions return basic information about the work.

12 12 mlp_-manipulating-work-inputs mlp_get_layers() mlp_get_no_active_w() mlp_get_no_w() mlp_get_layers returns an integer vector with numbers of neurons in consecutive layers. mlp_get_no_active_w returns the number of active weights (connections and biases). mlp_get_no_w returns the total number (including inactive) of weights (connections and biases). See Also mlp_-class for details on internal work representation. mlp_-manipulating-work-inputs Manipulating work inputs These functions construct new work by removing redundant (i.e. not connected to the next layer) inputs or reordering / expanding work inputs. mlp_rm_input_neurons(, report = FALSE) mlp_expand_reorder_inputs(, newnoinputs, inputsmap) report newnoinputs inputsmap logical value, if TRUE, information about removed neurons will be printed on the console (FALSE by default) integer value, determines the number of inputs in the new work integer vector, determines the mapping of old inputs into new ones - the ith value of this vector will be the new index of ith input

13 mlp_-mse-gradients 13 mlp_rm_input_neurons returns a two-element list. The first element () is the work (an object of mlp_ class) with all redundant input neurons removed, the second (ind) - the indices of input neurons that were not removed. mlp_expand_reorder_inputs returns. Examples # construct a work, plot result nn <- mlp_(c(2, 4, 3)) nn <- mlp_rnd_weights(nn) mlp_plot(nn, TRUE) # expand inputs, the new no. of inputs will be 5, with the first input # becoming the 3rd and the second retaining its position, plot result nn <- mlp_expand_reorder_inputs(nn, 5, c(3, 2)) mlp_plot(nn, TRUE) # remove redundant neurons (i.e. 1, 4, 5) and plot result nn <- mlp_rm_input_neurons(nn, TRUE)$ mlp_plot(nn, TRUE) mlp_-mse-gradients Computing mean squared error, its gradient, and output derivatives The functions use fast FCNN kernel routines and are intended for implementing teaching and pruning algorithms. mlp_mse(, input, output) mlp_grad(, input, output) mlp_gradi(, input, output, i) mlp_gradij(, input, i) mlp_jacob(, input, i) input numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer

14 14 mlp_-names output i numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the work output layer, the number of rows must be equal to the number of input rows data row index Details mlp_mse returns the mean squared error (MSE). MSE is understood as half of the squared error averaged over all outputs and data records. mlp_grad computes the gradient of MSE w.r.t. work weights. This function is useful when implementing batch teaching algorithms. mlp_gradi computes the gradient of MSE w.r.t. work weights at the ith data record. This is normalised by the number of outputs only, the average over all rows (all i) returns the same as grad(input, output). This function is useful for implementing on-line teaching algorithms. mlp_gradij computes gradients of work outputs, i.e the derivatives of outputs w.r.t. active weights, at given data row. The derivatives of outputs are placed in subsequent columns of the returned matrix. Scaled by the output errors and averaged they give the same as gradi(input, output, i). This function is useful in implementing teaching algorithms using second order corrections and Optimal Brain Surgeon pruning algorithm. mlp_jacob computes the Jacobian of work outputs, i.e the derivatives of outputs w.r.t. inputs, at given data row. The derivatives of outputs are placed in subsequent columns of the returned matrix. mlp_mse returns mean squared error (numeric value). mlp_grad returns two-element lists with the first field (grad) containing numeric vector with gradient and the second (mse) - the mean squared error. mlp_gradi returns numeric vector with gradient. mlp_gradij returns numeric matrix with gradients of outputs in consecutive columns. mlp_jacob returns numeric matrix with derivatives of outputs in consecutive columns. mlp_-names Get and set work names The following functions can be used for retrieving and setting work names. mlp_get_name() mlp_set_name(, name)

15 mlp_-weights-access 15 name character string with work name mlp_get_name returns character string with work name. mlp_set_name returns work () with name set to new value. mlp_-weights-access Set and retrieve (active) weights values One of FCNN s design objectives (and main advantages) is the complete separation of teaching (and pruning) algorithms from internal work structure workings. This goal is achieved through fast access to (active) weights vector facilitated by FCNN s compressed work representation. The following two functions allow users to efficiently retrieve and set work (active) weights vector. mlp_set_weights(, weights) mlp_get_weights() weights numeric vector of new active weights values mlp_set_weights returns work () with active weights set to given values. mlp_set_weights returns numeric vector of active weights values.

16 16 mlp_prune_mag mlp_plot Plotting multilayer perceptron work This function plots a multilayer perceptron work s structure. Optionally, weights values are displayed on graph. mlp_plot(, show_weights = FALSE, show_neuron_idx = TRUE) show_weights logical, should weights values be displayed? (FALSE by default) show_neuron_idx logical, should neurons indices be displayed? (TRUE by default) This function does not return value. mlp_prune_mag Minimum magnitude pruning 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 work in almost every step and yields suboptimal results. mlp_prune_mag(, input, output, tol_level, max_reteach_epochs, report, plots = FALSE) input output numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the work output layer, the number of rows must be equal to the number of input rows

17 mlp_prune_obs 17 tol_level numeric value, error (MSE) tolerance level max_reteach_epochs integer value, maximal number of epochs (iterations) allowed when reteaching work report plots logical value, if TRUE, information about the pruning process will be printed on the console (FALSE by default) logical value, if TRUE, the initial work is plotted and then replotted every time neuron is removed and at the end of pruning (FALSE by default) Three-element list, the first field () contains the pruned work, the second (wcount) - the number of connections removed (inactivated), the third (ncount) - the number of neurons removed. mlp_prune_obs Optimal Brain Surgeon pruning The Optimal Brain Surgeon algorithm is a robust (yet computationally demanding) pruning algorithm in which candidate weight to be turned off is determined based on information about the inverse of (approximate) Hessian matrix of the MSE. mlp_prune_obs(, input, output, tol_level, max_reteach_epochs, report, plots = FALSE, alpha = 1e-05) input output numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the work 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 work report plots alpha logical value, if TRUE, information about the pruning process will be printed on the console (FALSE by default) logical value, if TRUE, the initial work is plotted and then replotted every time neuron is removed and at the end of pruning (FALSE by default) numeric value, scaling factor used for initial Hessian approximation

18 18 mlp_rm_neurons Three-element list, the first field () contains the pruned work, the second (wcount) - the number of connections removed (inactivated), the third (ncount) - the number of neurons removed. References B. Hassibi, D. G. Stork, and G. J. Wolff. Optimal Brain Surgeon and General Network Pruning. Technical Report CRC-TR-9235, RICOH California Research Centre, mlp_rm_neurons Remove redundant neurons in a multilayer perceptron work This function removes redundant neurons from the work, i.e. hidden layers neurons that are not connected to neurons in the previous layer or the next layer. If a neuron is not connected to neurons in the previous layer but is connected to neurons in the next layer (effectively acts as an additional bias), biases of neurons in the next layer are properly adjusted, therefore, the resulting work behaves just like the initial one. mlp_rm_neurons(, report = FALSE) report logical value, if TRUE, information about removed neurons will be printed on the console (FALSE by default) Three-element list. The first element () is the work () with all redundant neurons removed, the second (ncount) - the number of neurons removed, the third (wcount) - the number of weights removed.

19 mlp_rnd_weights 19 mlp_rnd_weights This function sets work weights to random values drawn from uniform distribution. This function sets work weights to random values drawn from uniform distribution. mlp_rnd_weights(, a = 0.2) a numeric value, values will be drawn from uniform distribution on [-a, a] (by default a = 0.2) Network () with randomised weights. mlp_set_activation Set work activation functions This function sets activation function (and its slope parameter) for neurons in the hidden layers and in the output layer. mlp_set_activation(, layer, activation = c("threshold", "sym_threshold", "linear", "sigmoid", "sym_sigmoid", "tanh", "sigmoid_approx", "sym_sigmoid_approx"), slope = 0) layer activation slope integer vector or character value, index (indices) of layer(s) whose activation function will be changed or character: "a" denotes all layers, "h" - hidden layer(s), "o" - the output layer character string, activation function name, admissible options are: "threshold", "sym_threshold", "linear", "sigmoid", "sym_sigmoid" (and "tanh"), "sigmoid_approx", and "sym_sigmoid_approx" numeric value, activation function slope parameter, if 0 the default parameter value is chosen for each activation function

20 20 mlp_teach_bp This function returns work () with activation function set. mlp_teach_bp Backpropagation (batch) teaching Backpropagation (a teaching algorithm) is a simple steepest descent algorithm for MSE minimisation, in which weights are updated according to (scaled) gradient of MSE. mlp_teach_bp(, input, output, tol_level, max_epochs, learn_rate = 0.7, l2reg = 0, report_freq = 0) input output tol_level max_epochs numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the work output layer, the number of rows must be equal to the number of input rows numeric value, error (MSE) tolerance level integer value, maximal number of epochs (iterations) learn_rate numeric value, learning rate in the backpropagation algorithm (default 0.7) l2reg numeric value, L2 regularization parameter (default 0) report_freq integer value, progress report frequency, if set to 0 no information is printed on the console (this is the default) Two-element list, the first field () contains the trained work, the second (mse) - the learning history (MSE in consecutive epochs). Note The name backpropagation is commonly used in two contexts, which sometimes causes confusion. Firstly, backpropagation can be understood as an efficient algorithm for MSE gradient computation that was first described by Bryson and Ho in the 60s of 20th century and reinvented in the 80s. Secondly, the name backpropagation is (more often) used to refer to the steepest descent method that uses gradient of MSE computed efficiently by means of the aforementioned algorithm. This ambiguity is probably caused by the fact that in practically all neural work implementations, the derivatives of MSE and weight updates are computed simultaneously in one backward pass (from output layer to input layer).

21 mlp_teach_grprop 21 References A.E. Bryson and Y.C. Ho. Applied optimal control: optimization, estimation, and control. Blaisdell book in the pure and applied sciences. Blaisdell Pub. Co., David E. Rumelhart, Geoffrey E. Hinton, and Ronald J. Williams. Learning representations by back-propagating errors. Nature, 323(6088): , October mlp_teach_grprop Rprop teaching - minimising arbitrary objective function This implementation ( generalisation ) of the Rprop algorithm allows users to teach work to minimise arbitrary objective function provided that functions evaluating objective and computing gradient are provided. mlp_teach_grprop(, obj_func, gradient, epochs, stop = NULL, report_freq = 0, report_action = NULL, u = 1.2, d = 0.5, gmax = 50, gmin = 1e-06) obj_func gradient epochs stop report_freq report_action function taking an object of mlp_class class as a single argument returning objective to be minimised function taking an object of mlp_class class as a single argument returning gradient of the objective integer value, number of epochs (iterations) function (or NULL), a function taking objective history to date and returning Boolean value (if TRUE is returned, algorithm stops) (the default is not to stop until all iterations are performed) integer value, progress report frequency, if set to 0 no information is printed on the console (this is the default) function (or NULL), additional action to be taken while printing progress reports, this should be a function taking work as a single argument (default NULL) u numeric value, Rprop algorithm parameter (default 1.2) d numeric value, Rprop algorithm parameter (default 0.5) gmax numeric value, Rprop algorithm parameter (default 50) gmin numeric value, Rprop algorithm parameter (default 1e-6)

22 22 mlp_teach_grprop Two-element list, the first field () contains the trained work, the second (obj) - the learning history (value of the objective function in consecutive epochs). References M. Riedmiller. Rprop - and Implementation Details: Technical Report. Inst. f. Logik, Komplexitat u. Deduktionssysteme, Examples ## Not run: # set up XOR problem inp <- c(0, 0, 1, 1, 0, 1, 0, 1) dim(inp) <- c(4, 2) outp <- c(0, 1, 1, 0) dim(outp) <- c(4, 1) # objective obj <- function() { return(mlp_mse(, inp, outp)) } # gradient grad <- function() { return(mlp_grad(, inp, outp)$grad) } # stopping citerion tol <- function(oh) { if (oh[length(oh)] <= 5e-5) { return(true); } return(false) } # create a work <- mlp_(c(2, 6, 1)) # set activation function in all layers <- mlp_set_activation(, layer = "a", "sigmoid") # randomise weights <- mlp_rnd_weights() # teach obj <- mlp_teach_grprop(, obj, grad, epochs = 500, stop = tol, report_freq = 1) # plot learning history plot(obj$obj, type = l ) ## End(Not run)

23 mlp_teach_rprop 23 mlp_teach_rprop Rprop teaching Rprop is a fast and robust adaptive step method based on backpropagation. For details, please refer to the original paper given in References section. mlp_teach_rprop(, input, output, tol_level, max_epochs, l2reg = 0, u = 1.2, d = 0.5, gmax = 50, gmin = 1e-06, report_freq = 0) input output tol_level max_epochs numeric matrix, each row corresponds to one input vector, the number of columns must be equal to the number of neurons in the work input layer numeric matrix with rows corresponding to expected outputs, the number of columns must be equal to the number of neurons in the work output layer, the number of rows must be equal to the number of input rows numeric value, error (MSE) tolerance level integer value, maximal number of epochs (iterations) l2reg numeric value, L2 regularization parameter (default 0) u numeric value, Rprop algorithm parameter (default 1.2) d numeric value, Rprop algorithm parameter (default 0.5) gmax numeric value, Rprop algorithm parameter (default 50) gmin report_freq numeric value, Rprop algorithm parameter (default 1e-6) integer value, progress report frequency, if set to 0 no information is printed on the console (this is the default) Two-element list, the first field () contains the trained work, the second (mse) - the learning history (MSE in consecutive epochs). References M. Riedmiller. Rprop - and Implementation Details: Technical Report. Inst. f. Logik, Komplexitat u. Deduktionssysteme, 1994.

24 24 mlp_teach_sa mlp_teach_sa Teaching works using Simulated Annealing This function can be used to teach an ANN to minimise arbitrary objective function. mlp_teach_sa(, obj_func, Tinit = 1, epochs = 1000, report_freq = 0, report_action = NULL) obj_func function taking an object of mlp_class class as a single argument returning objective to be minimised Tinit numeric value, initial temperature (default is 1) epochs integer value, number of epochs (iterations) (default is 1000) report_freq report_action integer value, progress report frequency, if set to 0 no information is printed on the console (this is the default) function (or NULL), additional action to be taken while printing progress reports, this should be a function taking work as a single argument (default NULL) Two-element list, the first field () contains the trained work, the second (obj) - the learning history (value of the objective function in consecutive epochs). Examples ## Not run: # set up XOR problem inp <- c(0, 0, 1, 1, 0, 1, 0, 1) dim(inp) <- c(4, 2) outp <- c(0, 1, 1, 0) dim(outp) <- c(4, 1) # objective obj <- function() { return(mlp_mse(, inp, outp)) } # create a work <- mlp_(c(2, 6, 1)) # set activation function in all layers <- mlp_set_activation(, layer = "a", "sigmoid")

25 mlp_teach_sgd 25 # teach obj <- mlp_teach_sa(, obj, Tinit = 1, epochs = 1000, report_freq = 1) # plot learning history plot(obj$obj, type = l ) ## End(Not run) mlp_teach_sgd Stochastic gradient descent with (optional) RMS weights scaling, weight decay, and momentum This function implements the stochastic gradient descent method with optional modifications: L2 regularization, root mean square gradient scaling, weight decay, and momentum. mlp_teach_sgd(, input, output, tol_level, max_epochs, learn_rate, l2reg = 0, minibatchsz = 100, lambda = 0, gamma = 0, momentum = 0, report_freq = 0) input output tol_level max_epochs learn_rate numeric matrix, each row corresponds to one input vector number of columns must be equal to the number of neurons in the work input layer numeric matrix with rows corresponding to expected outputs, number of columns must be equal to the number of neurons in the work output layer, number of rows must be equal to the number of input rows numeric value, error (MSE) tolerance level integer value, maximal number of epochs (iterations) numeric value, (initial) learning rate, depending on the problem at hand, learning rates of or 0.01 should give satisfactory convergence l2reg numeric value, L2 regularization parameter (default 0) minibatchsz integer value, the size of the mini batch (default 100) lambda numeric value, rmsprop parameter controlling the update of mean squared gradient, reasonable value is 0.1 (default 0) gamma numeric value, weight decay parameter (default 0) momentum report_freq numeric value, momentum parameter, reasonable values are between 0.5 and 0.9 (default 0) integer value, progress report frequency, if set to 0 no information is printed on the console (this is the default)

26 26 read-write-fcnndataset Two-element list, the first field () contains the trained work, the second (mse) - the learning history (MSE in consecutive epochs). read-write-fcnndataset Reading and writing datasets in the FCNN format These functions can be used to read and write datasets from/to a text file in the FCNN format. Datasets in the similar FANN format (comments are not supported by FANN) can also be read by read.fcnndataset. read.fcnndataset(fname) write.fcnndataset(fname, input, output) fname input output character string with the filename numeric matrix, each row corresponds to one input vector numeric matrix with rows corresponding to expected outputs, the number of rows must be equal to the number of input rows Details Files are organised as follows: The first comment (beginning with #) is the dataset information (ignored on read), three numbers determine: number of records, no. of inputs and no. of outputs, each data record has two or three lines: (optional) record information in a comment (beginning with #), line with input values, line with output values. read.fcnndataset returns a dataframe. write.fcnndataset does not return.

27 read-write-fcnndataset 27 Examples # set up the XOR problem inputs and outputs inp <- c(0, 0, 1, 1, 0, 1, 0, 1) dim(inp) <- c(4, 2) outp <- c(0, 1, 1, 0) dim(outp) <- c(4, 1) # write dataset write.fcnndataset("xor.dat", inp, outp) # show the output file file.show("xor.dat") # read dataset xordf <- read.fcnndataset("xor.dat") # show the imported dataset show(xordf)

28 Index Topic classes is.mlp_, 3 mlp_, 5 mlp_-class, 8 Topic package FCNN4R-package, 2 Topic pruning mlp_prune_mag, 16 mlp_prune_obs, 17 Topic teaching mlp_teach_bp, 20 mlp_teach_grprop, 21 mlp_teach_rprop, 23 mlp_teach_sa, 24 mlp_teach_sgd, 25 FCNN4R-package, 2 is.mlp_, 3 mlp_eval, 4 mlp_expand_reorder_inputs mlp_, 5, 5, 8, 11 (mlp_-manipulating-work-inputs), 12 mlp_export_c, 4 mlp_export_fcnn (mlp_-export-import), 10 mlp_get_layers (mlp_-general-information), 11 mlp_get_name (mlp_-names), 14 mlp_get_no_active_w (mlp_-general-information), 11 mlp_get_no_w (mlp_-general-information), 11 mlp_get_w mlp_plot, 16 (mlp_-accessing-individual-weights), mlp_prune_mag, 16 7 mlp_prune_obs, mlp_get_w_abs_idx (mlp_-absolute-weight-indices), 6 mlp_get_w_idx (mlp_-absolute-weight-indices), 6 mlp_get_w_st (mlp_-accessing-individual-weights), 7 mlp_get_weights (mlp_-weights-access), 15 mlp_grad (mlp_-mse-gradients), 13 mlp_gradi (mlp_-mse-gradients), 13 mlp_gradij (mlp_-mse-gradients), 13 mlp_import_fcnn (mlp_-export-import), 10 mlp_jacob (mlp_-mse-gradients), 13 mlp_merge (mlp_-combining-two-works), 9 mlp_mse (mlp_-mse-gradients), 13 mlp_-absolute-weight-indices, 6 mlp_-accessing-individual-weights, 7 mlp_-class, 8 mlp_-combining-two-works, 9 mlp_-display, 10 mlp_-export-import, 10 mlp_-general-information, 11 mlp_-manipulating-work-inputs, 12 mlp_-method (mlp_-class), 8 mlp_-mse-gradients, 13 mlp_-names, 14 mlp_-weights-access, 15

29 INDEX 29 mlp_rm_input_neurons (mlp_-manipulating-work-inputs), 12 mlp_rm_neurons, 18 mlp_rnd_weights, 19 mlp_set_activation, 19 mlp_set_name (mlp_-names), 14 mlp_set_w (mlp_-accessing-individual-weights), 7 mlp_set_w_st (mlp_-accessing-individual-weights), 7 mlp_set_weights (mlp_-weights-access), 15 mlp_stack (mlp_-combining-two-works), 9 mlp_teach_bp, 20 mlp_teach_grprop, 21 mlp_teach_rprop, 23 mlp_teach_sa, 24 mlp_teach_sgd, 25 print,mlp_-method (mlp_-display), 10 read-write-fcnndataset, 26 read.fcnndataset (read-write-fcnndataset), 26 show,mlp_-method (mlp_-display), 10 summary,mlp_-method (mlp_-display), 10 write.fcnndataset (read-write-fcnndataset), 26

Neural Networks. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani

Neural Networks. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani Neural Networks CE-725: Statistical Pattern Recognition Sharif University of Technology Spring 2013 Soleymani Outline Biological and artificial neural networks Feed-forward neural networks Single layer

More information

LECTURE NOTES Professor Anita Wasilewska NEURAL NETWORKS

LECTURE NOTES Professor Anita Wasilewska NEURAL NETWORKS LECTURE NOTES Professor Anita Wasilewska NEURAL NETWORKS Neural Networks Classifier Introduction INPUT: classification data, i.e. it contains an classification (class) attribute. WE also say that the class

More information

Week 3: Perceptron and Multi-layer Perceptron

Week 3: Perceptron and Multi-layer Perceptron Week 3: Perceptron and Multi-layer Perceptron Phong Le, Willem Zuidema November 12, 2013 Last week we studied two famous biological neuron models, Fitzhugh-Nagumo model and Izhikevich model. This week,

More information

Visual object classification by sparse convolutional neural networks

Visual object classification by sparse convolutional neural networks Visual object classification by sparse convolutional neural networks Alexander Gepperth 1 1- Ruhr-Universität Bochum - Institute for Neural Dynamics Universitätsstraße 150, 44801 Bochum - Germany Abstract.

More information

Supervised Learning in Neural Networks (Part 2)

Supervised Learning in Neural Networks (Part 2) Supervised Learning in Neural Networks (Part 2) Multilayer neural networks (back-propagation training algorithm) The input signals are propagated in a forward direction on a layer-bylayer basis. Learning

More information

Package rnn. R topics documented: June 21, Title Recurrent Neural Network Version 0.8.1

Package rnn. R topics documented: June 21, Title Recurrent Neural Network Version 0.8.1 Title Recurrent Neural Network Version 0.8.1 Package rnn June 21, 2018 Implementation of a Recurrent Neural Network in R. Depends R (>= 3.2.2) License GPL-3 LazyData true RoxygenNote 6.0.1 URL http://qua.st/rnn,

More information

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

COMP 551 Applied Machine Learning Lecture 14: Neural Networks COMP 551 Applied Machine Learning Lecture 14: Neural Networks Instructor: (jpineau@cs.mcgill.ca) Class web page: www.cs.mcgill.ca/~jpineau/comp551 Unless otherwise noted, all material posted for this course

More information

Linear Separability. Linear Separability. Capabilities of Threshold Neurons. Capabilities of Threshold Neurons. Capabilities of Threshold Neurons

Linear Separability. Linear Separability. Capabilities of Threshold Neurons. Capabilities of Threshold Neurons. Capabilities of Threshold Neurons Linear Separability Input space in the two-dimensional case (n = ): - - - - - - w =, w =, = - - - - - - w = -, w =, = - - - - - - w = -, w =, = Linear Separability So by varying the weights and the threshold,

More information

Classification and Regression using Linear Networks, Multilayer Perceptrons and Radial Basis Functions

Classification and Regression using Linear Networks, Multilayer Perceptrons and Radial Basis Functions ENEE 739Q SPRING 2002 COURSE ASSIGNMENT 2 REPORT 1 Classification and Regression using Linear Networks, Multilayer Perceptrons and Radial Basis Functions Vikas Chandrakant Raykar Abstract The aim of the

More information

Package automl. September 13, 2018

Package automl. September 13, 2018 Type Package Title Deep Learning with Metaheuristic Version 1.0.5 Author Alex Boulangé Package automl September 13, 2018 Maintainer Alex Boulangé Fits from

More information

Package neural. R topics documented: February 20, 2015

Package neural. R topics documented: February 20, 2015 Version 1.4.2.2 Title Neural Networks Author Adam Nagy Maintainer Billy Aung Myint Package neural February 20, 2015 RBF and MLP neural networks with graphical user interface License GPL (>=

More information

arxiv: v1 [cs.lg] 25 Jan 2018

arxiv: v1 [cs.lg] 25 Jan 2018 A New Backpropagation Algorithm without Gradient Descent arxiv:1802.00027v1 [cs.lg] 25 Jan 2018 Varun Ranganathan Student at PES University varunranga1997@hotmail.com January 2018 S. Natarajan Professor

More information

Lecture 17: Neural Networks and Deep Learning. Instructor: Saravanan Thirumuruganathan

Lecture 17: Neural Networks and Deep Learning. Instructor: Saravanan Thirumuruganathan Lecture 17: Neural Networks and Deep Learning Instructor: Saravanan Thirumuruganathan Outline Perceptron Neural Networks Deep Learning Convolutional Neural Networks Recurrent Neural Networks Auto Encoders

More information

Multi-Layered Perceptrons (MLPs)

Multi-Layered Perceptrons (MLPs) Multi-Layered Perceptrons (MLPs) The XOR problem is solvable if we add an extra node to a Perceptron A set of weights can be found for the above 5 connections which will enable the XOR of the inputs to

More information

Using neural nets to recognize hand-written digits. Srikumar Ramalingam School of Computing University of Utah

Using neural nets to recognize hand-written digits. Srikumar Ramalingam School of Computing University of Utah Using neural nets to recognize hand-written digits Srikumar Ramalingam School of Computing University of Utah Reference Most of the slides are taken from the first chapter of the online book by Michael

More information

Assignment 2. Classification and Regression using Linear Networks, Multilayer Perceptron Networks, and Radial Basis Functions

Assignment 2. Classification and Regression using Linear Networks, Multilayer Perceptron Networks, and Radial Basis Functions ENEE 739Q: STATISTICAL AND NEURAL PATTERN RECOGNITION Spring 2002 Assignment 2 Classification and Regression using Linear Networks, Multilayer Perceptron Networks, and Radial Basis Functions Aravind Sundaresan

More information

CHAPTER VI BACK PROPAGATION ALGORITHM

CHAPTER VI BACK PROPAGATION ALGORITHM 6.1 Introduction CHAPTER VI BACK PROPAGATION ALGORITHM In the previous chapter, we analysed that multiple layer perceptrons are effectively applied to handle tricky problems if trained with a vastly accepted

More information

Learning. Learning agents Inductive learning. Neural Networks. Different Learning Scenarios Evaluation

Learning. Learning agents Inductive learning. Neural Networks. Different Learning Scenarios Evaluation Learning Learning agents Inductive learning Different Learning Scenarios Evaluation Slides based on Slides by Russell/Norvig, Ronald Williams, and Torsten Reil Material from Russell & Norvig, chapters

More information

Improving the way neural networks learn Srikumar Ramalingam School of Computing University of Utah

Improving the way neural networks learn Srikumar Ramalingam School of Computing University of Utah Improving the way neural networks learn Srikumar Ramalingam School of Computing University of Utah Reference Most of the slides are taken from the third chapter of the online book by Michael Nielson: neuralnetworksanddeeplearning.com

More information

Deep Learning. Practical introduction with Keras JORDI TORRES 27/05/2018. Chapter 3 JORDI TORRES

Deep Learning. Practical introduction with Keras JORDI TORRES 27/05/2018. Chapter 3 JORDI TORRES Deep Learning Practical introduction with Keras Chapter 3 27/05/2018 Neuron A neural network is formed by neurons connected to each other; in turn, each connection of one neural network is associated

More information

MODIFIED KALMAN FILTER BASED METHOD FOR TRAINING STATE-RECURRENT MULTILAYER PERCEPTRONS

MODIFIED KALMAN FILTER BASED METHOD FOR TRAINING STATE-RECURRENT MULTILAYER PERCEPTRONS MODIFIED KALMAN FILTER BASED METHOD FOR TRAINING STATE-RECURRENT MULTILAYER PERCEPTRONS Deniz Erdogmus, Justin C. Sanchez 2, Jose C. Principe Computational NeuroEngineering Laboratory, Electrical & Computer

More information

CS6220: DATA MINING TECHNIQUES

CS6220: DATA MINING TECHNIQUES CS6220: DATA MINING TECHNIQUES Image Data: Classification via Neural Networks Instructor: Yizhou Sun yzsun@ccs.neu.edu November 19, 2015 Methods to Learn Classification Clustering Frequent Pattern Mining

More information

Neural Network Learning. Today s Lecture. Continuation of Neural Networks. Artificial Neural Networks. Lecture 24: Learning 3. Victor R.

Neural Network Learning. Today s Lecture. Continuation of Neural Networks. Artificial Neural Networks. Lecture 24: Learning 3. Victor R. Lecture 24: Learning 3 Victor R. Lesser CMPSCI 683 Fall 2010 Today s Lecture Continuation of Neural Networks Artificial Neural Networks Compose of nodes/units connected by links Each link has a numeric

More information

Assignment # 5. Farrukh Jabeen Due Date: November 2, Neural Networks: Backpropation

Assignment # 5. Farrukh Jabeen Due Date: November 2, Neural Networks: Backpropation Farrukh Jabeen Due Date: November 2, 2009. Neural Networks: Backpropation Assignment # 5 The "Backpropagation" method is one of the most popular methods of "learning" by a neural network. Read the class

More information

Akarsh Pokkunuru EECS Department Contractive Auto-Encoders: Explicit Invariance During Feature Extraction

Akarsh Pokkunuru EECS Department Contractive Auto-Encoders: Explicit Invariance During Feature Extraction Akarsh Pokkunuru EECS Department 03-16-2017 Contractive Auto-Encoders: Explicit Invariance During Feature Extraction 1 AGENDA Introduction to Auto-encoders Types of Auto-encoders Analysis of different

More information

Package datasets.load

Package datasets.load Title Interface for Loading Datasets Version 0.1.0 Package datasets.load December 14, 2016 Visual interface for loading datasets in RStudio from insted (unloaded) s. Depends R (>= 3.0.0) Imports shiny,

More information

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic SEMANTIC COMPUTING Lecture 8: Introduction to Deep Learning Dagmar Gromann International Center For Computational Logic TU Dresden, 7 December 2018 Overview Introduction Deep Learning General Neural Networks

More information

CS 6501: Deep Learning for Computer Graphics. Training Neural Networks II. Connelly Barnes

CS 6501: Deep Learning for Computer Graphics. Training Neural Networks II. Connelly Barnes CS 6501: Deep Learning for Computer Graphics Training Neural Networks II Connelly Barnes Overview Preprocessing Initialization Vanishing/exploding gradients problem Batch normalization Dropout Additional

More information

Notes on Multilayer, Feedforward Neural Networks

Notes on Multilayer, Feedforward Neural Networks Notes on Multilayer, Feedforward Neural Networks CS425/528: Machine Learning Fall 2012 Prepared by: Lynne E. Parker [Material in these notes was gleaned from various sources, including E. Alpaydin s book

More information

Image Compression: An Artificial Neural Network Approach

Image Compression: An Artificial Neural Network Approach Image Compression: An Artificial Neural Network Approach Anjana B 1, Mrs Shreeja R 2 1 Department of Computer Science and Engineering, Calicut University, Kuttippuram 2 Department of Computer Science and

More information

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions Version 0.1-10 Date 2017-04-25 Title Robust Regression Functions Package robustreg April 27, 2017 Author Ian M. Johnson Maintainer Ian M. Johnson Depends

More information

Perceptron: This is convolution!

Perceptron: This is convolution! Perceptron: This is convolution! v v v Shared weights v Filter = local perceptron. Also called kernel. By pooling responses at different locations, we gain robustness to the exact spatial location of image

More information

4.12 Generalization. In back-propagation learning, as many training examples as possible are typically used.

4.12 Generalization. In back-propagation learning, as many training examples as possible are typically used. 1 4.12 Generalization In back-propagation learning, as many training examples as possible are typically used. It is hoped that the network so designed generalizes well. A network generalizes well when

More information

Package SAENET. June 4, 2015

Package SAENET. June 4, 2015 Type Package Package SAENET June 4, 2015 Title A Stacked Autoencoder Implementation with Interface to 'neuralnet' Version 1.1 Date 2015-06-04 An implementation of a stacked sparse autoencoder for dimension

More information

SNIWD: Simultaneous Weight Noise Injection With Weight Decay for MLP Training

SNIWD: Simultaneous Weight Noise Injection With Weight Decay for MLP Training SNIWD: Simultaneous Weight Noise Injection With Weight Decay for MLP Training John Sum and Kevin Ho Institute of Technology Management, National Chung Hsing University Taichung 4, Taiwan. pfsum@nchu.edu.tw

More information

A Novel Pruning Algorithm for Optimizing Feedforward Neural Network of Classification Problems

A Novel Pruning Algorithm for Optimizing Feedforward Neural Network of Classification Problems Chapter 5 A Novel Pruning Algorithm for Optimizing Feedforward Neural Network of Classification Problems 5.1 Introduction Many researchers have proposed pruning algorithms in numerous ways to optimize

More information

Gradient Descent Optimization Algorithms for Deep Learning Batch gradient descent Stochastic gradient descent Mini-batch gradient descent

Gradient Descent Optimization Algorithms for Deep Learning Batch gradient descent Stochastic gradient descent Mini-batch gradient descent Gradient Descent Optimization Algorithms for Deep Learning Batch gradient descent Stochastic gradient descent Mini-batch gradient descent Slide credit: http://sebastianruder.com/optimizing-gradient-descent/index.html#batchgradientdescent

More information

Neural Network Neurons

Neural Network Neurons Neural Networks Neural Network Neurons 1 Receives n inputs (plus a bias term) Multiplies each input by its weight Applies activation function to the sum of results Outputs result Activation Functions Given

More information

An Algorithm For Training Multilayer Perceptron (MLP) For Image Reconstruction Using Neural Network Without Overfitting.

An Algorithm For Training Multilayer Perceptron (MLP) For Image Reconstruction Using Neural Network Without Overfitting. An Algorithm For Training Multilayer Perceptron (MLP) For Image Reconstruction Using Neural Network Without Overfitting. Mohammad Mahmudul Alam Mia, Shovasis Kumar Biswas, Monalisa Chowdhury Urmi, Abubakar

More information

Logical Rhythm - Class 3. August 27, 2018

Logical Rhythm - Class 3. August 27, 2018 Logical Rhythm - Class 3 August 27, 2018 In this Class Neural Networks (Intro To Deep Learning) Decision Trees Ensemble Methods(Random Forest) Hyperparameter Optimisation and Bias Variance Tradeoff Biological

More information

Problem Set 2: From Perceptrons to Back-Propagation

Problem Set 2: From Perceptrons to Back-Propagation COMPUTER SCIENCE 397 (Spring Term 2005) Neural Networks & Graphical Models Prof. Levy Due Friday 29 April Problem Set 2: From Perceptrons to Back-Propagation 1 Reading Assignment: AIMA Ch. 19.1-4 2 Programming

More information

International Journal of Electrical and Computer Engineering 4: Application of Neural Network in User Authentication for Smart Home System

International Journal of Electrical and Computer Engineering 4: Application of Neural Network in User Authentication for Smart Home System Application of Neural Network in User Authentication for Smart Home System A. Joseph, D.B.L. Bong, and D.A.A. Mat Abstract Security has been an important issue and concern in the smart home systems. Smart

More information

In this assignment, we investigated the use of neural networks for supervised classification

In this assignment, we investigated the use of neural networks for supervised classification Paul Couchman Fabien Imbault Ronan Tigreat Gorka Urchegui Tellechea Classification assignment (group 6) Image processing MSc Embedded Systems March 2003 Classification includes a broad range of decision-theoric

More information

Efficient Deep Learning Optimization Methods

Efficient Deep Learning Optimization Methods 11-785/ Spring 2019/ Recitation 3 Efficient Deep Learning Optimization Methods Josh Moavenzadeh, Kai Hu, and Cody Smith Outline 1 Review of optimization 2 Optimization practice 3 Training tips in PyTorch

More information

Neural Networks Laboratory EE 329 A

Neural Networks Laboratory EE 329 A Neural Networks Laboratory EE 329 A Introduction: Artificial Neural Networks (ANN) are widely used to approximate complex systems that are difficult to model using conventional modeling techniques such

More information

CS489/698: Intro to ML

CS489/698: Intro to ML CS489/698: Intro to ML Lecture 14: Training of Deep NNs Instructor: Sun Sun 1 Outline Activation functions Regularization Gradient-based optimization 2 Examples of activation functions 3 5/28/18 Sun Sun

More information

Training of Neural Networks. Q.J. Zhang, Carleton University

Training of Neural Networks. Q.J. Zhang, Carleton University Training of Neural Networks Notation: x: input of the original modeling problem or the neural network y: output of the original modeling problem or the neural network w: internal weights/parameters of

More information

Classification Lecture Notes cse352. Neural Networks. Professor Anita Wasilewska

Classification Lecture Notes cse352. Neural Networks. Professor Anita Wasilewska Classification Lecture Notes cse352 Neural Networks Professor Anita Wasilewska Neural Networks Classification Introduction INPUT: classification data, i.e. it contains an classification (class) attribute

More information

Application of Neural Networks to b-quark jet detection in Z b b

Application of Neural Networks to b-quark jet detection in Z b b Application of Neural Networks to b-quark jet detection in Z b b Stephen Poprocki REU 25 Department of Physics, The College of Wooster, Wooster, Ohio 44691 Advisors: Gustaaf Brooijmans, Andy Haas Nevis

More information

Data Mining. Neural Networks

Data Mining. Neural Networks Data Mining Neural Networks Goals for this Unit Basic understanding of Neural Networks and how they work Ability to use Neural Networks to solve real problems Understand when neural networks may be most

More information

Perceptrons and Backpropagation. Fabio Zachert Cognitive Modelling WiSe 2014/15

Perceptrons and Backpropagation. Fabio Zachert Cognitive Modelling WiSe 2014/15 Perceptrons and Backpropagation Fabio Zachert Cognitive Modelling WiSe 2014/15 Content History Mathematical View of Perceptrons Network Structures Gradient Descent Backpropagation (Single-Layer-, Multilayer-Networks)

More information

6. Linear Discriminant Functions

6. Linear Discriminant Functions 6. Linear Discriminant Functions Linear Discriminant Functions Assumption: we know the proper forms for the discriminant functions, and use the samples to estimate the values of parameters of the classifier

More information

A Novel Technique for Optimizing the Hidden Layer Architecture in Artificial Neural Networks N. M. Wagarachchi 1, A. S.

A Novel Technique for Optimizing the Hidden Layer Architecture in Artificial Neural Networks N. M. Wagarachchi 1, A. S. American International Journal of Research in Science, Technology, Engineering & Mathematics Available online at http://www.iasir.net ISSN (Print): 2328-3491, ISSN (Online): 2328-3580, ISSN (CD-ROM): 2328-3629

More information

Neuron Selectivity as a Biologically Plausible Alternative to Backpropagation

Neuron Selectivity as a Biologically Plausible Alternative to Backpropagation Neuron Selectivity as a Biologically Plausible Alternative to Backpropagation C.J. Norsigian Department of Bioengineering cnorsigi@eng.ucsd.edu Vishwajith Ramesh Department of Bioengineering vramesh@eng.ucsd.edu

More information

Introduction to Multilayer Perceptrons

Introduction to Multilayer Perceptrons An Introduction to Multilayered Neural Networks Introduction to Multilayer Perceptrons Marco Gori University of Siena Outline of the course Motivations and biological inspiration Multilayer perceptrons:

More information

CS 4510/9010 Applied Machine Learning. Neural Nets. Paula Matuszek Fall copyright Paula Matuszek 2016

CS 4510/9010 Applied Machine Learning. Neural Nets. Paula Matuszek Fall copyright Paula Matuszek 2016 CS 4510/9010 Applied Machine Learning 1 Neural Nets Paula Matuszek Fall 2016 Neural Nets, the very short version 2 A neural net consists of layers of nodes, or neurons, each of which has an activation

More information

Traffic Signs Recognition using HP and HOG Descriptors Combined to MLP and SVM Classifiers

Traffic Signs Recognition using HP and HOG Descriptors Combined to MLP and SVM Classifiers Traffic Signs Recognition using HP and HOG Descriptors Combined to MLP and SVM Classifiers A. Salhi, B. Minaoui, M. Fakir, H. Chakib, H. Grimech Faculty of science and Technology Sultan Moulay Slimane

More information

Package anidom. July 25, 2017

Package anidom. July 25, 2017 Type Package Package anidom July 25, 2017 Title Inferring Dominance Hierarchies and Estimating Uncertainty Version 0.1.2 Date 2017-07-25 Author Damien R. Farine and Alfredo Sanchez-Tojar Maintainer Damien

More information

Neural Network Optimization and Tuning / Spring 2018 / Recitation 3

Neural Network Optimization and Tuning / Spring 2018 / Recitation 3 Neural Network Optimization and Tuning 11-785 / Spring 2018 / Recitation 3 1 Logistics You will work through a Jupyter notebook that contains sample and starter code with explanations and comments throughout.

More information

Multilayer Feed-forward networks

Multilayer Feed-forward networks Multi Feed-forward networks 1. Computational models of McCulloch and Pitts proposed a binary threshold unit as a computational model for artificial neuron. This first type of neuron has been generalized

More information

Deep Neural Networks Optimization

Deep Neural Networks Optimization Deep Neural Networks Optimization Creative Commons (cc) by Akritasa http://arxiv.org/pdf/1406.2572.pdf Slides from Geoffrey Hinton CSC411/2515: Machine Learning and Data Mining, Winter 2018 Michael Guerzhoy

More information

Optimal Brain Damage. Yann Le Cun, John S. Denker and Sara A. Solla. presented by Chaitanya Polumetla

Optimal Brain Damage. Yann Le Cun, John S. Denker and Sara A. Solla. presented by Chaitanya Polumetla Optimal Brain Damage Yann Le Cun, John S. Denker and Sara A. Solla presented by Chaitanya Polumetla Overview Introduction Need for OBD The Idea Authors Proposal Why OBD could work? Experiments Results

More information

Introduction to Neural Networks: Structure and Training

Introduction to Neural Networks: Structure and Training Introduction to Neural Networks: Structure and Training Qi-Jun Zhang Department of Electronics Carleton University, Ottawa, ON, Canada A Quick Illustration Example: Neural Network Model for Delay Estimation

More information

Multi Layer Perceptron with Back Propagation. User Manual

Multi Layer Perceptron with Back Propagation. User Manual Multi Layer Perceptron with Back Propagation User Manual DAME-MAN-NA-0011 Issue: 1.3 Date: September 03, 2013 Author: S. Cavuoti, M. Brescia Doc. : MLPBP_UserManual_DAME-MAN-NA-0011-Rel1.3 1 INDEX 1 Introduction...

More information

CS 4510/9010 Applied Machine Learning

CS 4510/9010 Applied Machine Learning CS 4510/9010 Applied Machine Learning Neural Nets Paula Matuszek Spring, 2015 1 Neural Nets, the very short version A neural net consists of layers of nodes, or neurons, each of which has an activation

More information

APPLICATION OF A MULTI- LAYER PERCEPTRON FOR MASS VALUATION OF REAL ESTATES

APPLICATION OF A MULTI- LAYER PERCEPTRON FOR MASS VALUATION OF REAL ESTATES FIG WORKING WEEK 2008 APPLICATION OF A MULTI- LAYER PERCEPTRON FOR MASS VALUATION OF REAL ESTATES Tomasz BUDZYŃSKI, PhD Artificial neural networks the highly sophisticated modelling technique, which allows

More information

Lecture 20: Neural Networks for NLP. Zubin Pahuja

Lecture 20: Neural Networks for NLP. Zubin Pahuja Lecture 20: Neural Networks for NLP Zubin Pahuja zpahuja2@illinois.edu courses.engr.illinois.edu/cs447 CS447: Natural Language Processing 1 Today s Lecture Feed-forward neural networks as classifiers simple

More information

6. Backpropagation training 6.1 Background

6. Backpropagation training 6.1 Background 6. Backpropagation training 6.1 Background To understand well how a feedforward neural network is built and it functions, we consider its basic first steps. We return to its history for a while. In 1949

More information

Deep Learning. Vladimir Golkov Technical University of Munich Computer Vision Group

Deep Learning. Vladimir Golkov Technical University of Munich Computer Vision Group Deep Learning Vladimir Golkov Technical University of Munich Computer Vision Group 1D Input, 1D Output target input 2 2D Input, 1D Output: Data Distribution Complexity Imagine many dimensions (data occupies

More information

Artificial Neural Networks Lecture Notes Part 5. Stephen Lucci, PhD. Part 5

Artificial Neural Networks Lecture Notes Part 5. Stephen Lucci, PhD. Part 5 Artificial Neural Networks Lecture Notes Part 5 About this file: If you have trouble reading the contents of this file, or in case of transcription errors, email gi0062@bcmail.brooklyn.cuny.edu Acknowledgments:

More information

Convolutional Neural Network for Image Classification

Convolutional Neural Network for Image Classification Convolutional Neural Network for Image Classification Chen Wang Johns Hopkins University Baltimore, MD 21218, USA cwang107@jhu.edu Yang Xi Johns Hopkins University Baltimore, MD 21218, USA yxi5@jhu.edu

More information

Midterm Examination CS540-2: Introduction to Artificial Intelligence

Midterm Examination CS540-2: Introduction to Artificial Intelligence Midterm Examination CS540-2: Introduction to Artificial Intelligence March 15, 2018 LAST NAME: FIRST NAME: Problem Score Max Score 1 12 2 13 3 9 4 11 5 8 6 13 7 9 8 16 9 9 Total 100 Question 1. [12] Search

More information

Climate Precipitation Prediction by Neural Network

Climate Precipitation Prediction by Neural Network Journal of Mathematics and System Science 5 (205) 207-23 doi: 0.7265/259-529/205.05.005 D DAVID PUBLISHING Juliana Aparecida Anochi, Haroldo Fraga de Campos Velho 2. Applied Computing Graduate Program,

More information

Package PUlasso. April 7, 2018

Package PUlasso. April 7, 2018 Type Package Package PUlasso April 7, 2018 Title High-Dimensional Variable Selection with Presence-Only Data Version 3.1 Date 2018-4-4 Efficient algorithm for solving PU (Positive and Unlabelled) problem

More information

Deep Learning Basic Lecture - Complex Systems & Artificial Intelligence 2017/18 (VO) Asan Agibetov, PhD.

Deep Learning Basic Lecture - Complex Systems & Artificial Intelligence 2017/18 (VO) Asan Agibetov, PhD. Deep Learning 861.061 Basic Lecture - Complex Systems & Artificial Intelligence 2017/18 (VO) Asan Agibetov, PhD asan.agibetov@meduniwien.ac.at Medical University of Vienna Center for Medical Statistics,

More information

Neural Network Weight Selection Using Genetic Algorithms

Neural Network Weight Selection Using Genetic Algorithms Neural Network Weight Selection Using Genetic Algorithms David Montana presented by: Carl Fink, Hongyi Chen, Jack Cheng, Xinglong Li, Bruce Lin, Chongjie Zhang April 12, 2005 1 Neural Networks Neural networks

More information

Fast Learning for Big Data Using Dynamic Function

Fast Learning for Big Data Using Dynamic Function IOP Conference Series: Materials Science and Engineering PAPER OPEN ACCESS Fast Learning for Big Data Using Dynamic Function To cite this article: T Alwajeeh et al 2017 IOP Conf. Ser.: Mater. Sci. Eng.

More information

Supervised Learning (contd) Linear Separation. Mausam (based on slides by UW-AI faculty)

Supervised Learning (contd) Linear Separation. Mausam (based on slides by UW-AI faculty) Supervised Learning (contd) Linear Separation Mausam (based on slides by UW-AI faculty) Images as Vectors Binary handwritten characters Treat an image as a highdimensional vector (e.g., by reading pixel

More information

Neural Networks: A Classroom Approach Satish Kumar Department of Physics & Computer Science Dayalbagh Educational Institute (Deemed University)

Neural Networks: A Classroom Approach Satish Kumar Department of Physics & Computer Science Dayalbagh Educational Institute (Deemed University) Chapter 6 Supervised Learning II: Backpropagation and Beyond Neural Networks: A Classroom Approach Satish Kumar Department of Physics & Computer Science Dayalbagh Educational Institute (Deemed University)

More information

CSC 578 Neural Networks and Deep Learning

CSC 578 Neural Networks and Deep Learning CSC 578 Neural Networks and Deep Learning Fall 2018/19 7. Recurrent Neural Networks (Some figures adapted from NNDL book) 1 Recurrent Neural Networks 1. Recurrent Neural Networks (RNNs) 2. RNN Training

More information

Deep Learning with Tensorflow AlexNet

Deep Learning with Tensorflow   AlexNet Machine Learning and Computer Vision Group Deep Learning with Tensorflow http://cvml.ist.ac.at/courses/dlwt_w17/ AlexNet Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton, "Imagenet classification

More information

MULTILAYER PERCEPTRON WITH ADAPTIVE ACTIVATION FUNCTIONS CHINMAY RANE. Presented to the Faculty of Graduate School of

MULTILAYER PERCEPTRON WITH ADAPTIVE ACTIVATION FUNCTIONS CHINMAY RANE. Presented to the Faculty of Graduate School of MULTILAYER PERCEPTRON WITH ADAPTIVE ACTIVATION FUNCTIONS By CHINMAY RANE Presented to the Faculty of Graduate School of The University of Texas at Arlington in Partial Fulfillment of the Requirements for

More information

Neural Networks (Overview) Prof. Richard Zanibbi

Neural Networks (Overview) Prof. Richard Zanibbi Neural Networks (Overview) Prof. Richard Zanibbi Inspired by Biology Introduction But as used in pattern recognition research, have little relation with real neural systems (studied in neurology and neuroscience)

More information

Package longclust. March 18, 2018

Package longclust. March 18, 2018 Package longclust March 18, 2018 Type Package Title Model-Based Clustering and Classification for Longitudinal Data Version 1.2.2 Date 2018-03-18 Author Paul D. McNicholas [aut, cre], K. Raju Jampani [aut]

More information

A Systematic Overview of Data Mining Algorithms

A Systematic Overview of Data Mining Algorithms A Systematic Overview of Data Mining Algorithms 1 Data Mining Algorithm A well-defined procedure that takes data as input and produces output as models or patterns well-defined: precisely encoded as a

More information

Frameworks in Python for Numeric Computation / ML

Frameworks in Python for Numeric Computation / ML Frameworks in Python for Numeric Computation / ML Why use a framework? Why not use the built-in data structures? Why not write our own matrix multiplication function? Frameworks are needed not only because

More information

Package GADAG. April 11, 2017

Package GADAG. April 11, 2017 Type Package Package GADAG April 11, 2017 Title A Genetic Algorithm for Learning Directed Acyclic Graphs Version 0.99.0 Date 2017-04-07 Author Magali Champion, Victor Picheny and Matthieu Vignes Maintainer

More information

Lecture : Training a neural net part I Initialization, activations, normalizations and other practical details Anne Solberg February 28, 2018

Lecture : Training a neural net part I Initialization, activations, normalizations and other practical details Anne Solberg February 28, 2018 INF 5860 Machine learning for image classification Lecture : Training a neural net part I Initialization, activations, normalizations and other practical details Anne Solberg February 28, 2018 Reading

More information

PARALLEL TRAINING OF NEURAL NETWORKS FOR SPEECH RECOGNITION

PARALLEL TRAINING OF NEURAL NETWORKS FOR SPEECH RECOGNITION PARALLEL TRAINING OF NEURAL NETWORKS FOR SPEECH RECOGNITION Stanislav Kontár Speech@FIT, Dept. of Computer Graphics and Multimedia, FIT, BUT, Brno, Czech Republic E-mail: xkonta00@stud.fit.vutbr.cz In

More information

Back Propagation and Other Differentiation Algorithms. Sargur N. Srihari

Back Propagation and Other Differentiation Algorithms. Sargur N. Srihari Back Propagation and Other Differentiation Algorithms Sargur N. srihari@cedar.buffalo.edu 1 Topics (Deep Feedforward Networks) Overview 1. Example: Learning XOR 2. Gradient-Based Learning 3. Hidden Units

More information

Simulation of Zhang Suen Algorithm using Feed- Forward Neural Networks

Simulation of Zhang Suen Algorithm using Feed- Forward Neural Networks Simulation of Zhang Suen Algorithm using Feed- Forward Neural Networks Ritika Luthra Research Scholar Chandigarh University Gulshan Goyal Associate Professor Chandigarh University ABSTRACT Image Skeletonization

More information

Lecture : Neural net: initialization, activations, normalizations and other practical details Anne Solberg March 10, 2017

Lecture : Neural net: initialization, activations, normalizations and other practical details Anne Solberg March 10, 2017 INF 5860 Machine learning for image classification Lecture : Neural net: initialization, activations, normalizations and other practical details Anne Solberg March 0, 207 Mandatory exercise Available tonight,

More information

Neural Networks (pp )

Neural Networks (pp ) Notation: Means pencil-and-paper QUIZ Means coding QUIZ Neural Networks (pp. 106-121) The first artificial neural network (ANN) was the (single-layer) perceptron, a simplified model of a biological neuron.

More information

Neural Network and Deep Learning. Donglin Zeng, Department of Biostatistics, University of North Carolina

Neural Network and Deep Learning. Donglin Zeng, Department of Biostatistics, University of North Carolina Neural Network and Deep Learning Early history of deep learning Deep learning dates back to 1940s: known as cybernetics in the 1940s-60s, connectionism in the 1980s-90s, and under the current name starting

More information

Package CatEncoders. March 8, 2017

Package CatEncoders. March 8, 2017 Type Package Title Encoders for Categorical Variables Version 0.1.1 Author nl zhang Package CatEncoders Maintainer nl zhang March 8, 2017 Contains some commonly used categorical

More information

11/14/2010 Intelligent Systems and Soft Computing 1

11/14/2010 Intelligent Systems and Soft Computing 1 Lecture 7 Artificial neural networks: Supervised learning Introduction, or how the brain works The neuron as a simple computing element The perceptron Multilayer neural networks Accelerated learning in

More information

Adaptive Regularization. in Neural Network Filters

Adaptive Regularization. in Neural Network Filters Adaptive Regularization in Neural Network Filters Course 0455 Advanced Digital Signal Processing May 3 rd, 00 Fares El-Azm Michael Vinther d97058 s97397 Introduction The bulk of theoretical results and

More information

Index. Umberto Michelucci 2018 U. Michelucci, Applied Deep Learning,

Index. Umberto Michelucci 2018 U. Michelucci, Applied Deep Learning, A Acquisition function, 298, 301 Adam optimizer, 175 178 Anaconda navigator conda command, 3 Create button, 5 download and install, 1 installing packages, 8 Jupyter Notebook, 11 13 left navigation pane,

More information

CPSC 340: Machine Learning and Data Mining. Deep Learning Fall 2016

CPSC 340: Machine Learning and Data Mining. Deep Learning Fall 2016 CPSC 340: Machine Learning and Data Mining Deep Learning Fall 2016 Assignment 5: Due Friday. Assignment 6: Due next Friday. Final: Admin December 12 (8:30am HEBB 100) Covers Assignments 1-6. Final from

More information

Time Series prediction with Feed-Forward Neural Networks -A Beginners Guide and Tutorial for Neuroph. Laura E. Carter-Greaves

Time Series prediction with Feed-Forward Neural Networks -A Beginners Guide and Tutorial for Neuroph. Laura E. Carter-Greaves http://neuroph.sourceforge.net 1 Introduction Time Series prediction with Feed-Forward Neural Networks -A Beginners Guide and Tutorial for Neuroph Laura E. Carter-Greaves Neural networks have been applied

More information