BookmarkSubscribeRSS Feed
fri0
Quartz | Level 8

 Hi, I've run a k-means clustering in Enterprise Miner, but I get a giant cluster with 99% of the registers.... Any idea to get clusters more equitable? Thanks!

7 REPLIES 7
rayIII
SAS Employee

The HP Cluster node by default uses the  Aligned Box Criterion method to pick the best K (number of clusters). But you can override this by choosing Number of Clusters: User Specify in node properties, then use the Segment Profiler node to characterize solutions with different Ks.

 

Also keep in mind that the HP Cluster node uses only interval inputs, ignoring any nominal/binary inputs. So, depending on your dataset, some of the information that could potentially help separate observations into clusters might be ignored. One way to deal with this is to binary-encode nominal inputs that you want to use in clustering.

 

Ray

 

 

 

fri0
Quartz | Level 8

Hi ryall! thanks for  your answers. I used the default options in Cluster node, the result it's a ward clustering with abouth 10 clusters and also it has a giant cluster... I used the CCC plot to identify a possible optimal number of cllusters, with the graph I identified between 4 or 5 clusters. That's why I used a 4 and 5 k-means clustering, but the result it's almost the same with one cluster taking almost all the registers. I only have 2 intervals variables: total amount and number of operations. Any other idea? I found that sometimes use replacement and filter node could help.

rayIII
SAS Employee

Hi. If you only have two clustering inputs, the first thing I would do is plot them as a scatterplot. Do you see distinct clusters in the 2 dimensions or is it basically one big blob? 

 

Ray

fri0
Quartz | Level 8

Yes, I ran a scatterplot and I could see about 3-4 groups, but, I just ran a density graph because I think the scatterplot could be a little tricky. The groups that I saw don't have son many observations as I thought... =(

Please, could you check the attached images and give me your opinion please?

 

 

Edit.PS. Do you know about Range standarization? When is a good idea to use it?


densitygraph.pngscatterplot.jpg
rayIII
SAS Employee

Hi.

 

K-means tends to work best with well-separated spherical (or in your case, circular) groups. I'm not seeing that in your plots.

 

It might help to know a bit more about how you plan to use the clusters. Are you trying to characterize a sample of observations? Derive an input for a predictive model? 

fri0
Quartz | Level 8
Nop, the objective is identify group of clients based in their money movement and number of operations. Using the replacement node, I could find 3 clusters... well at least is something jejejej
JasonXin
SAS Employee
Hi, One key aspect is the variables you list to cluster the records. How many continuous variables you have? How many categorical variables you have (you should somehow quantify them to be interval scale, right?)? Have you standardized variables? If you have concern you have too many variables to enter the Cluster node, you may consider variable clustering to 'select' variables. Generally speaking, more variables more likely you will break open big clusters. On the other hand, you need to order variables according to variable clustering. If you don't do that and just add more variables, either you find yourself having to add many variables to break up clusters, or the ending results, broken up albeit, are not meaningful. Hope this helps? Thanks for the questions. Jason Xin

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 7 replies
  • 1467 views
  • 3 likes
  • 3 in conversation