Happy New Year.
Luckily, your data set is large enough to partition between a test set and a training set. That allows you to train your model and then gauge its predictive power on a new set of data, which, when you think about it is the whole point of any modeling technique.
help(nnet)
will give you the function signature and the outputs. The example at the bottom will show you one technique to divide the data into training and test sets.
When I was learning R
I was constantly muttering to myself that help
needed a help page. Well, it does
help(help)
But the key to really understanding what you see as a result of help(nnet)
is something you learned before college: f(x) = y or f(a,b,c,d) = y. That's right, functions. Although R
has some procedural programming features like those that dominate C, C++, Java, Python, etc.., such as for
loops, the majority of the time you are using R
, it's a matter of understanding which arguments to a function are mandatory, what types of arguments are optional and the classes of each. And then understanding what the function returns.
Take a careful read of help(nnet)
. It has a ton of available arguments, but I doubt that your professor intends students to use them all.
Next, look at the section Values
. You will learn that when you invoke nnet(arguments)
you get back (surprise!) an nnet object
. So, for example,
my_net <- nnet(my_arguments)
str(my_net)
will show you what's included.
As to your basic question my (again) semi-informed guess is that it is minimizing residuals, optimizing the value of fitting criterion plus weight decay term and checking whether the maximum number of iterations was reached.
To help more, and to draw others into the conversation, a reproducible example, called a reprex would be extremely useful.