<?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: How to use the scoring code from gradient boosting? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263566#M3883</link>
    <description>&lt;P&gt;Just like with all data step score code from EM:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data /* name of data set containing scores */;
  set /* data that you want to score */;
  %inc "/app/sasdata/EBI_ADVANL/EM_Projects/churn/Workspaces/EMWS1/Boost/EMPUBLISHSCORE.sas " /* or paste in the score code */;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Apr 2016 15:46:41 GMT</pubDate>
    <dc:creator>WendyCzika</dc:creator>
    <dc:date>2016-04-13T15:46:41Z</dc:date>
    <item>
      <title>How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263498#M3881</link>
      <description>&lt;P&gt;I ran gradient boosting in EM and want to use the attached scoring code to the new dataset. How can I use it for scoring, as its written without setting a dataset and even some variables used are not present.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263498#M3881</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263504#M3882</link>
      <description>&lt;P&gt;You can't easily. How are you getting data in without a SET statement?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263504#M3882</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-13T13:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263566#M3883</link>
      <description>&lt;P&gt;Just like with all data step score code from EM:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data /* name of data set containing scores */;
  set /* data that you want to score */;
  %inc "/app/sasdata/EBI_ADVANL/EM_Projects/churn/Workspaces/EMWS1/Boost/EMPUBLISHSCORE.sas " /* or paste in the score code */;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Apr 2016 15:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263566#M3883</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2016-04-13T15:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263578#M3884</link>
      <description>&lt;P&gt;But my dataset, does not have some variables, which are there in code. I am not sure, how this code is generated.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 16:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263578#M3884</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263585#M3885</link>
      <description>&lt;P&gt;If you built a model that requires certain variables and you want to score with the same model you need those variables. If you don't have those variables, then either remove them and rebuild your model, OR change your model so it can handle missing values by including missing values for that variable in the training data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 16:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263585#M3885</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-13T16:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263586#M3886</link>
      <description>Well, my input dataset does not have some of these variables like those starting with "_". but they are in scoring code. So that is what I am confused about.</description>
      <pubDate>Wed, 13 Apr 2016 16:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263586#M3886</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T16:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263589#M3887</link>
      <description>&lt;P&gt;Did you build your model?&lt;/P&gt;
&lt;P&gt;In the process did you create any new variables? SAS may have automatically named them. SAS may also be creating automatic variables required in your model, for intermediate steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Your input dataset needs to match the structure of your training data set. Same variables, same names, same types and same levels for categorical data.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion would be to try and see what happens.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/14512"&gt;@WendyCzika﻿&lt;/a&gt;&amp;nbsp;has shown the correct way to score a new dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 16:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263589#M3887</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-13T16:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263594#M3888</link>
      <description>I had applied one oversampling step. But i think that should affect only the target variable and nothing new else</description>
      <pubDate>Wed, 13 Apr 2016 17:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263594#M3888</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T17:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263598#M3889</link>
      <description>&lt;P&gt;I'm guessing the _ variables that you mean, if they are not input variables, are created BY the scoring code - they don't need to be in the data you are scoring, so it should be fine.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263598#M3889</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2016-04-13T17:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263601#M3890</link>
      <description>If you look at top of the code, you notice:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;********** LEAF     1  NODE  2467 ***************;&lt;BR /&gt;IF _ARB_BADF_ EQ 0 THEN DO; &lt;BR /&gt;&lt;BR /&gt;will it not throw the error?</description>
      <pubDate>Wed, 13 Apr 2016 17:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263601#M3890</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T17:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263604#M3891</link>
      <description>&lt;P&gt;It's defined&amp;nbsp;above that:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;_ARB_BADF_ = 0;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263604#M3891</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2016-04-13T17:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263606#M3892</link>
      <description>Oh, I overlooked that. Seems like I am good to go then. Thanks!</description>
      <pubDate>Wed, 13 Apr 2016 17:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263606#M3892</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-04-13T17:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the scoring code from gradient boosting?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263820#M3904</link>
      <description>Hi, 

When we build EM flows, it actually writes out SAS code in the background behind each (most) node. When a model is built and scoring code is built, it typically retains all the analytically relevant pre-codes leading towards the final scoring equation. For example, if a variable transformation node is involved in the flow, all the transformations are automatically retained including all the renames, what-if... There is also a separate SAS Score Code Node that helps. 

One may ask: I transformed 800 variables + derived 1000 variables, but only used 12 in the final model. Does the scoring have all of them? No, the scoring code only contains what survives into the final model. If you see score code and optimized score code, make sure you pick the optimized one. Exception to that is: if you insert your custom code by using SAS Code node, they are not automatically copied over. Also this 'way' may not work for some methods like random forest. But I recall gradient boosting is fine. 

Over the years I have seen EM users going back to transformation node to pick up the code behind the scene, study and improve their SAS programming that way. Although conventions like _ appear a bit odd, coding there is 'best'. Enjoy. Jason Xin</description>
      <pubDate>Thu, 14 Apr 2016 11:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-use-the-scoring-code-from-gradient-boosting/m-p/263820#M3904</guid>
      <dc:creator>JasonXin</dc:creator>
      <dc:date>2016-04-14T11:43:33Z</dc:date>
    </item>
  </channel>
</rss>

