<?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: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849028#M102485</link>
    <description>&lt;P&gt;There are different ways you could do this.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Instead of using Select Randomly, you could use Subset and have it create an 80% random sample.&amp;nbsp; Then run your Fit Model and save the subsetted table.&lt;/LI&gt;
&lt;LI&gt;Alternatively, after running your script, then subset the table based on your Excluded column and then save the subsetted table that is produced&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Fri, 21 Mar 2025 14:34:28 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2025-03-21T14:34:28Z</dc:date>
    <item>
      <title>need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848968#M102473</link>
      <description>&lt;P&gt;Hi - I am trying to fit a regression equation using a random 80% of data and, using the resulting modeled equation, run the remaining 20% of data through the model and save the observed versus modeled results of those 20%.&amp;nbsp; That is, the 20% of rows are used for validation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My dataset has 227 rows.&amp;nbsp; I want to train (i.e. develop a regression equation) using 80% of those after which that regression equation would be run on the remaining 20% of rows to compute observed vs modeled for those 20% of rows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My script is not working properly - it excludes 20% of rows correctly but then runs all 100% of rows and saves those.&amp;nbsp; &amp;nbsp;I show the code below but have removed the portion that computes various metrics about observed vs modeled results.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be most appreciated!&amp;nbsp; &amp;nbsp;(I'm using jmp pro 17.0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("C:\Users\trcampbell\Desktop\MASTER ECOLI\2025\2024.xlsx");
 
Random_rows = dt &amp;lt;&amp;lt; Select Randomly(0.2) &amp;lt;&amp;lt; Hide and Exclude();
 
New Column("Excluded", Numeric, ordinal);
 
:Excluded &amp;lt;&amp;lt; Set Formula(If(Excluded(), 1, 0));
dt &amp;lt;&amp;lt; Sort(By(:Excluded), Replace Table, Order(Descending), Copy formula(0));
 
/////////////......LOG ECOLI VS LOG TURB....LINEAR FIT....../////////////////////
 
obj = Fit Model(
	Y(:LOGECOLI),
	Effects(:LOGTURB),
	Personality("Standard Least Squares"),
	Emphasis("Effect Leverage"),
	Run(:LOGECOLI)
);
    
obj &amp;lt;&amp;lt; Prediction Formula;
     
ref = obj &amp;lt;&amp;lt; 
 
dt &amp;lt;&amp;lt; save(
	"C:\Users\trcampbell\Desktop\MASTER ECOLI\2025\validation results\test xxxxx1 with 126 and 886.xls"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:31:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848968#M102473</guid>
      <dc:creator>learning_JSL</dc:creator>
      <dc:date>2025-03-21T13:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848981#M102474</link>
      <description>&lt;P&gt;As you have JMP Pro I would consider using Validation Column&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1742563935845.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/74067iE92595C15FBCAFCF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1742563935845.png" alt="jthi_0-1742563935845.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:33:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848981#M102474</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-21T13:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848982#M102475</link>
      <description>&lt;P&gt;You are using JMP Pro. Are you aware of the built-in support for model selection using training, validation, and test hold-out sets?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:35:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/848982#M102475</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2025-03-21T13:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849009#M102480</link>
      <description>&lt;P&gt;I ran your JSL on JMP 17, using the Semiconductor Capability sample data table.&amp;nbsp; The script selected 291 rows of the 1455 total number of rows.&amp;nbsp; The 291 selected rows were hidden and excluded.&lt;/P&gt;
&lt;P&gt;It then ran the Fit Model, and the results of the fit model were based upon only the non excluded rows.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1742565545213.png" style="width: 421px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/74069i8A622A3E89EBD4AF/image-dimensions/421x139?v=v2" width="421" height="139" role="button" title="txnelson_0-1742565545213.png" alt="txnelson_0-1742565545213.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The saved prediction formula does calculate the predicted values for all rows.&amp;nbsp; It does not discriminate based on selected/excluded vs. non selected/excluded rows.&lt;/P&gt;
&lt;P&gt;This may be the source of the issue you are seeing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 14:02:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849009#M102480</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-03-21T14:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849017#M102484</link>
      <description>&lt;P&gt;Thank you, Jim.&amp;nbsp; Is there a way to revise the script to save only the 20% (validation set) of rows?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 14:26:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849017#M102484</guid>
      <dc:creator>learning_JSL</dc:creator>
      <dc:date>2025-03-21T14:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849028#M102485</link>
      <description>&lt;P&gt;There are different ways you could do this.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Instead of using Select Randomly, you could use Subset and have it create an 80% random sample.&amp;nbsp; Then run your Fit Model and save the subsetted table.&lt;/LI&gt;
&lt;LI&gt;Alternatively, after running your script, then subset the table based on your Excluded column and then save the subsetted table that is produced&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 21 Mar 2025 14:34:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849028#M102485</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-03-21T14:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849094#M102494</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I just used this code below in the line just before I save the file.&amp;nbsp; I assume this is correct (that is, it still utilizes the formula that was obtained from the 80% of training rows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dt&amp;lt;&amp;lt; Delete Rows(dt &amp;lt;&amp;lt; get rows Where( :Excluded == 0 ));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dt&amp;lt;&amp;lt; Save("C:\\Users\\trcampbell\\Desktop\\MASTER ECOLI\\2025\\validation results\\excluded rows.xlsx");&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 15:56:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849094#M102494</guid>
      <dc:creator>learning_JSL</dc:creator>
      <dc:date>2025-03-21T15:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849137#M102504</link>
      <description>&lt;P&gt;Thank you jthi!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:31:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849137#M102504</guid>
      <dc:creator>learning_JSL</dc:creator>
      <dc:date>2025-03-21T18:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: need jsl script help - trying to remove random rows for model validation testing and use the remainder of rows for model creation</title>
      <link>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849138#M102505</link>
      <description>&lt;P&gt;Yes, thanks very much.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:32:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/need-jsl-script-help-trying-to-remove-random-rows-for-model/m-p/849138#M102505</guid>
      <dc:creator>learning_JSL</dc:creator>
      <dc:date>2025-03-21T18:32:46Z</dc:date>
    </item>
  </channel>
</rss>

