The code you found uses the MODECLUS procedure which (as you pointed out) is intended for numerical data. It also has the problem of not being able to scale to the size of typical data mining data sets. The Cluster node in SAS Enterprise Miner does allow for using categorical variables in creating a cluster solution and is capable of handling large scale data. Therefore, you might consider creating clusters with the Cluster node and then sampling from the segments it produces as desired to achieve a similar effect.
The challenge with including categorical variables in a cluster solution is that they are natural segmenting variables already -- having all their mass at a set of distinct points -- while the numerical variables are typically distributed across a much greater set of values which must then be grouped based on centroids. The resulting clusters, however, typically do not break cleanly based on the categorical variable levels and might produce a result that is more difficult to explain.
Hope this helps!
Doug
The code you found uses the MODECLUS procedure which (as you pointed out) is intended for numerical data. It also has the problem of not being able to scale to the size of typical data mining data sets. The Cluster node in SAS Enterprise Miner does allow for using categorical variables in creating a cluster solution and is capable of handling large scale data. Therefore, you might consider creating clusters with the Cluster node and then sampling from the segments it produces as desired to achieve a similar effect.
The challenge with including categorical variables in a cluster solution is that they are natural segmenting variables already -- having all their mass at a set of distinct points -- while the numerical variables are typically distributed across a much greater set of values which must then be grouped based on centroids. The resulting clusters, however, typically do not break cleanly based on the categorical variable levels and might produce a result that is more difficult to explain.
Hope this helps!
Doug
@DougWielenga wrote:The code you found uses the MODECLUS procedure which (as you pointed out) is intended for numerical data. It also has the problem of not being able to scale to the size of typical data mining data sets. The Cluster node in SAS Enterprise Miner does allow for using categorical variables in creating a cluster solution and is capable of handling large scale data. Therefore, you might consider creating clusters with the Cluster node and then sampling from the segments it produces as desired to achieve a similar effect.
Hey Doug,
Could you explain in more details how can we use the output of the cluster node to include it into SMOTE SAS code?
I think I don't understand the idea.
I found this article about the method that allows categorical variables but there is only pseudocode provided:
http://support.sas.com/resources/papers/proceedings15/3483-2015.pdf
Any ideas how it could be implemented using SAS code?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.