| Neural Network Toolbox | ![]() |
Syntax
Description
net = newlind creates a new network with a dialog box.
newlind(P,T,Pi) takes these input arguments,
P -- R x Q matrix of Q input vectors
T -- S x Q matrix of Q target class vectors
and returns a linear layer designed to output T (with minimum sum square error) given input P.
newlind(P,T,Pi) can also solve for linear networks with input delays and multiple inputs and layers by supplying input and target data in cell array form:
P -- NixTS cell array, each element P{i,ts} is an Ri x Q input matrix
T -- NtxTS cell array, each element P{i,ts} is an Vi x Q matrix
Pi -- NixID cell array, each element Pi{i,k} is an Ri x Q matrix, default = []
returns a linear network with ID input delays, Ni network inputs, Nl layers, and designed to output T (with minimum sum square error) given input P.
Examples
We would like a linear layer that outputs T given P for the following definitions.
Here we use newlind to design such a network and check its response.
We would like another linear layer that outputs the sequence T given the sequence P and two initial input delay states Pi.
P = {1 2 1 3 3 2};Pi = {1 3};T = {5.0 6.1 4.0 6.0 6.9 8.0};net = newlind(P,T,Pi);Y = sim(net,P,Pi)
We would like a linear network with two outputs Y1 and Y2 that generate sequences T1 and T2, given the sequences P1 and P2 with three initial input delay states Pi1 for input 1, and three initial delays states Pi2 for input 2.
P1 = {1 2 1 3 3 2}; Pi1 = {1 3 0}; P2 = {1 2 1 1 2 1}; Pi2 = {2 1 2}; T1 = {5.0 6.1 4.0 6.0 6.9 8.0}; T2 = {11.0 12.1 10.1 10.9 13.0 13.0}; net = newlind([P1; P2],[T1; T2],[Pi1; Pi2]); Y = sim(net,[P1; P2],[Pi1; Pi2]); Y1 = Y(1,:) Y2 = Y(2,:)
Algorithm
newlind calculates weight W and bias B values for a linear layer from inputs P and targets T by solving this linear equation in the least squares sense:
See Also
| newlin | newlvq | ![]() |
© 1994-2005 The MathWorks, Inc.