Neural Network Time-Series Utilities

There are other utility functions that are useful when manipulating neural network data, which can consist of time sequences, concurrent batches or combinations of both. It can also include multiple signals (as in multiple input, output or target vectors). The following diagram illustrates the structure of a general neural network data object. For this example there are three time steps of a batch of four samples (four sequences) of two signals. One signal has two elements, and the other signal has three elements.

The following table lists some of the more useful toolbox utility functions for neural network data. They allow you to do things like add, subtract, multiply, divide, etc. (Addition and subtraction of cell arrays do not have standard definitions, but for neural network data these operations are well defined and are implemented in the following functions.)

FunctionOperation

gadd

Add neural network (nn) data.

gdivide

Divide nn data.

getelements

Select indicated elements from nn data.

getsamples

Select indicated samples from nn data.

getsignals

Select indicated signals from nn data.

gettimesteps

Select indicated time steps from nn data.

gmultiply

Multiply nn data.

gnegate

Take the negative of nn data.

gsubtract

Subtract nn data.

nndata

Create an nn data object of specified size, where values are assigned randomly or to a constant.

nnsize

Return number of elements, samples, time steps and signals in an nn data object.

numelements

Return the number of elements in nn data.

numsamples

Return the number of samples in nn data.

numsignals

Return the number of signals in nn data.

numtimesteps

Return the number of time steps in nn data.

setelements

Set specified elements of nn data.

setsamples

Set specified samples of nn data.

setsignals

Set specified signals of nn data.

settimesteps

Set specified time steps of nn data.

There are also some useful plotting and analysis functions for dynamic networks that are listed in the following table. There are examples of using these functions in the Getting Started with Deep Learning Toolbox.

Function

Operation

ploterrcorr

Plot the autocorrelation function of the error.

plotinerrcorr

Plot the crosscorrelation between the error and the input.

plotresponse

Plot network output and target versus time.