<?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: Accessing Outline Box NIPALS Fit in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287406#M55478</link>
    <description>&lt;P&gt;You could use xpath to search all outline boxes by name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pls report &amp;lt;&amp;lt; XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = Open( "$Sample_data/iris.jmp" );

pls = Partial Least Squares(
	Y( :Petal width ),
	X( :Sepal length, :Sepal width, :Petal length ),
	Validation Method( KFold( 7 ), Initial Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 2 ) )
);

//get all matching outline boxes:
ob = pls &amp;lt;&amp;lt; XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");

//Reference the first match:
ob[1] &amp;lt;&amp;lt; Prepend ( Spacer Box( size( 800, 5 ), color( "red" ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Aug 2020 14:44:43 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2020-08-24T14:44:43Z</dc:date>
    <item>
      <title>Accessing Outline Box NIPALS Fit in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287393#M55475</link>
      <description>&lt;P&gt;I want to dynamically access the fit part of the PLS report ("NIPALS fit with x factors"). I know that I can access it if I know the number of the outline box (e.g., OutlineBox(6)) or the exact title, but since the number of the former could change and the latter changes depending on the number of factors, I have trouble dynamically accessing the outline box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of getting the tree position of a outline box by searching for part of its name?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:35:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287393#M55475</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2023-06-09T23:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Outline Box NIPALS Fit in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287406#M55478</link>
      <description>&lt;P&gt;You could use xpath to search all outline boxes by name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pls report &amp;lt;&amp;lt; XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = Open( "$Sample_data/iris.jmp" );

pls = Partial Least Squares(
	Y( :Petal width ),
	X( :Sepal length, :Sepal width, :Petal length ),
	Validation Method( KFold( 7 ), Initial Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 2 ) )
);

//get all matching outline boxes:
ob = pls &amp;lt;&amp;lt; XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");

//Reference the first match:
ob[1] &amp;lt;&amp;lt; Prepend ( Spacer Box( size( 800, 5 ), color( "red" ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Aug 2020 14:44:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287406#M55478</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2020-08-24T14:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Outline Box NIPALS Fit in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287936#M55508</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6657"&gt;@ih&lt;/a&gt;: When I try your way with my example, I get the error message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Feli_0-1598336358905.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26393i7D190DAE30742BB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Feli_0-1598336358905.png" alt="Feli_0-1598336358905.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm calling the PLS using&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pls = Partial Least Squares(
	
		Validation( :Validation ),
		Initial Number of Factors( 15 ),
		Centering( 0 ),
		Scaling( 0 ),
		Fit(
			Method( NIPALS ), 
		
			Distance Plots( 1 ),
			Diagnostics Plots( 1 ),
			Overlay Loadings Plots( 1 ),
			VIP vs Coefficients Plots( 1 ),
			T Square Plot( 1 ),
			Correlation Loading Plot( 2 ),
			Overlay Coefficients Plots( 1 )
		)
			
	);
	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because I need the PLS dialog to prompt for X and Y.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 06:21:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287936#M55508</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2020-08-25T06:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Outline Box NIPALS Fit in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287940#M55511</link>
      <description>&lt;P&gt;It appears as if the "pls" pointer to the Partial Least Squares() platform gets lost when it has to pop up for X and Y input.&amp;nbsp; So below is a real kluge of a solution, that uses a reference to the name of the output window that will be produced for the example, and keeps checking to see when it appears, and then applies the red line.&amp;nbsp; I don't like the solution....hopefully another Community member has a better solution&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$Sample_data/iris.jmp" );

pls = Partial Least Squares(
	Validation Method( KFold( 7 ), Initial Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 3 ) ),
	Fit( Method( NIPALS ), Number of Factors( 2 ) )
);
ob = "";
counter = 0;
While( ob == "",
	Wait( 5 );
	ob = Try( Window( "iris - Partial Least Squares of Petal width" ) &amp;lt;&amp;lt; XPath( "//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]" ), "" );
	Try( ob[1] &amp;lt;&amp;lt; Prepend( Spacer Box( size( 800, 5 ), color( "red" ) ) ) );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Aug 2020 07:28:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287940#M55511</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-08-25T07:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Outline Box NIPALS Fit in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287942#M55513</link>
      <description>&lt;P&gt;With the snippet&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mywind=Window() &amp;lt;&amp;lt; Get Window Title;

pls_wind = {};


For( i = 1, i &amp;lt;= N Items( mywind ), i++,

     If( Contains( mywind[i], "Partial Least Squares"),

           Insert Into( pls_wind, mywind[i] )

     )

);



ob = Window( pls_wind[1] )  &amp;lt;&amp;lt; XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can access the PLS window and send messages, so that seems to work.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 07:54:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Accessing-Outline-Box-NIPALS-Fit-in-JSL/m-p/287942#M55513</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2020-08-25T07:54:30Z</dc:date>
    </item>
  </channel>
</rss>

