Neural Network Toolbox™ Previous page   Next Page 
newlin
 Provide feedback about this page

Create linear layer

Syntax

net = newlin(P,T,ID,LR)

Description

Linear layers are often used as adaptive filters for signal processing and prediction.

newlin(P,S,ID,LR) takes these arguments,

P
RxQ matrix of sample R-element input vectors
S
Number of elements in the output vector
ID
Input delay vector (default = [0])
LR
Learning rate (default = 0.01)

and returns a new linear layer.

net = newlin(P,T,ID,P) takes an alternate argument,

T
S x Q2 matrix of Q2 sample SN-element input vectors

and returns a linear layer with the maximum stable learning rate for learning with inputs P.

Examples

This code creates a single-input (range of [-1 1]) linear layer with one neuron, input delays of 0 and 1, and a learning rate of 0.01. It is simulated for an input sequence P1.

Targets T1 are defined, and the layer adapts to them. (Because this is the first call to adapt, the default input delay conditions are used.)

The linear layer continues to adapt for a new sequence, using the previous final conditions PF as initial conditions.

Initialize the layer's weights and biases to new values.

Train the newly initialized layer on the entire sequence for 200 epochs to an error goal of 0.1.

Algorithm

Linear layers consist of a single layer with the dotprod weight function, netsum net input function, and purelin transfer function.

The layer has a weight from the input and a bias.

Weights and biases are initialized with initzero.

Adaption and training are done with trains and trainb, which both update weight and bias values with learnwh. Performance is measured with mse.

See Also

newlind, sim, init, adapt, train, trains, trainb


 Provide feedback about this page 

Previous page newhop newlind Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS