<?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: Cross validation autotuning and separate test set in Model Studio in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/796044#M9076</link>
    <description>&lt;DIV class=""&gt;&lt;SPAN class=""&gt;I am on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;V.03.04, so I guess I have to wait until my environment is updated to version 3.5 then. Or is there another workaround for version 3.4?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 14 Feb 2022 13:49:52 GMT</pubDate>
    <dc:creator>DvdM</dc:creator>
    <dc:date>2022-02-14T13:49:52Z</dc:date>
    <item>
      <title>Cross validation autotuning and separate test set in Model Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795486#M9067</link>
      <description>&lt;P&gt;How can I partition my dataset in a training and test set, where the training set can be used for k-fold cross validation for hyperparameter tuning in Model Studio?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use cross validation to find the optimal hyperparameters for my gradient boosting model, but I also want a separate test set to evaluate the model's performance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the documentation for the autotuning validation method it says that&lt;SPAN&gt;&amp;nbsp;"if your data is partitioned, then that partition is used and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Validation method&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Validation data proportion&lt;/SPAN&gt;&lt;SPAN&gt;, and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Cross validation number of folds&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;are all ignored". However, if I do not create a partition variable in the project settings, it seems that the model will also be scored on the training data, thereby resulting in a AUC of 1. How can I holdout a separate&amp;nbsp;test set, but still apply cross validation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance!&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 14:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795486#M9067</guid>
      <dc:creator>DvdM</dc:creator>
      <dc:date>2022-02-10T14:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cross validation autotuning and separate test set in Model Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795754#M9069</link>
      <description>&lt;P&gt;Actually that doc isn't completely correct.&amp;nbsp; If you only create training and test partitions (set the validation percentage to 0), then if you select K-fold cross validation for the Validation method, it will actually use that. So give that a try, and hope that helps!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 19:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795754#M9069</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2022-02-11T19:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cross validation autotuning and separate test set in Model Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795840#M9070</link>
      <description>&lt;P&gt;Thank you for your reply! I tried this on data with only a train and test partition, but noticed that the application of cross-validation does not show up in the autotuning part of the training code. See below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;partition rolevar='_PartInd_'n (TRAIN='1' TEST='2');
autotune useparameters=CUSTOM tuningparameters=(
lasso(LB=0 UB=10 INIT=0)
learningrate(LB=0.01 UB=1 INIT=0.1)
ntrees(LB=20 UB=150 INIT=100)
ridge(LB=0 UB=10 INIT=1)
samplingrate(LB=0.1 UB=1 INIT=0.5)
vars_to_try(LB=1 UB=100 INIT=100)
)
searchmethod=GA objective=AUC maxtime=3600
maxevals=50 maxiters=5 popsize=10
targetevent='1'
;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With data that is not partitioned, the cross validation does appear in the training code with the number of folds:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  autotune useparameters=CUSTOM tuningparameters=(
     lasso(LB=0 UB=10 INIT=0)
     learningrate(LB=0.01 UB=1 INIT=0.1)
     ntrees(LB=20 UB=150 INIT=100)
     ridge(LB=0 UB=10 INIT=1)
     samplingrate(LB=0.1 UB=1 INIT=0.5)
     vars_to_try(LB=1 UB=100 INIT=100)
     )
     kfold=5
     searchmethod=GA objective=AUC maxtime=3600
     maxevals=50 maxiters=5 popsize=10
     targetevent='1'
  ;&lt;/PRE&gt;&lt;P&gt;Does it still work, even though it isn't mentioned in the training code? Or does it mean that cross validation is still not applied if I only have a train and test partition?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Feb 2022 14:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/795840#M9070</guid>
      <dc:creator>DvdM</dc:creator>
      <dc:date>2022-02-12T14:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cross validation autotuning and separate test set in Model Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/796041#M9075</link>
      <description>&lt;P&gt;Do you know what version of SAS Viya you are on?&amp;nbsp; It should be working in Viya 3.5 and on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/796041#M9075</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2022-02-14T13:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cross validation autotuning and separate test set in Model Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/796044#M9076</link>
      <description>&lt;DIV class=""&gt;&lt;SPAN class=""&gt;I am on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;V.03.04, so I guess I have to wait until my environment is updated to version 3.5 then. Or is there another workaround for version 3.4?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Cross-validation-autotuning-and-separate-test-set-in-Model/m-p/796044#M9076</guid>
      <dc:creator>DvdM</dc:creator>
      <dc:date>2022-02-14T13:49:52Z</dc:date>
    </item>
  </channel>
</rss>

