<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS EM: is cluster node using K means? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841282#M10358</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When doing k-means clustering, one of the difficult questions is : &lt;BR /&gt;----&amp;gt; What to choose as the value of k (number of clusters)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That question is answered in the Enterprise Miner clustering node by using an &lt;EM&gt;&lt;STRONG&gt;intermediate&lt;/STRONG&gt;&lt;/EM&gt; hierarchical clustering step.&lt;/P&gt;
&lt;P&gt;For that (intermediate) hierarchical clustering step, the methods WARD and CENTROID are relevant.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[ ... Ward´s linkage is thus a method for hierarchical cluster analysis (nothing to do with k-means!!).&lt;BR /&gt;The idea has much in common with analysis of variance (ANOVA). The WARD linkage function specifying the distance between two clusters is computed as the increase in the "error sum of squares" (ESS) after fusing two clusters into a single cluster. ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the number of clusters is determined, WARD and CENTROID are no longer relevant.&lt;/P&gt;
&lt;P&gt;Because once k is set equal to 11 for example, an 11-means clustering is done using the k-means algorithm (with k=11).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARD is generally believed to be better than CENTROID, so go for WARD !&lt;/P&gt;
&lt;P&gt;Again, the cluster node works with k-means for the (preliminary and) final clustering and the WARD and CENTROID can only determine the number of clusters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;DIV id="ConnectiveDocSignExtentionInstalled" data-extension-version="1.0.4"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Fri, 28 Oct 2022 10:11:37 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2022-10-28T10:11:37Z</dc:date>
    <item>
      <title>SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/840816#M10349</link>
      <description>Wondering is cluster node in EM using K means algorithm? I know K means leverage the distance between centroids from two clusters. So shall I change clustering method to centroid to enable K means algorithm?</description>
      <pubDate>Wed, 26 Oct 2022 11:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/840816#M10349</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2022-10-26T11:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841220#M10352</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remember well, this is how the cluster node in Enterprise Miner works :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;k-means clustering is done to get k clusters (by default k=50, I believe). [It can also be another BIG number like 40 or 60.]&lt;/LI&gt;
&lt;LI&gt;Then with the k multivariate means / mean vectors of the clusters, an agglomerative hierarchical clustering is done (from k clusters to one cluster).&lt;/LI&gt;
&lt;LI&gt;By means of the CCC (Cubic Clustering Criterion) the "best" number of clusters is then selected. Let's say it is m (&amp;lt; k).&lt;/LI&gt;
&lt;LI&gt;Then m-means on all original observations is done to get the final clusters.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Procedures used are PROC FASTCLUS and PROC CLUSTER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS® Enterprise Miner™ 15.1: Reference Help&lt;BR /&gt;Cluster Node&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/emref/15.1/p042mbykzcvpoln1m14cycem6m4a.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/emref/15.1/p042mbykzcvpoln1m14cycem6m4a.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think there are also High-Performance nodes in Enterprise Miner 15.1 and 15.2. &lt;BR /&gt;The High-Performance nodes also have clustering.&lt;BR /&gt;Using the High-Performance clustering node, PROC HPCLUS is used.&lt;BR /&gt;That is k-means clustering only.&lt;BR /&gt;To estimate the number of clusters (NOC), NOC=ABC is specified in the PROC HPCLUS statement. &lt;BR /&gt;This option uses the aligned box criterion (ABC) method to find the "best" n° of clusters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 20:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841220#M10352</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-27T20:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841250#M10353</link>
      <description>&lt;P&gt;In Enterprise Miner, there is selection criteria, what is the differences between Ward and Centroid? Are they both using K-means algorithm? Centroid seems like K-means because K-means is based on calculating distance between centroid and other data points.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 04:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841250#M10353</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2022-10-28T04:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841259#M10354</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That property is for the PROC CLUSTER (agglomerative hierarchical clustering) part of the algorithm!&lt;/P&gt;
&lt;P&gt;See here :&lt;/P&gt;
&lt;P&gt;SAS/STAT® 15.2 User's Guide&lt;BR /&gt;The CLUSTER Procedure&lt;BR /&gt;Clustering Methods&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_cluster_details01.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/statug/15.2/statug_cluster_details01.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For k-means you do not have that choice (distances in k-means are always distances to the centroid).&lt;/P&gt;
&lt;P&gt;But k-means starts with k-clusters and ends with k clusters (the way of constituting the clusters is completely different than it is for hierarchical clustering).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 06:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841259#M10354</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-28T06:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841260#M10355</link>
      <description>&lt;P&gt;Okay. Are you suggesting that if I drag a cluster node into the diagram, it does not matter if I choose Ward or Centroid in the property panel on the left? Because I am able to choose Ward or Centroid if I select the cluster node (I don't think it is &lt;SPAN&gt;hierarchical clustering node&lt;/SPAN&gt;). Are you suggesting these two methods will give the same results?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 06:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841260#M10355</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2022-10-28T06:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841275#M10356</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ward and centroid method will probably not give the same end-result. Unless the derived number of clusters is the same when using both methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;remember my first reply :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First a PROC FASTCLUS is done with k=50 (or another BIG number).&lt;/LI&gt;
&lt;LI&gt;Then the 50 mean vectors are hierarchically clustered (PROC CLUSTER) using WARD or centroid method to guess the best n° of clusters. Let's say that is m (m &amp;lt;= k ).&lt;/LI&gt;
&lt;LI&gt;Then k-means on the original data is done again with PROC FASTCLUS and k = m.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Good luck with your analyses !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 08:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841275#M10356</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-28T08:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841276#M10357</link>
      <description>&lt;P&gt;Hi, I am not familiar with the SAS code. Thus, I don't know what the difference between&amp;nbsp;&lt;SPAN&gt;PROC FASTCLUS and&amp;nbsp;PROC CLUSTER is.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I use SAS EM. And I drag a Cluster node under the Explore tab to the diagram and connect the Cluster node to my data node. Then if I select the cluster node, in the property panel on the left, there is Ward, Centroid and other options under selecting criteria. My question is if I would like use K means, shall I pick Centroid as the selecting criteria? Because I don't think Ward is related to K means algorithm. Or do they both apply to K means algorithm?&lt;/P&gt;
&lt;P&gt;Sorry, my question was moved from new users forum to here. I am not sure if I can get help here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 08:50:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841276#M10357</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2022-10-28T08:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841282#M10358</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When doing k-means clustering, one of the difficult questions is : &lt;BR /&gt;----&amp;gt; What to choose as the value of k (number of clusters)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That question is answered in the Enterprise Miner clustering node by using an &lt;EM&gt;&lt;STRONG&gt;intermediate&lt;/STRONG&gt;&lt;/EM&gt; hierarchical clustering step.&lt;/P&gt;
&lt;P&gt;For that (intermediate) hierarchical clustering step, the methods WARD and CENTROID are relevant.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[ ... Ward´s linkage is thus a method for hierarchical cluster analysis (nothing to do with k-means!!).&lt;BR /&gt;The idea has much in common with analysis of variance (ANOVA). The WARD linkage function specifying the distance between two clusters is computed as the increase in the "error sum of squares" (ESS) after fusing two clusters into a single cluster. ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the number of clusters is determined, WARD and CENTROID are no longer relevant.&lt;/P&gt;
&lt;P&gt;Because once k is set equal to 11 for example, an 11-means clustering is done using the k-means algorithm (with k=11).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARD is generally believed to be better than CENTROID, so go for WARD !&lt;/P&gt;
&lt;P&gt;Again, the cluster node works with k-means for the (preliminary and) final clustering and the WARD and CENTROID can only determine the number of clusters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;DIV id="ConnectiveDocSignExtentionInstalled" data-extension-version="1.0.4"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Oct 2022 10:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841282#M10358</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-28T10:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841301#M10359</link>
      <description>&lt;P&gt;I see. This is super helpful. One more question, if I select centroid, how is optimal K selected?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 13:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841301#M10359</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2022-10-28T13:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EM: is cluster node using K means?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841456#M10360</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393358"&gt;@ycenycute&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is "optimal" k selected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose you have 100 000 observations in a 20-dimensional input space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First there's a k-means to cluster the 100 000 observations into 50 disjoint clusters.&lt;/P&gt;
&lt;P&gt;The 50 mean vectors (multivariate means) of these 50 disjoint clusters are then hierarchically clustered. From 50 to 1.&lt;/P&gt;
&lt;P&gt;The distance between clusters is calculated using the centroid method and the two clusters that are closest together (using centroid linking) are merged in such an agglomerative hierarchical clustering step. You start with 50 single-element clusters and you end up with 1.&lt;BR /&gt;Then using the CCC (Cubic Clustering Criterion) the "best" k is selected, because with &lt;EM&gt;k&lt;/EM&gt; clusters it is believed the solution is "optimal" (i.e. the most heterogeneity among the clusters and the most homogeneity within the clusters).&lt;/P&gt;
&lt;P&gt;Suppose k is selected to be 8.&lt;/P&gt;
&lt;P&gt;Then a new k-means clustering on the full&amp;nbsp;100 000 observations is done with k = 8 (to make 8 disjoint clusters).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In data mining the data sets are mostly too big to do only hierarchical clustering.&lt;BR /&gt;Doing hierarchical clustering on 100 000 observations may take a full day and lots of resources.&lt;/P&gt;
&lt;P&gt;That is because you start with 100 000 single element clusters and in each step you merge two clusters (to eventually reach one cluster containing all observations).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 14:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-EM-is-cluster-node-using-K-means/m-p/841456#M10360</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-29T14:27:02Z</dc:date>
    </item>
  </channel>
</rss>

