<?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: PROC FOREST - Directly Converting outmodel= dataset to analytic store dataset in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807654#M9158</link>
    <description>&lt;P&gt;Hi! I think what you're looking for might be the "dtreeExportModel" action in the decisionTree action set. This can take models created using the outmodel option and convert them to the type that you'd see from the savestate statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not 100% sure of your setup, but try something like this:&lt;BR /&gt;&lt;BR /&gt;proc cas;&lt;/P&gt;
&lt;P&gt;action decisionTree.dtreeExportModel / table = {name="RF_Model_V1"}, casout = {name="name_of_model_astore", replace=1}, vote="PROB";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put the "replace=1" there so that it will overwrite previous tables if they have the same name (use carefully). I also put vote="PROB", which is the default voting method for PROC FOREST. You will want to specify to ensure that the scoring method matches what you expect - probability voting amongst the trees in the forest as opposed to majority voting amongst the trees in the forest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps, and feel free to reach out if you have any additional questions!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 17:55:44 GMT</pubDate>
    <dc:creator>RalphAbbey</dc:creator>
    <dc:date>2022-04-13T17:55:44Z</dc:date>
    <item>
      <title>PROC FOREST - Directly Converting outmodel= dataset to analytic store dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807629#M9157</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I fit a random forest model using the PROC FOREST procedure, and permanently saved the dataset (casuser.RF_Model_V1) using the outmodel = statement in my sample code below. I am able to score other datasets using the saved outmodel dataset (casuser.RF_Model_V1) using the inmodel= statement in PROC FOREST. however, I am not able to create model interpretation stats (i.e. partial dependence plots) using the&amp;nbsp;&lt;SPAN&gt;explainModel.partialDependence action set&lt;/SPAN&gt;&amp;nbsp;with that same dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc forest data=casuser.training_data outmodel=casuser.RF_Model_V1;&lt;BR /&gt;input var1 var2 var3 var4 / level = interval;&lt;BR /&gt;target Target_var / level = nominal;&lt;BR /&gt;output out=casuser.score_at_runtime;&lt;BR /&gt;ods output FitStatistics=fitstats;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation states that in order to get the model interpretation statistics from the explainmodel action set, I would need to call an analytic store (astore) dataset that would have been created using the 'savestate rstore= dataset' statement in PROC FOREST. When I fitted the initial model, I did not create and save the astore dataset. Is there a way to directly convert the saved model from the outmodel= statement to an astore dataset?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 15:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807629#M9157</guid>
      <dc:creator>GuyTreepwood</dc:creator>
      <dc:date>2022-04-13T15:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FOREST - Directly Converting outmodel= dataset to analytic store dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807654#M9158</link>
      <description>&lt;P&gt;Hi! I think what you're looking for might be the "dtreeExportModel" action in the decisionTree action set. This can take models created using the outmodel option and convert them to the type that you'd see from the savestate statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not 100% sure of your setup, but try something like this:&lt;BR /&gt;&lt;BR /&gt;proc cas;&lt;/P&gt;
&lt;P&gt;action decisionTree.dtreeExportModel / table = {name="RF_Model_V1"}, casout = {name="name_of_model_astore", replace=1}, vote="PROB";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put the "replace=1" there so that it will overwrite previous tables if they have the same name (use carefully). I also put vote="PROB", which is the default voting method for PROC FOREST. You will want to specify to ensure that the scoring method matches what you expect - probability voting amongst the trees in the forest as opposed to majority voting amongst the trees in the forest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps, and feel free to reach out if you have any additional questions!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 17:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807654#M9158</guid>
      <dc:creator>RalphAbbey</dc:creator>
      <dc:date>2022-04-13T17:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FOREST - Directly Converting outmodel= dataset to analytic store dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807725#M9159</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solution was mostly correct, and I had to make one slight change...the 'table' statement should actually be 'modelTable'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc cas;&lt;/P&gt;&lt;P&gt;action decisionTree.dtreeExportModel / modelTable = {name="RF_Model_V1"}, casout = {name="name_of_model_astore", replace=1}, vote="PROB";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 07:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807725#M9159</guid>
      <dc:creator>GuyTreepwood</dc:creator>
      <dc:date>2022-04-14T07:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FOREST - Directly Converting outmodel= dataset to analytic store dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807806#M9160</link>
      <description>&lt;P&gt;That's what I get for not fully checking the doc! Thanks for the correction!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 13:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/PROC-FOREST-Directly-Converting-outmodel-dataset-to-analytic/m-p/807806#M9160</guid>
      <dc:creator>RalphAbbey</dc:creator>
      <dc:date>2022-04-14T13:21:27Z</dc:date>
    </item>
  </channel>
</rss>

