<?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: Question about how to use fit object for prediction in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725531#M91004</link>
    <description>&lt;P&gt;Hi - thanks a lot for providing the example script. Could you explain how I can modify if my column name in the other table is different? Also, could you please clarify how the JSL will change if I have Formula Depot? Thanks again!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 02:48:25 GMT</pubDate>
    <dc:creator>shrirams</dc:creator>
    <dc:date>2024-02-27T02:48:25Z</dc:date>
    <item>
      <title>Question about how to use fit object for prediction in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725452#M90997</link>
      <description>&lt;P&gt;Hi - I have 2 columns X and Y. I am using the Neural platform to fit Y with X, because it is quite non-linear. Now, I want to use the fitted model to predict Y for a given X. How do I accomplish this in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj = dt &amp;lt;&amp;lt; Neural(
Y( :Vg&amp;nbsp;),
X( :Id ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After I have done the fit, I need to use this fit object to predict Y for certain values of X in another table. But, I am not sure how I can write JSL for that. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:33:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725452#M90997</guid>
      <dc:creator>shrirams</dc:creator>
      <dc:date>2024-02-26T19:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to use fit object for prediction in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725460#M91000</link>
      <description>&lt;P&gt;From the neural platform you can save the formula to your table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1708977045434.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/61500i7F3324F25E445B5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1708977045434.png" alt="jthi_0-1708977045434.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and move it (or all of them, depending on your model) to other table if both have similarly named columns. Below is one example script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

nn = dt &amp;lt;&amp;lt; Neural(
	Y(:sex),
	X(:height, :weight),
	Informative Missing(0),
	Validation Method("Holdback", 0.3333),
	Fit(NTanH(3))
);

cur_cols = dt &amp;lt;&amp;lt; Get Column Names("String");
nn &amp;lt;&amp;lt; (Fit[1] &amp;lt;&amp;lt; Save Profile Formulas);
new_cols = dt &amp;lt;&amp;lt; Get Column Names("String");

Remove From(new_cols, 1, N Items(cur_cols));

dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");

For Each({colname}, new_cols,
	colscript = Column(dt, colname) &amp;lt;&amp;lt; get script;
	Eval(EvalExpr(
		Send(dt2, Expr(colscript));
	));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have JMP Pro you can also use Formula Depot which makes this maybe a bit easier.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 20:12:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725460#M91000</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-26T20:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to use fit object for prediction in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725531#M91004</link>
      <description>&lt;P&gt;Hi - thanks a lot for providing the example script. Could you explain how I can modify if my column name in the other table is different? Also, could you please clarify how the JSL will change if I have Formula Depot? Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 02:48:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Question-about-how-to-use-fit-object-for-prediction-in-JSL/m-p/725531#M91004</guid>
      <dc:creator>shrirams</dc:creator>
      <dc:date>2024-02-27T02:48:25Z</dc:date>
    </item>
  </channel>
</rss>

