<?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: k-fold cross-validation with stepwise regression_R Squares for training and validation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/243397#M48033</link>
    <description>&lt;P&gt;The column "RSquare K-Fold" was added to the History report for additional perspective when considering the candidate models. The other columns are the same as without this stopping rule. That is, they are result of fitting all the rows. You can observe the change in the R square overall and for the hold-out data look for signs of over-fitting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know of a way to obtain the R square for the model fit with only the training sets in the Stepwise platform.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The plot that you refer to plots the R square value from the RSquare column. You can see that if you add a reference line to the vertical axis for the maximum R square value in the History.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-01-28 at 6.03.22 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21373i6A2E7A722D3E28B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-01-28 at 6.03.22 PM.png" alt="Screen Shot 2020-01-28 at 6.03.22 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They are the same.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2020 23:05:51 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2020-01-28T23:05:51Z</dc:date>
    <item>
      <title>k-fold cross-validation with stepwise regression_R Squares for training and validation</title>
      <link>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/243217#M48000</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Hi, I have a problem when doing k-fold cross-validation with stepwise regression: I want to run the k-fold cross-validation with stepwise regression for 100 times using same dataset and save the R squares for both the training and the validation sets. The results table of JMP include two columns, “RSquare” and “RSquare K-Fold”. Although I can get different “RSquare K-Fold”, it seems that every time the “RSquares” are the same. That means maybe the “RSquare” is not the R square for the training set and the “RSquare K-Fold” is not the R square for the validation set.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; So, how could I get the two values (i.e., R squares for the training and the validation set)? How could I change my script to get these values?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I found that in the option of the "Plot R square history" we can get a graph of the R squares of the training and validation sets. Then how can I get the value? It seems that it only gives a graph (see the Figure).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="values of validation and training.png" style="width: 725px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21364i3BED8B5530E547F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="values of validation and training.png" alt="values of validation and training.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;names default to here(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt=Current Data Table();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dtb=New Table( "K-Fold Results",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Rows( 0 ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New Column( "StringColBox",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Character,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Nominal"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For( i = 1, i &amp;lt;= 100, i++,&lt;/P&gt;&lt;P&gt;obj = dt &amp;lt;&amp;lt; Fit Model(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Y( :Std FP ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Effects(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std wl,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std on,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std hfn,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std odc,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std cvq,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Std son,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :lNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :wNo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Personality( Stepwise),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; invisible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;obj &amp;lt;&amp;lt; Name( "K-Fold Crossvalidation" )(10);&lt;/P&gt;&lt;P&gt;obj &amp;lt;&amp;lt; Finish;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kfold = obj &amp;lt;&amp;lt; report;&lt;/P&gt;&lt;P&gt;tablebox = kfold[Table Box( 3 )];&lt;/P&gt;&lt;P&gt;dt1=tablebox &amp;lt;&amp;lt;make into data table();&lt;/P&gt;&lt;P&gt;dt1&amp;lt;&amp;lt;set name("K-Fold Results "||char(i));&lt;/P&gt;&lt;P&gt;dt1&amp;lt;&amp;lt;new column("Iteration",formula(i));&lt;/P&gt;&lt;P&gt;dtb &amp;lt;&amp;lt; Concatenate( dt1, "Append to first table" );&lt;/P&gt;&lt;P&gt;close(dt1, nosave);&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 16:06:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/243217#M48000</guid>
      <dc:creator>Adele</dc:creator>
      <dc:date>2020-01-28T16:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: k-fold cross-validation with stepwise regression_R Squares for training and validation</title>
      <link>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/243397#M48033</link>
      <description>&lt;P&gt;The column "RSquare K-Fold" was added to the History report for additional perspective when considering the candidate models. The other columns are the same as without this stopping rule. That is, they are result of fitting all the rows. You can observe the change in the R square overall and for the hold-out data look for signs of over-fitting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know of a way to obtain the R square for the model fit with only the training sets in the Stepwise platform.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The plot that you refer to plots the R square value from the RSquare column. You can see that if you add a reference line to the vertical axis for the maximum R square value in the History.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-01-28 at 6.03.22 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21373i6A2E7A722D3E28B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-01-28 at 6.03.22 PM.png" alt="Screen Shot 2020-01-28 at 6.03.22 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They are the same.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 23:05:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/243397#M48033</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-01-28T23:05:51Z</dc:date>
    </item>
    <item>
      <title>Instructions on manually performing Cross-Validation</title>
      <link>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/351676#M60116</link>
      <description>&lt;P&gt;Where could I find instructions on performing Cross-validation without using JMP Pro?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am stumbling through what seems like an arduous process and it seems that this community has much more clever and experienced folks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 22:59:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/k-fold-cross-validation-with-stepwise-regression-R-Squares-for/m-p/351676#M60116</guid>
      <dc:creator>AM007</dc:creator>
      <dc:date>2021-01-21T22:59:13Z</dc:date>
    </item>
  </channel>
</rss>

