I used the "filter" node to exclude specific values from my data set, and this works great. I click on Class Variables, and then select the values I want to exclude.
In that same dialog box, there is a "keep missing values" option. I select "No". I then connect it to the "Decision Tree" Node. When I run that node, it does not use the values I excluded, but there is still a branch that has a label saying it used missing values. Example: ONe branch says "Female or Missing" for Gender. There isn't even missing values for Gender, and it says it used them, and I turned off the missings in the filter node.
Suggestions?
Even if you don't have any missing values in your training data, the Decision Tree node is going to include missing values in the rules it creates in case missing values are encountered when scoring new data. And you can specify how they should be handled with the Missing Values property of the Decision Tree node. Hope that clears up any confusion!
Hi,
One of the main advantages of decision tree algorithms is that they handle missing values.
If you still want to exclude missing values, you are doing it the right way.
The reason you see a label for "or missing" is that it is part of the algorithm to assign missings (if there were any) to a specific branch. In other words, your decision tree is just telling you what it would do if you use this model to score a new data set that has that variable missing.
A quick way to confirm that your filter did exclude missings: Select your decision tree node, click on the ellipsis for Imported Data, and browse or explore this partition to confirm that the observations with missings were excluded. Personally I would not exclude observations with missing values, but you can certainly do that if that is your preference.
Good luck!
-Miguel
Thanks, that is helpful.
Even if you don't have any missing values in your training data, the Decision Tree node is going to include missing values in the rules it creates in case missing values are encountered when scoring new data. And you can specify how they should be handled with the Missing Values property of the Decision Tree node. Hope that clears up any confusion!
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 16. Read more here about why you should contribute and what is in it for you!
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.