Home > Archive > Matlab > March 2006 > Neural Network
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi
I have two input vectors the first one with values 0.950 -0.955 and
the second one with values 0.400 - 7990.
I am just not sure if I am defining this properly is it
net=newff([0.9500 0.9550 ; 0.400
0. 7990],[3,1],{'tansig','logsig'},'trainsc
g');
or something else ?
Also how does one figure out how many hidden nodes to use.
I would appreciate any assistance.
Regards,
Des
| |
| vijitnair@gmail.com 2006-03-30, 7:08 pm |
| The syntax looks fine.
PR is a "number of input vectors x 2" matrix and that is what you have
done.
I assume you have only one output vector.
You could look at the network parameters[color=darkred]
and change them[color=darkred]
and then do[color=darkred]
before you train the network.
I do not know if there is a method to determine the correct number of
hidden nodes to be used. However, this is a tradeoff between
overtraining the system (lot of hidden nodes) and undertraining the
system (lot less hidden nodes).
As a practice, I look at the performance of my network using cross
validation with different number of nodes. And choose choose the number
that seem to give decent performance on both train/test data sets.
| |
| vijitnair@gmail.com 2006-03-30, 7:08 pm |
| >> net
and change them TO WHATEVER SUITS YOUR DATA BEST[color=darkred]
| |
|
| Thanks for that.
Apologies for my ignorance but am I right in saying that
0.9500-0.9550 is 1 input vector and 0.400-0.7990 is the second input
vector because when
I read the matlab notes on backpropogation fundementals 5-7, I
think I could intrept the syntax below as saying that there is one
input vector with two elements
net=newff([0.9500 0.9550 ; 0.400
0. 7990],[3,1],{'tansig','logsig'},'trainsc
g');
I find this a bit confusing.
I am not sure whether I have 2 Input vectors or 1 input vector with 2
elements.
Essentially waht I want is 2 input values producing 1 target output
value
If you have any suggestions please I would welcome them.
Regards,
Des
vijitnair@gmail.com wrote:
>
>
> The syntax looks fine.
> PR is a "number of input vectors x 2" matrix and that is what you
> have
> done.
> I assume you have only one output vector.
>
> You could look at the network parameters
> and change them
>
> and then do
> before you train the network.
>
> I do not know if there is a method to determine the correct number
> of
> hidden nodes to be used. However, this is a tradeoff between
> overtraining the system (lot of hidden nodes) and undertraining the
> system (lot less hidden nodes).
>
> As a practice, I look at the performance of my network using cross
> validation with different number of nodes. And choose choose the
> number
> that seem to give decent performance on both train/test data sets.
>
>
| |
| Greg Heath 2006-03-31, 10:03 pm |
|
djm wrote:
> Thanks for that.
>
> Apologies for my ignorance but am I right in saying that
> 0.9500-0.9550 is 1 input vector and 0.400-0.7990 is the second input
> vector
No.
> because when
> I read the matlab notes on backpropogation fundementals 5-7, I
> think I could intrept the syntax below as saying that there is one
> input vector with two elements
Yes
> net=newff([0.9500 0.9550 ; 0.400
> 0. 7990],[3,1],{'tansig','logsig'},'trainsc
g');
>
> I find this a bit confusing.
> I am not sure whether I have 2 Input vectors or 1 input vector with 2
> elements.
>
> Essentially waht I want is 2 input values producing 1 target output
> value
>
> If you have any suggestions please I would welcome them.
Use PRESTD to standardize your inputs. then use
net = newff(minmax(p),[H 1],{'tansig' 'purelin'},'trainscg').
If your output for training and test data will always be
restricted to the interval [0,1] then replace PURELIN
with LOGSIG.
Go to Google Groups and search using
greg-heath pretraining advice
Hope this helps.
Greg
[color=darkred]
> vijitnair@gmail.com wrote:
|
|
|
|
|