<?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 How to get results for each data partition (train, validation, test) in PROC GRADBOOST? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-get-results-for-each-data-partition-train-validation-test/m-p/964989#M11039</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have a cas table mycas.dataset with columns x1, x2, x3, x4, y, _partind_ such that x1-x4 are numerical predictors, y is a categorical (0, 1) target and _partind_ tags each row to one sample (1 for training, 0 for validation, 2 for testing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to autotune a set of hyperparameters of PROC GRADBOOST (learningrate, maxdepth,&amp;nbsp;vars_to_try) and get the most amount of modeling information (gini, instantiated models, ods tables, etc.) for each partition (_partind_).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After executing the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc gradboost data=mycas.dataset seed=123;
partition role=_partind_(train="1" validate="0" test="2");&lt;BR /&gt;input x1 x2 x3 x4 / level=interval;&lt;BR /&gt;target y / level=nominal;&lt;BR /&gt;autotune&lt;BR /&gt;   historytable=mycas.historytable&lt;BR /&gt;   targetevent="1"&lt;BR /&gt;   objective=gini&lt;BR /&gt;   searchmethod=grid&lt;BR /&gt;   useparameters=custom&lt;BR /&gt;   tuningparameters=(&lt;BR /&gt;      learningrate(values=0.01 0.1 0.5 init=0.01)&lt;BR /&gt;      maxdepth(values=3 5 7 init=3)&lt;BR /&gt;   )
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a cas table mycas.historytable with columns evaluation, iteration, LEARNINGRATE, MAXLEVEL, GiniCoefficient, EvalType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are&lt;/P&gt;&lt;P&gt;1. Is there any documentation about the mapping between the selected hyperparameters and the names these will be given in the mycas.historytable table? I mean I can guess that LEARNINGRATE, MAXLEVEL map to learningrate, maxdepth respectively by inspecting the input values; however, I've noticed SAS sometimes returns names and sometimes descriptions. Consider the ods table ModelInfo; here the mapping is not that explicit.&lt;/P&gt;&lt;P&gt;2. Is the column above GiniCoefficient computed on the training, validation, testing o whole dataset?&lt;/P&gt;&lt;P&gt;3. How can I add a GiniCoefficient_training, GiniCoefficient_validation, GiniCoefficient_testing to the mycas.historytable table?&lt;/P&gt;&lt;P&gt;4. How can I save all the models that were trained with each configuration of hyperparameters?&lt;/P&gt;&lt;P&gt;5. If I add the following statements&lt;/P&gt;&lt;PRE&gt;output out=mycas.dataset_scored;&lt;BR /&gt;ods output some_ods_table=mycas.some_ods_table;&lt;/PRE&gt;&lt;P&gt;inside the PROC GRADBOOST, how do I know what evaluation (evaluation column in mycas.historytable) is being referred to? Is it the one with the max GiniCoefficient? Can I save the output and ods output that correspond to each hyperparameter configuration?&lt;/P&gt;&lt;P&gt;6. In the&amp;nbsp;EvalType column in mycas.historytable, I've seen at least two possible values: EVALUATED and LOOKED_UP. What does each of these mean?&lt;/P&gt;&lt;P&gt;7. Once I get the "best" set of hyperparameters (say learningrate=0.5, maxdepth=3) and I modify the code above as follows&lt;/P&gt;&lt;PRE&gt;proc gradboost data=mycas.dataset seed=123 learningrate=0.5 maxdepth=3;
partition role=_partind_(train="1" validate="0" test="2");
input x1 x2 x3 x4 / level=interval;
target y / level=nominal
run;&lt;/PRE&gt;&lt;P&gt;Will this code give me the exact same result as the code with AUTOTUNE with the configuration learningrate=0.5 maxdepth=3? How can I get gini from this proc alone without needing another proc (for example, proc assess)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2025 20:37:22 GMT</pubDate>
    <dc:creator>WilliamMunoz</dc:creator>
    <dc:date>2025-04-23T20:37:22Z</dc:date>
    <item>
      <title>How to get results for each data partition (train, validation, test) in PROC GRADBOOST?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-get-results-for-each-data-partition-train-validation-test/m-p/964989#M11039</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have a cas table mycas.dataset with columns x1, x2, x3, x4, y, _partind_ such that x1-x4 are numerical predictors, y is a categorical (0, 1) target and _partind_ tags each row to one sample (1 for training, 0 for validation, 2 for testing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to autotune a set of hyperparameters of PROC GRADBOOST (learningrate, maxdepth,&amp;nbsp;vars_to_try) and get the most amount of modeling information (gini, instantiated models, ods tables, etc.) for each partition (_partind_).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After executing the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc gradboost data=mycas.dataset seed=123;
partition role=_partind_(train="1" validate="0" test="2");&lt;BR /&gt;input x1 x2 x3 x4 / level=interval;&lt;BR /&gt;target y / level=nominal;&lt;BR /&gt;autotune&lt;BR /&gt;   historytable=mycas.historytable&lt;BR /&gt;   targetevent="1"&lt;BR /&gt;   objective=gini&lt;BR /&gt;   searchmethod=grid&lt;BR /&gt;   useparameters=custom&lt;BR /&gt;   tuningparameters=(&lt;BR /&gt;      learningrate(values=0.01 0.1 0.5 init=0.01)&lt;BR /&gt;      maxdepth(values=3 5 7 init=3)&lt;BR /&gt;   )
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a cas table mycas.historytable with columns evaluation, iteration, LEARNINGRATE, MAXLEVEL, GiniCoefficient, EvalType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are&lt;/P&gt;&lt;P&gt;1. Is there any documentation about the mapping between the selected hyperparameters and the names these will be given in the mycas.historytable table? I mean I can guess that LEARNINGRATE, MAXLEVEL map to learningrate, maxdepth respectively by inspecting the input values; however, I've noticed SAS sometimes returns names and sometimes descriptions. Consider the ods table ModelInfo; here the mapping is not that explicit.&lt;/P&gt;&lt;P&gt;2. Is the column above GiniCoefficient computed on the training, validation, testing o whole dataset?&lt;/P&gt;&lt;P&gt;3. How can I add a GiniCoefficient_training, GiniCoefficient_validation, GiniCoefficient_testing to the mycas.historytable table?&lt;/P&gt;&lt;P&gt;4. How can I save all the models that were trained with each configuration of hyperparameters?&lt;/P&gt;&lt;P&gt;5. If I add the following statements&lt;/P&gt;&lt;PRE&gt;output out=mycas.dataset_scored;&lt;BR /&gt;ods output some_ods_table=mycas.some_ods_table;&lt;/PRE&gt;&lt;P&gt;inside the PROC GRADBOOST, how do I know what evaluation (evaluation column in mycas.historytable) is being referred to? Is it the one with the max GiniCoefficient? Can I save the output and ods output that correspond to each hyperparameter configuration?&lt;/P&gt;&lt;P&gt;6. In the&amp;nbsp;EvalType column in mycas.historytable, I've seen at least two possible values: EVALUATED and LOOKED_UP. What does each of these mean?&lt;/P&gt;&lt;P&gt;7. Once I get the "best" set of hyperparameters (say learningrate=0.5, maxdepth=3) and I modify the code above as follows&lt;/P&gt;&lt;PRE&gt;proc gradboost data=mycas.dataset seed=123 learningrate=0.5 maxdepth=3;
partition role=_partind_(train="1" validate="0" test="2");
input x1 x2 x3 x4 / level=interval;
target y / level=nominal
run;&lt;/PRE&gt;&lt;P&gt;Will this code give me the exact same result as the code with AUTOTUNE with the configuration learningrate=0.5 maxdepth=3? How can I get gini from this proc alone without needing another proc (for example, proc assess)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 20:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-get-results-for-each-data-partition-train-validation-test/m-p/964989#M11039</guid>
      <dc:creator>WilliamMunoz</dc:creator>
      <dc:date>2025-04-23T20:37:22Z</dc:date>
    </item>
  </channel>
</rss>

