<?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: optimize selection of categories for 2 variables in order to obtain best diagonal in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/optimize-selection-of-categories-for-2-variables-in-order-to/m-p/284634#M4222</link>
    <description>&lt;P&gt;Hi, Jay. I've been thinking about how to approach this problem. To find the optimal groupings there are many combinations to consider but you could try this simple (but nonexhaustive) approach:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a. Build a decision tree to predict B from A using maxbranches = 3 and maxdepth = 1. This will give you A' which has&amp;nbsp;grouped the 10 original categories into 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b. Now predict A' from B, agaiin using maxbranches =3 and maxdepth = 1. This gives you B', with three ordered categories.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Examine the 3 by 3 crosstabulation between A' and B'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the code for mapping A to A' and B to B' from the Decision Tree node in Enterprise Miner and apply the code using as SAS Code node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't give you a satisfactory solution, try posting&amp;nbsp;your question&amp;nbsp;to the SAS&amp;nbsp;“Mathematical Optimization, Discrete-event Simulation, and OR” community. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ray&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 19:06:52 GMT</pubDate>
    <dc:creator>rayIII</dc:creator>
    <dc:date>2016-07-14T19:06:52Z</dc:date>
    <item>
      <title>optimize selection of categories for 2 variables in order to obtain best diagonal</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/optimize-selection-of-categories-for-2-variables-in-order-to/m-p/282179#M4195</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I have the following problem that I need to solve.&lt;/P&gt;&lt;P&gt;Let's suppose I have 2 variables (A and B) with 10&amp;nbsp;categories (ordinal most commonly) each containing nA1,...nA10,nb1,...nb10 clients each. I want to regroup these 10&amp;nbsp;categories&amp;nbsp;into 3 categories called 1A, 1B and 1C (and for B:2A, 2B and 2C)&amp;nbsp;and create a new variable lets say NEW_A and NEW_B.&lt;/P&gt;&lt;P&gt;Now, the problem is to tell SAS to optimize the selection of these new subcategories of A in order to maximize the diagonal of NEW_A and NEW_B, so the selection of -let's suppose 1A- NEW_A will bring the most clients of 2A, 1B of 2B...etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the selection need to be recursive. That's all I could figure so far and the key is to maximize number of clients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2016 15:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/optimize-selection-of-categories-for-2-variables-in-order-to/m-p/282179#M4195</guid>
      <dc:creator>frozenSea</dc:creator>
      <dc:date>2016-07-05T15:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: optimize selection of categories for 2 variables in order to obtain best diagonal</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/optimize-selection-of-categories-for-2-variables-in-order-to/m-p/284634#M4222</link>
      <description>&lt;P&gt;Hi, Jay. I've been thinking about how to approach this problem. To find the optimal groupings there are many combinations to consider but you could try this simple (but nonexhaustive) approach:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a. Build a decision tree to predict B from A using maxbranches = 3 and maxdepth = 1. This will give you A' which has&amp;nbsp;grouped the 10 original categories into 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b. Now predict A' from B, agaiin using maxbranches =3 and maxdepth = 1. This gives you B', with three ordered categories.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Examine the 3 by 3 crosstabulation between A' and B'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the code for mapping A to A' and B to B' from the Decision Tree node in Enterprise Miner and apply the code using as SAS Code node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't give you a satisfactory solution, try posting&amp;nbsp;your question&amp;nbsp;to the SAS&amp;nbsp;“Mathematical Optimization, Discrete-event Simulation, and OR” community. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ray&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 19:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/optimize-selection-of-categories-for-2-variables-in-order-to/m-p/284634#M4222</guid>
      <dc:creator>rayIII</dc:creator>
      <dc:date>2016-07-14T19:06:52Z</dc:date>
    </item>
  </channel>
</rss>

