|
7.6.2 Larger Example
In this example, a function with two outputs is approximated.
Read in the Neural Networks package.
In[1]:=
Generate data and look at the two outputs.
In[2]:=

An RBF network containing four neurons is chosen. You can modify the structure and repeat the example. You can also change it to an FF network.
Initialize an RBF network.
In[9]:=
Out[9]=
Different algorithms will be compared with respect to execution time and efficiency; that is, their RMSE rate of decrease. The Levenberg-Marquardt algorithm is tested first using the separable algorithm.
Train 15 iterations and find the time used.
In[10]:=

Out[11]=
Consider now the case where the separable algorithm is not used.
Train 15 iterations and find the time used.
In[12]:=

Out[13]=
Compare the obtained fit illustrated in the previous two plots. Normally, the separable algorithm is more efficient, showing a larger rate of error decrease per iteration using approximately the same time.
You can repeat the example with the other training algorithms, such as Gauss-Newton and s steepest descent, by changing the option Method.
|