cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
trm
trm
Level I

Export Neural Net Equation to Matlab or LaTex

I have several Neural network equations currently in the form of column formulas.

My aim is to include these formulas in a publication (as an appendix), but if I simply copy and paste the plain text, the formula is about 40 pages.

The Neural Net equations are a function of both continuous and discrete variables and so several Match(:"X", -0.014...) statements exist.

Furthermore, some equations have been saved as the full formula (everything in 1 column) and others as a formula with 15 hidden layers or more (1 column for main formula and 15+ columns for each of the hidden layers).

How can I export these formulas into a Matab script/function or neat LaTex format?

Thanks

3 REPLIES 3
txnelson
Super User

Re: Export Neural Net Equation to Matlab or LaTex

Might this be of help.....JMP has the ability to produce a picture version of a formula.  Here is a Neural formula that I have placed into a simple script:

 

Names Default To Here( 1 ); 

New Window( "Example",

       Lineup Box( N Col( 1 ), spacing( 10 ),

              Text Box( "Neural Formula" ), 

              Border Box( Left( 10 ), Right( 10 ), bottom( 10 ), top( 10 ), sides( 15 ), 

                     Expr As Picture(

                           Expr(

                                  TanH(

                                         0.5 * (411676290303.566 + 0.0000070031849522355 * :PNP1 + -0.0000007888435515704 *

                                         :PNP2 + -0.0000781144065394666 * :NPN2 + 0.000105008489145798 * :PNP3

                                         +0.000176219959505792 * :IVP1 + 0.0000023735323010587 * :PNP4 + 0.0000164048747530126

                                          * :NPN3 + 0.0000794486616041457 * :IVP2 + -0.0000723584929453441 * :NPN4 +

                                         -0.0000230878969648765 * :SIT1 + 0.000376520928045742 * :INM1 + 0.000481813585731437

                                          * :INM2 + 0.0000196896686381764 * :VPM1 + 0.0000091710543649923 * :VPM2 +

                                         -0.00031861826616907 * :VPM3 + 8233525806.08194 * :PMS1 + -0.0000242497813715599 *

                                         :SNM1 + -0.000198789762233814 * :SPM1 + 0.00359211968156413 * :NPN5 +

                                         -0.000400165280933489 * :EP2 + -0.00581762377511152 * :ZD6 + -0.000663922359630756 *

                                         :PBA + -0.0000199776702595494 * :PLG + -0.0000629229851468266 * :CAP +

                                         -0.00023400862815738 * :PBA 2 + -0.0000742947619932712 * :PLG 2

                                         +0.0000952421964687533 * :PNP5 + -0.000919955833022097 * :NPN6 +

                                         -0.0000227696480578744 * :PNP6 + 0.000785260332890641 * :PNP7 + 0.000766570884161376

                                          * :NPN7 + -0.0000114454027670346 * :PNP8 + -0.000183872258146492 * :IVP3

                                         +0.000259623529864692 * :IVP4 + -0.000298771777358147 * :IVP5 + -0.000291286978739955

                                          * :IVP6 + 0.000328763050668516 * :PNP9 + -0.000481422066961605 * :NPN8

                                         +0.00048118818575536 * :NPN9 + 0.000144554034040404 * :IVP7 + -0.000654136096509743 *

                                         :NPN10 + -0.017898701010748 * :N_1 + -0.0171963236229668 * :PBA1 + 0.00236441946247168

                                          * :WPR1 + -0.0028842844870961 * :B10 + -0.00173260034028958 * :PLY10

                                         +0.000605646415282699 * :VBE210 + -0.000135103517917578 * :VTN210 +

                                         -0.0000821099917281755 * :VTP210 + -0.000249470539455934 * :SIT2 +

                                         -0.000230365072699282 * :SIT3 + 0.00127756607309727 * :INV2 + 0.00468835823185332 *

                                         :INV3 + -0.000185703652790833 * :INV4 + 0.00144932745508692 * :INV5 +

                                         -0.0000011619274751838 * :FST1 + -0.0000008484654669894 * :FST2 + 0.0336069354968686

                                          * :RES1 + 0.0179164771646705 * :RES2 + -0.000508932284899653 * :PNM1

                                         +0.0000294851585519544 * :PPM1 + 0.0163895201868086 * :FNM1 + 0.0162022924145558 *

                                         :FPM1 + -0.0000006463046835464 * :FST3 + 0.0000004838321579095 * :FST4

                                         +0.00365912119380163 * :RES3 + 0.000028150894160007 * :RES4 + -0.000100083838777878 *

                                         :A1 + -0.0000053224159670075 * :B1 + -0.0000405587249982837 * :A2N +

                                         -0.00011867335740672 * :A2P + 0.000139005021175447 * :A2P1 + -0.000408294306196334 *

                                         :IVP8 + 0.000717950086649866 * :IVP9 + 0.000722824558930332 * :DE_H1

                                         +0.00515513118270702 * :NF_H1 + -0.000123243179611534 * :ESM1 + 0.0000108818424404741

                                          * :ESM2 + 0.0000959156170197993 * :ESP1 + -0.00386874796138154 * :YFU1 +

                                         -0.0000110721856333173 * :VPM4 + 0.000415427576339262 * :PBA2 + 0.000328797694961642

                                          * :PBB1 + -0.00244326977601833 * :LYA1 + -0.00224914051548559 * :LYB1

                                         +0.00305506624364557 * :DEM1 + 0.00269347757174163 * :DEP1 + 0.0052667559143508 *

                                         :NFM1 + -0.000740037680769771 * :PLY1 + 0.00207628343747331 * :VDP1

                                         +0.000148161744317111 * :VDP2 + 0.0517834956728815 * :SNW1 + -0.000607135437864787 *

                                         :RSP2 + -0.00066395266908071 * :PLY2 + 0.000780161097111245 * :RSP1

                                         +0.0172730905081982 * :VDP3 + 0.00158383478617461 * :PBL1 + 0.00830155421886163 *

                                         :PLG1 + -0.00395730729751526 * :VDP4 + -0.0147838120336043 * :SPW1 +

                                         -0.672575088975314 * :VIA1 + 0.00105832223159254 * :INM3 + -0.000343342553915832 *

                                         :VPM5 + 0.0000453458234966031 * :VPM6 + 0.00201330734855374 * :INM4 +

                                         -0.000160458456349771 * :VPM7 + -0.00406953738591762 * :M1_M1 + 0.00832977187801006 *

                                         :M2_M2 + 0.0404630309041291 * :P1_P1 + 0.206364633675453 * :E2A1 + 0.311452145781271

                                          * :E2B1 + 0.547931122788559 * :NPN11 + 0.353280720389102 * :IVP10

                                         +0.0057292568217189 * :PNP10 + -0.0113223224083147 * :INM5 + 0.000560772287284031 *

                                         :VPM8 + -0.0000284701335025164 * :VPM9 + -0.00499219660024629 * :INM6 +

                                         -0.0103111923305117 * :VPM10 + -0.00932172192298772 * :N2A1 + -0.0122209524629815 *

                                         :N2B1 + -0.0174567560868802 * :NM_L1 + 0.00316410948035694 * :P2A1

                                         +0.00425964769029979 * :P2B1 + 0.00869550419077299 * :PM_L1 + -0.000008749318878899 *

                                         :P1 + -0.0000052259765443387 * :M1)

                                  )

                           )

                     )

              )

       )

);

It produced the following output:

  11004_pastedImage_1.png

 

 

Jim
trm
trm
Level I

Re: Export Neural Net Equation to Matlab or LaTex

Interesting.

It seems to only create a picture of what is seen in the formula editor (analogous to hitting Print Screen, or using the MS Snipping tool).

Is there a way to output the ENTIRE equation to picture? Not sure if this would equate to changing the Border Box numbers.

Some of my larger Equations would require 15+ screenshots similar to this

txnelson
Super User

Re: Export Neural Net Equation to Matlab or LaTex

If you go to the pull down menu for the window the picture formula is in, and select File==>Save As, you can save it into many formats, and it saves the entire picture of the formula.

In case you are not aware, the pull down menus are available to this window by hovering over the small bar that goes across the entire top of the display window.

Jim