cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

Is it possible to generate a Python script for the eigenfuctions & scores of Funcional Data Explorer

frankderuyck
Level VI

In R&D we developed an excellent wavelets model for NIR spectra; is it possible to transfer to Python so that implementation in production  NIR online control is possible? If yes what are the different steps? 

3 REPLIES 3


Re: Is it possible to generate a Python script for the eigenfuctions & scores of Funcional Data Explorer

For discussion, a lot more detail is needed on what you are asking / attempting.

  • Is your wavelet model in JSL?  
  • Transfer to Python are we talking the model itself, or the data output of the model?
  • NIR - ? Near Infrared? 
  • ...

More details please

frankderuyck
Level VI


Re: Is it possible to generate a Python script for the eigenfuctions & scores of Funcional Data Explorer

NIR stands for Near Infrared Spectroscopy, in manufacturing it is used for online process control. We would like to perform SPC on the eigenfunction scores "YFPC". In R&D we developed a good FPCA wavelet model. We now want to apply it for the YFPCA score generation of production NIR spectra that can be used for online SPC or a concept equivalent to Model based  Multivariate SPC.


Re: Is it possible to generate a Python script for the eigenfuctions & scores of Funcional Data Explorer

In general, using Python from JMP is basically the same as using Python standalone.  With our jpip wrapper on Python's pip you can install external Python packages into JMP's private isolated site-packages directory. Think of it as a JMP specific virtual environment. You can write pure Python code, open edit and run from a Python specific script editor within JMP.  

The advantage of running your Python code within JMP is the import jmp package that is a built-in package, and other code we continue to add.  This provides a Python interface to JMP DataTables, and other JMP functionality directly from Python.  

You can write code that can create, read, and write JMP data tables from Python. Additionally, since JSL has Python Submit( "python code "); and the jmp package has a jmp.run_jsl( ' jsl code here' ) scripts can work across the language barrier.

Python code can be imported by Python running in JMP, just the same way it would be imported in standalone Python.  If it's a valid Python package, jpip can install it into the site-packages directory. 

The idea is that anything you can do from Python you can do within JMP + the ability to directly interact with JMP from the Python script.

I would start with the runnable examples in the Scripting Index.  There is an entire top level Python category, plus the JSL Python capabilities which have been present since JMP 14.  The interface from Python to JMP and JMP data tables exists only within the running JMP environment.  

We hope the JMP Python environment is enticing enough that you run the process from within the JMP environment.  Even if you don't run the full process within JMP, the new capabilities will help you be able to export and import data from JMP to your process.