Automate (script) optimization for "each row" using Custom ProfilerHello, I have a customer @Solvay using Custom Profiler.
His goal is to go through each row for which the performance is below the Spec, get the factors values, lock the factors he has no control on and optimize the performance using the factors he has control on, then save the new settings and expected perfomance.
This can be done manually but unfortunately the Log does not save the corresponding code.
As he has a large datatable he would like to script the process to automate it.
Anyone knows the corresponding code ?
note: this should appears in the JMP Community in the following days, I guess.
Emmanuel
Re: Automate (script) optimization for "each row" using Custom ProfilerHere's a script to do this by locking just one variable. To step through locking multiple variables, you'd need to nest more For loops:
dt = open ("$SAMPLE_DATA\Body Fat.jmp");
dt << New Column ("Formula", Set Formula (109.665262588823 + 0.329339426252964 * :"Weight (lbs)"n +
-1.47623913006859 * :"Height (inches)"n + -0.492211525467987 *
:"Neck circumference (cm)"n + -1.41262250197006 *
:"Wrist circumference (cm)"n + (:"Height (inches)"n
-70.1488095238095) * ((:"Height (inches)"n - 70.1488095238095) *
-0.0306978267773712) + (:"Height (inches)"n - 70.1488095238095) * ((
:"Neck circumference (cm)"n - 37.9920634920635) * -0.121564139238233)
+ (:"Neck circumference (cm)"n - 37.9920634920635) * ((
:"Neck circumference (cm)"n - 37.9920634920635) * -0.127296845579246)));
dt:Formula << Set Property ("Response Limits", {Goal( Match Target ), Lower (20, .05), Middle (25, 1), Upper (30, .05)});
prof = dt << Profiler ( Y(:Formula));
for (i = 60, i <= 74, i++,
prof << Term Value ("Height (inches)" (i, Lock (1)) );
prof << Maximize and Remember;
);
Re: Automate (script) optimization for "each row" using Custom ProfilerInstead of (in addition to?) nesting loops and using "Mazimize and Remember," there's also the "Maximize for Each Grid Point" message that could be explored.
Re: Automate (script) optimization for "each row" using Custom ProfilerI was playing around with an idea for doing something like that.
Names Default To Here( 1 );
// comment out the nexct line if the script is pasted into a table
dt = Open( "AutoProfiler Tiretread.jmp" );
// uncomment the next line if the script is pasted into a table
//dt=current data table();
//This is where your profiler script goes
obj = dt << Profiler(
Y(
:Pred Formula ABRASION,
:Pred Formula MODULUS,
:Pred Formula ELONG,
:Pred Formula HARDNESS
),
Profiler(
1,
Term Value(
SILICA( 1.25, Lock( 0 ), Show( 1 ) ),
SILANE( 50, Lock( 0 ), Show( 1 ) ),
SULFUR( 2.25, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
SILICA << Random( Normal( 1.25, 0.3266 ) ),
SILANE << Random( Normal( 50, 6.532 ) ),
SULFUR << Random( Normal( 2.25, 0.3266 ) )
),
Automatic Histogram Update( 1 )
)
)
);
//your profiler goes above here
obj << Simulator( 1 );
obj2 = obj << Get Simulator;
obj2 << Automatic Histogram Update( 1 );
For( i = 1, i <= N Rows( dt ), i++,
obj << Set to Data in Row( i );
obj << Remember Settings(Column(1)[i]); //"Column(1)[i]" is the firtst column of the table, ith row
);//end of for loop
obj<<DISPATCH></DISPATCH>
It runs the profiler and saves the settings for all the rows in the table. Your customer would have to subset the defect rows and then run a script like this.

Re: Automate (script) optimization for "each row" using Custom ProfilerThank you both 