<?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 Script to save prediction formula of PLS in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529165#M75265</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm using a script to run PLS on my data, but I'm having a hard time getting it to save the prediction formula &amp;amp; values into a column in the data sheet.&amp;nbsp; Is this possible?&amp;nbsp; Here's what I'm using so far:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
&amp;lt;
P = Partial Least Squares(
	Y( :Viability ),
	X( :Name( "976" ), :Name( "778" ), :Name( "973" ), ),
	Validation Method( None, Initial Number of Factors( 15 ) ),
	Fit( Method( NIPALS ), Number of Factors( 15 ) ), 

);
P &amp;lt;&amp;lt; prediction formula;
&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:06:19 GMT</pubDate>
    <dc:creator>rummeln</dc:creator>
    <dc:date>2023-06-09T17:06:19Z</dc:date>
    <item>
      <title>Script to save prediction formula of PLS</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529165#M75265</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm using a script to run PLS on my data, but I'm having a hard time getting it to save the prediction formula &amp;amp; values into a column in the data sheet.&amp;nbsp; Is this possible?&amp;nbsp; Here's what I'm using so far:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
&amp;lt;
P = Partial Least Squares(
	Y( :Viability ),
	X( :Name( "976" ), :Name( "778" ), :Name( "973" ), ),
	Validation Method( None, Initial Number of Factors( 15 ) ),
	Fit( Method( NIPALS ), Number of Factors( 15 ) ), 

);
P &amp;lt;&amp;lt; prediction formula;
&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:06:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529165#M75265</guid>
      <dc:creator>rummeln</dc:creator>
      <dc:date>2023-06-09T17:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script to save prediction formula of PLS</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529197#M75267</link>
      <description>&lt;P&gt;Here is the example from the Scripting Index that shows how to Save Prediction Formula&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1659401558503.png" style="width: 789px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44474i34D4008507EAFA59/image-dimensions/789x351?v=v2" width="789" height="351" role="button" title="txnelson_0-1659401558503.png" alt="txnelson_0-1659401558503.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And here is an example using a slight modification to your code, and using the Semiconductor Capability sample data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt =
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

P = Partial Least Squares(
	Y( :PNP1 ),
	X( :Name( "NPN1" ), :Name( "NPN2" ), :Name( "NPN3" ), ),
	Validation Method( None, Initial Number of Factors( 15 ) ),
	Fit( Method( NIPALS ), Number of Factors( 15 ) ), 

);
P &amp;lt;&amp;lt; obj &amp;lt;&amp;lt; (Fit[1] &amp;lt;&amp;lt; Save Prediction Formula);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Aug 2022 00:54:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529197#M75267</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-02T00:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script to save prediction formula of PLS</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529220#M75268</link>
      <description>&lt;P&gt;Worked like a charm, thanks Jim!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 03:57:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/529220#M75268</guid>
      <dc:creator>rummeln</dc:creator>
      <dc:date>2022-08-02T03:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script to save prediction formula of PLS</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/559291#M77280</link>
      <description>&lt;P&gt;Is there a function to get the prediction formula from a fit as JSL code - without saving it to a column or using a Formula Depot?&lt;/P&gt;&lt;P&gt;Something more robust than&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myFit = dt &amp;lt;&amp;lt; Fit Model( Y( :height ), Effects( :age, :sex ), Run() );
FormulaExpr=Arg(Arg(myFit &amp;lt;&amp;lt; Get Prediction Formula,3))&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 09:29:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-save-prediction-formula-of-PLS/m-p/559291#M77280</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-10-23T09:29:42Z</dc:date>
    </item>
  </channel>
</rss>

