BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
William29
Obsidian | Level 7

I have run the following code:

 

 

William29_0-1727942143321.png

 

 

However, the optimal model chosen is one with no hidden layers despite the fact that I set a lowerbound of 1 hidden layer:

 

William29_1-1727942235964.png

Here are some of the individual evaluation of differing numbers of neurons/layers:

 

William29_2-1727942283590.png

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

 

View solution in original post

2 REPLIES 2
ballardw
Super User

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.

 

William29
Obsidian | Level 7

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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to choose a machine learning algorithm

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.

Discussion stats
  • 2 replies
  • 143 views
  • 0 likes
  • 2 in conversation