|Issued: April 14, 1999
Due: April 21, 1999
Note: do either
gcc -o neural neural.c -lmand the resulting executable will be called
neural will train a neural network to
approximate the sine function, and plot a comparison of the
network output and the actual sine function values. The
program should automatically display a graph that looks like
The default values are for the network to have 10
HIDDEN nodes in one hidden layer, and to train
ITERATIONS. These parameters are
defined near the top of the code.
MAX_RAND, and replace every other occurrence of
HIDDENnodes is actually too many. Reduce the number of hidden nodes to try to determine the effect of having fewer nodes.
In particular, answer the following questions (10 points each).
HIDDENnodes, i.e. the smallest number that adequately approximates the function and does not require a very long time to train?
forloop so that several periods of the sine function are plotted to verify that the network only approximates the function well around the points on which it was trained.