<?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: Create prediction expression display based on column formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304737#M56098</link>
    <description>&lt;P&gt;If you're looking for a picture of the prediction expression you can use Expr As Picture().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Drug.jmp" );
obj = dt &amp;lt;&amp;lt; Fit Model(
	Y( :y ),
	Effects( :Drug, :x ),
	Personality( Standard Least Squares ),
	Emphasis( Minimal Report ),
	Run
);
obj &amp;lt;&amp;lt; Prediction Formula;


New Window( "Example",
	Lineup Box( N Col( 1 ), spacing( 10 ),
		Text Box( "Column Formula" ),
		Border Box( Left( 10 ), Right( 10 ), bottom( 10 ), top( 10 ), sides( 15 ),
			Expr As Picture( dt:pred formula y &amp;lt;&amp;lt; get formula )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-10_13-27-50.507.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26686iD6ABF918785F340E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2020-09-10_13-27-50.507.png" alt="2020-09-10_13-27-50.507.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 10 Sep 2020 17:28:15 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2020-09-10T17:28:15Z</dc:date>
    <item>
      <title>Create prediction expression display based on column formula</title>
      <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304523#M56090</link>
      <description>&lt;P&gt;I would like to create a formatted prediction expression, based on a column formula, in a custom report window.&amp;nbsp; When I fit a linear model using Fit Least Squares, in the model report, I can turn on the display of the prediction expression, which displays a formatted "picture" view of the equation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can then save the equation to the data table as a column with a formula.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to select that column and display a prediction expression for the formula saved to the column, all by itself, in a new report window.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this with JSL?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:37:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304523#M56090</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2023-06-09T23:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create prediction expression display based on column formula</title>
      <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304612#M56093</link>
      <description>&lt;P&gt;You can simply retrieve the formula with a &amp;lt;&amp;lt;get formula message passed to the column.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	add rows( 10 ),
	New Column( "The Column", formula( Random Integer( 1, 100 ) ) )
);

theFormla = dt:The Column &amp;lt;&amp;lt; get formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:49:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304612#M56093</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-10T16:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create prediction expression display based on column formula</title>
      <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304737#M56098</link>
      <description>&lt;P&gt;If you're looking for a picture of the prediction expression you can use Expr As Picture().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Drug.jmp" );
obj = dt &amp;lt;&amp;lt; Fit Model(
	Y( :y ),
	Effects( :Drug, :x ),
	Personality( Standard Least Squares ),
	Emphasis( Minimal Report ),
	Run
);
obj &amp;lt;&amp;lt; Prediction Formula;


New Window( "Example",
	Lineup Box( N Col( 1 ), spacing( 10 ),
		Text Box( "Column Formula" ),
		Border Box( Left( 10 ), Right( 10 ), bottom( 10 ), top( 10 ), sides( 15 ),
			Expr As Picture( dt:pred formula y &amp;lt;&amp;lt; get formula )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-10_13-27-50.507.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26686iD6ABF918785F340E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2020-09-10_13-27-50.507.png" alt="2020-09-10_13-27-50.507.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:28:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/304737#M56098</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2020-09-10T17:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create prediction expression display based on column formula</title>
      <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/305185#M56125</link>
      <description>&lt;P&gt;Thanks, that's what I needed.&amp;nbsp; I knew there was a way to do it, I just couldn't remember the &lt;STRONG&gt;Expr as Picture()&lt;/STRONG&gt; box display object.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 13:19:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/305185#M56125</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2020-09-11T13:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create prediction expression display based on column formula</title>
      <link>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/358749#M60883</link>
      <description>&lt;P&gt;It has been a while since I posted this a got a good answer.&amp;nbsp; I wanted to share the script I developed to allow for quickly viewing the formulas in columns in a data table, allowing to switch columns interactively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/* this script presents a list of columns in the current data table
in a list box, and upon selecting a column, if the column has a formula, 
it will display the formula below the list box as a picture.  
If the column does not have a formula, "No Column Formula" is displayed
*/

Names Default To Here( 1 );
_dt = Current Data Table();

expr_ShowFormulaAsPicture = Expr(
	_vb1 &amp;lt;&amp;lt; Delete;
	_vb &amp;lt;&amp;lt; Append( _vb1 = V List Box() );
	_c = Column( dt, (_clb &amp;lt;&amp;lt; Get Selected)[1] );
	If( Is Empty( _c &amp;lt;&amp;lt; Get Property( "Formula" ) ),
		_vb1 &amp;lt;&amp;lt; Append( Text Box( "No Column Formula" ) ),
		_vb1 &amp;lt;&amp;lt; Append( Picture Box( Expr As Picture( _c &amp;lt;&amp;lt; get formula ) ) )
	);
);


New Window( "Show Column Formula as Picture",
	_vb = V List Box(
		
	)
);

_vb &amp;lt;&amp;lt; Append(
	_pb = Panel Box( "Select Column With Formula To Display as Picture",
		_clb = Col List Box(
			_dt,
			max selected( 1 ),
			grouped,
			all,
			On Change( expr_ShowFormulaAsPicture )
		)
	)
);

_vb &amp;lt;&amp;lt; Append( _vb1 = V List Box() );

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Example window here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MathStatChem_0-1613243082768.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30216iFC0B4CBE6230D9F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MathStatChem_0-1613243082768.png" alt="MathStatChem_0-1613243082768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 19:04:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-prediction-expression-display-based-on-column-formula/m-p/358749#M60883</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2021-02-13T19:04:59Z</dc:date>
    </item>
  </channel>
</rss>

