"Ahmed Abdullah" <firstname.lastname@example.org> wrote in message <email@example.com>... > I know how to give one input (multidimensional) - > > P=[1 2 32 2 ; > 2 3 4 5] ; % 4 training sample each inputs have 2 element > > T=[1 4 2 3] ; % corresponding output for 4 sample
[I N ] = size(P) % [ 2 4 ] [ O N ] = size(T) % [ 1 4 ] Ntrn = N -2*round(0.15*N) % 2
%==>Default data division: 2 training examples, 1 validation and 1 test
Ntrneq = Ntrn*O % only 2 training equations
This will cause the net to have H=10 (the default) hidden nodes. The number of unknown weights is
Nw = (I+1)*H+(H+1)*O % 30+11=41
You have 2 equations to solve for 41 variables.
Obviously, this is a ridiculous example.
Delete. Train will automatically configure an empty net.
net = train(net,P,T);
Y = net(P);
E = T-Y;
MSE = mse(E)
NMSE = MSE/var(T,1) % Normalized MSE desired to be << 1
> So you see i know how to give 1 input (multidimensional). But I don't know how to give two? you see . I just want to know the format of input Matrix or Cell
Although you used a ridiculous example and an incorrect training syntax, you've asked an excellent question.
net.numinputs = 2;
creates a net with 2 inputs. Each can have a different dimensionality. Typically they would be connected to different hidden layers (e.g. 2 in parallel and both hidden layers connected to an output layer). See the documentation section on custom networks for details.
My problem is I can construct the network but I don't know how to tell train that there are 2 inputs.