<?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 Apply rules from Proc cluster to the new distance dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Apply-rules-from-Proc-cluster-to-the-new-distance-dataset/m-p/412287#M21613</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to perform hierarchical clustering on a dataset that contains both numeric and categorical variables and then apply the obtained rules to a new dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;step 1: I create a&amp;nbsp;&lt;SPAN&gt;dgower&amp;nbsp;distance data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc distance data=ABT_hcluster method=dgower out=gower_distance;&lt;BR /&gt;var nominal(&amp;nbsp;categorical variables /std=std) interval(numeric variables) ;&lt;BR /&gt;id my_ids;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 2:&amp;nbsp;I perform hierarchical clustering&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc cluster data=gower_distance method=Ward outtree=Tree ccc pseudo PLOTS=ALL;&lt;BR /&gt;id my_ids;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 3: Draw dendrogram, place observation to 4 clusters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;axis1 order=(0 to 1 by 0.1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc tree data=Tree ncl=4 out=tree_out4 haxis=axis1;&lt;BR /&gt;height _rsq_;&lt;BR /&gt;id KVHX;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 4:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I need to apply rules of&amp;nbsp;dendrogram and place&amp;nbsp;new observations into clusters with the rules&amp;nbsp;found above. How do do it? I could not find any outmodel, code or rules statement for proc cluster.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 12:56:41 GMT</pubDate>
    <dc:creator>tomtsya</dc:creator>
    <dc:date>2017-11-10T12:56:41Z</dc:date>
    <item>
      <title>Apply rules from Proc cluster to the new distance dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Apply-rules-from-Proc-cluster-to-the-new-distance-dataset/m-p/412287#M21613</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to perform hierarchical clustering on a dataset that contains both numeric and categorical variables and then apply the obtained rules to a new dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;step 1: I create a&amp;nbsp;&lt;SPAN&gt;dgower&amp;nbsp;distance data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc distance data=ABT_hcluster method=dgower out=gower_distance;&lt;BR /&gt;var nominal(&amp;nbsp;categorical variables /std=std) interval(numeric variables) ;&lt;BR /&gt;id my_ids;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 2:&amp;nbsp;I perform hierarchical clustering&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc cluster data=gower_distance method=Ward outtree=Tree ccc pseudo PLOTS=ALL;&lt;BR /&gt;id my_ids;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 3: Draw dendrogram, place observation to 4 clusters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;axis1 order=(0 to 1 by 0.1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc tree data=Tree ncl=4 out=tree_out4 haxis=axis1;&lt;BR /&gt;height _rsq_;&lt;BR /&gt;id KVHX;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;step 4:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I need to apply rules of&amp;nbsp;dendrogram and place&amp;nbsp;new observations into clusters with the rules&amp;nbsp;found above. How do do it? I could not find any outmodel, code or rules statement for proc cluster.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 12:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Apply-rules-from-Proc-cluster-to-the-new-distance-dataset/m-p/412287#M21613</guid>
      <dc:creator>tomtsya</dc:creator>
      <dc:date>2017-11-10T12:56:41Z</dc:date>
    </item>
  </channel>
</rss>

