I have run the following code:
However, the optimal model chosen is one with no hidden layers despite the fact that I set a lowerbound of 1 hidden layer:
Here are some of the individual evaluation of differing numbers of neurons/layers:
What could explain the fact that it trying models with zero layers, or zero neurons in some of the three layers. In the code, I have specifically inserted lower bounds which should stop this from happening? Could this be the result of a non-grid search algorithm?
Did the LOG show any messages other than run duration and number of observations used?
If so, you should share the LOG with the code and all the notes or messages. Best would be to copy the text from the log. Then on the forum open a text box using the </> icon above the message window an paste the text.
Also, since your code shows the procedure as one conditionally executed without the log we may be sure the shown code was actually what executed and not something else above what you have shared.
Code and log entries pasted as text in a text box allow us to copy/paste with suggestions or test code on dummy data (or real data if you use one of the SAS data sets in the SASHELP library to demonstrate behavior). Then suggestions can be provided as text back. If we have to retype from a picture the longer the code the less likely anyone will do such.
I don't have any experience with NNET so don't know what may be going on. I do know that many SAS procedures will attempt to get some usable result even when syntax/data aren't quite correct for a give situation and will indicate in the Log that some options may have been modified.
Did the LOG show any messages other than run duration and number of observations used?
If so, you should share the LOG with the code and all the notes or messages. Best would be to copy the text from the log. Then on the forum open a text box using the </> icon above the message window an paste the text.
Also, since your code shows the procedure as one conditionally executed without the log we may be sure the shown code was actually what executed and not something else above what you have shared.
Code and log entries pasted as text in a text box allow us to copy/paste with suggestions or test code on dummy data (or real data if you use one of the SAS data sets in the SASHELP library to demonstrate behavior). Then suggestions can be provided as text back. If we have to retype from a picture the longer the code the less likely anyone will do such.
I don't have any experience with NNET so don't know what may be going on. I do know that many SAS procedures will attempt to get some usable result even when syntax/data aren't quite correct for a give situation and will indicate in the Log that some options may have been modified.
Yes I had notes and so forth disabled. After turning them back on, i was made aware of the fact that my Lower bound on the number of hidden units =1 was inconsistent with the initial value (which I didn't set butit is default) of 0. Once I changed the initial value to 1, this stopped the algorithm evaluating models with no hidden layers. As for the fact that certain layers have 0 neurons despite a lower bound of 1 being set, I can only imagine that this might be due to an inconsistency between the lower bound of 1 on each layer for the number of neurons, and a lower bound of 1 (and upper bound of 3) on the number of hidden layers. There was no warning with regard to this second point, but clearly if you have model using a number of hidden layers only equal to the lower bound of one (out of a maximum of 3), that it implies that the other two layers have zero neurons, thereby getting around the lower-bound number of neurons on each layer of 1.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.