<?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: JSL - Repeats within a platform function in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/585171#M79084</link>
    <description>&lt;P&gt;Thanks, Jarmo, that was where I am looking for. Simple line, but hard to figure out for someone new to JSL!&lt;/P&gt;</description>
    <pubDate>Sat, 24 Dec 2022 11:28:20 GMT</pubDate>
    <dc:creator>Joost</dc:creator>
    <dc:date>2022-12-24T11:28:20Z</dc:date>
    <item>
      <title>JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583482#M78951</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create an Example data table
dt = currentdatatable();

// Get the names of the columns in the data table
colNames = dt &amp;lt;&amp;lt; get column group( "WLS" );

nIters = 2;

Neural(
	Y( :Type ),
	X(eval(colNames)),
	Validation Method( "KFold", 5 ),
	Set Random Seed( 2 ),
	for( k=1, k &amp;lt;= nIters, k++, Fit( NTanH ( 2 ) ) ),
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying to fit more than 1 neural model using attached script. If instead of the for-loop I write several times Fit( NTanH(2)) it works fine, but with a for-loop I cannot get it to work. Any suggestins? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:05:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583482#M78951</guid>
      <dc:creator>Joost</dc:creator>
      <dc:date>2023-06-09T16:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583498#M78952</link>
      <description>&lt;P&gt;You could move the Fit(NTanH()) outside the Neural(). Below is example from scripting index:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1671475604873.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48498i2378E95E5964DDB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1671475604873.png" alt="jthi_1-1671475604873.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Modified version from scripting index with for loop:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
obj = Neural(
	Y(:mvalue),
	X(:crim, :indus, :chas, :nox, :rooms, :age, :distance, :radial),
	Set Random Seed(2)
);

For(i = 1, i &amp;lt;= 2, i++,
	obj &amp;lt;&amp;lt; Fit(NTanH(4));	
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1671475587322.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48497iAF28116AD104A209/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1671475587322.png" alt="jthi_0-1671475587322.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 18:47:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583498#M78952</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-12-19T18:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583554#M78956</link>
      <description>&lt;P&gt;Hi Jarmo, that was an option that I did not try and it is a solution to my problem. Works fine. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 22:19:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/583554#M78956</guid>
      <dc:creator>Joost</dc:creator>
      <dc:date>2022-12-19T22:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/584754#M79061</link>
      <description>&lt;P&gt;Hi Jarmo, Below is a working script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
delete symbols();

dt = current data table();

colNames = dt &amp;lt;&amp;lt; get column group("WLs");
exclColnames = dt &amp;lt;&amp;lt;  get excluded columns();
For( i = 1, i &amp;lt;= N Items( exclColnames ), i++,
	Remove From( colNames, As List( Loc( colNames, exclColnames[i] ) ) )
);

rpt = New Window( "Neural of Type", dt &amp;lt;&amp;lt;
	Neural(
		Y( :Type ),
		X( eval ( colNames ) ),
		Informative Missing( 0 ),
		Validation Method( "KFold", 5 ),
		Set Random Seed( 2 ),
		Fit( NTanH( 2 ) ),
		Fit( NTanH( 2 ) ),
		Fit( NTanH( 2 ) )
	)
);
Wait( 0 );
rpt["Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )] &amp;lt;&amp;lt;
Make Combined Data Table;
rpt &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, I want to make the Fit( NTanH(2)) flexibe. The way you demonstrated does not work here, I tried to solve it by next script (leaving out the first part):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj =Neural(
		Y( :Type ),
		X( eval ( colNames ) ),
		Informative Missing( 0 ),
		Validation Method( "KFold", 5 ),
		Set Random Seed( 2 ),
);
for(i=1, i&amp;lt;=3, i++, obj &amp;lt;&amp;lt; Fit( NTanH(2)));

rpt = current window();&lt;BR /&gt;
Wait( 0 );
rpt["Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )] &amp;lt;&amp;lt;
Make Combined Data Table;
rpt &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But now I get the error message: "Cannot subscript Display Box in access or evaluation of 'rpt[ /*###*/"Neural",Outline Box(1),"Validation","Type",Table Box(1)]' , rpt[/*###*/"Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )]". I do not understand why I get this message, because the first script runs well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a solution for this problem and can you explain why I have this problem, in order to understand JSL a bit better. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 15:59:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/584754#M79061</guid>
      <dc:creator>Joost</dc:creator>
      <dc:date>2022-12-22T15:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/584790#M79063</link>
      <description>&lt;P&gt;The code isn't finding correct references, it could be that changing rpt = Current Window(); to rpt = Current Report() is enough, but I would strongly suggest using the reference you (can) have (in my example obj)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
obj = Neural(
	Y(:mvalue),
	X(:crim, :indus, :chas, :nox, :rooms, :age, :distance, :radial),
	Set Random Seed(2),
	&amp;lt;&amp;lt; Fit(NTanH(4)),
	&amp;lt;&amp;lt; Fit(NTanH(4)),
	&amp;lt;&amp;lt; Fit(NTanH(4))
);

For(i = 1, i &amp;lt;= 2, i++,
	obj &amp;lt;&amp;lt; Fit(NTanH(4));
);

Report(obj)[Outline Box("Neural")][Outline Box("Training")][Table Box(1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Dec 2022 17:13:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/584790#M79063</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-12-24T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Repeats within a platform function</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/585171#M79084</link>
      <description>&lt;P&gt;Thanks, Jarmo, that was where I am looking for. Simple line, but hard to figure out for someone new to JSL!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Dec 2022 11:28:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Repeats-within-a-platform-function/m-p/585171#M79084</guid>
      <dc:creator>Joost</dc:creator>
      <dc:date>2022-12-24T11:28:20Z</dc:date>
    </item>
  </channel>
</rss>

