From: Oz on
Hi!


I'm designing a neural network and my code is as follows:

---------------------------------------------------------------------------------------------
input=csvread('input.txt');
target=csvread('output.txt');

net=newff(minmax(input),[8,15,1],{'tansig','tansig','purelin'},'trainlm');
-----------------------------------------------------------------------------------------------

The program gets input and target matrices from input.txt and output.txt files. I'm trying to train this network.
My problem is if the 1st input's value is 2 then 6th input's value doesn't matter and the target value is independent of 6th input's value. So I don't want to create training set for every possible input for 6th input when the 1st iput is 2. How can I achieve this?

Is there a way to train a network with an empty or "doesn't matter" input?


Thanks.
From: neil on
"Oz " <ozgun_yilmaz(a)ttmail.com> wrote in message <i34r2k$cuf$1(a)fred.mathworks.com>...
> Hi!
>
>
> I'm designing a neural network and my code is as follows:
>
> ---------------------------------------------------------------------------------------------
> input=csvread('input.txt');
> target=csvread('output.txt');
>
> net=newff(minmax(input),[8,15,1],{'tansig','tansig','purelin'},'trainlm');
> -----------------------------------------------------------------------------------------------
>
> The program gets input and target matrices from input.txt and output.txt files. I'm trying to train this network.
> My problem is if the 1st input's value is 2 then 6th input's value doesn't matter and the target value is independent of 6th input's value. So I don't want to create training set for every possible input for 6th input when the 1st iput is 2. How can I achieve this?
>
> Is there a way to train a network with an empty or "doesn't matter" input?
>
>
> Thanks.

Have you tired training with the dataset as you have it? If the dataset if large enough the network should be able to be trained to take these effects into account.
If the training does not prove to be suitable consider pre-wieghting the input data set. i.e. when the 1st value is true make the 6th value either large or 0.
From: Greg Heath on
On Aug 1, 6:05 pm, "Oz " <ozgun_yil...(a)ttmail.com> wrote:
> Hi!
>
> I'm designing a neural network and my code is as follows:
>
> ---------------------------------------------------------------------------­------------------
> input=csvread('input.txt');
> target=csvread('output.txt');
>
> net=newff(minmax(input),[8,15,1],{'tansig','tansig','purelin'},'trainlm');
> ---------------------------------------------------------------------------­--------------------
>
> The program gets input and target matrices from input.txt and output.txt files. I'm trying to train this network.
> My problem is if the 1st input's value is 2 then 6th input's value doesn't matter and the target value is independent of 6th input's value. So I don't want to create training set for every possible input for 6th input when the 1st iput is 2. How can I achieve this?
>
> Is there a way to train a network with an empty or "doesn't matter" input?
>
> Thanks.

How large is your data set?
Why are you using two hidden layers?...one should suffice.
How did you determine the size of the hidden layers?

Please identify the output and 8 inputs.

Until I can consider this important information,
why don't you just run the program as is to see
if the results make sense.

Meanwhile, please provide the missing information.

Hope this helps.

Greg