Choose Language Hide Translation Bar
Highlighted
ivomdb
Level III

How to use the values from the column where the resulting model was Saved?

Hello All,

 

I have trying to find a solution to my question from the various examples but I struggle to find something that works.

I am using the NonLinear model fitting tool, and after running the iterations I finish the script:

 

obj<< Save the Prediction formula;

 

However, I want to use the resulting column for further processing as I need to convert the values to different units for example etc. How do I reference the resulting column further on the script? I thought that I could name it but I could not find that on scripting guide under Nonlinear commun messages? 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Re: How to use the values from the column where the resulting model was Saved?

The new column is the last one, so following the sending of this message, you could get a reference like this:

 

col = Column( N Col() );
Learn it once, use it forever!

View solution in original post

Highlighted
uday_guntupalli
Level VIII

Re: How to use the values from the column where the resulting model was Saved?

@ivomdb
     I wonder why. You can try this as well alternatively: 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Approch - 1 
As Column(dt,NCols(dt)) << Set Name("Test");   // If this fails 

// For Demo 
Wait (0.5); 


// Alternatively 
As Column(Column(dt,NCols(dt))) << Set Name("Test1"); 
Best
Uday

View solution in original post

4 REPLIES 4
Highlighted

Re: How to use the values from the column where the resulting model was Saved?

The new column is the last one, so following the sending of this message, you could get a reference like this:

 

col = Column( N Col() );
Learn it once, use it forever!

View solution in original post

Highlighted
uday_guntupalli
Level VIII

Re: How to use the values from the column where the resulting model was Saved?

@ivomdb
         Without actually looking at your data table, while I think there maybe better alternatives to address your problem, I have a really simple solution that I think might work. 

      

         I am assuming you are calling the Non Linear Model Fitting Tool using JSL. If this is the case, after you save the prediction formula and move to the next step, you could do something like this : 

 

As Column(dt,N Cols(dt)) << Set Name("Predicted"); 

/ *Assumptions 
  1. dt is the name of your table 
  2. You are inserting this step right after saving the Prediction formula and a new column is creating 
  3. Even if this is a part of a loop, you can just set it to a dynamic name using the iteration variable 

*/ 
Best
Uday
Highlighted
ivomdb
Level III

Re: How to use the values from the column where the resulting model was Saved?

@uday for some reason only the command that markbailey provided worked.
Highlighted
uday_guntupalli
Level VIII

Re: How to use the values from the column where the resulting model was Saved?

@ivomdb
     I wonder why. You can try this as well alternatively: 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Approch - 1 
As Column(dt,NCols(dt)) << Set Name("Test");   // If this fails 

// For Demo 
Wait (0.5); 


// Alternatively 
As Column(Column(dt,NCols(dt))) << Set Name("Test1"); 
Best
Uday

View solution in original post

Article Labels

    There are no labels assigned to this post.