Custom Profiler
Example 1
Summary: Creates a Custom Profiler object with response variables ABRASION, MODULUS, ELONG, and HARDNESS from the data_table.jmp dataset.
Code:
dt = Open("data_table.jmp");
obj = Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
Code Explanation:
- Open data_table data
- Create Custom Profiler object.
- Set response variables: ABRASION.
- Add MODULUS to responses.
- Include ELONG in responses.
- Add HARDNESS to responses.
Example 2
Summary: Creates a Custom Profiler object with prediction profiler, utilizing data from an open JMP data table.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
obj << Prediction Profiler( 1 );
Code Explanation:
- Set default names.
- Open data table.
- Create Custom Profiler object.
- Add prediction profiler.
Example 3
Summary: Creates a Custom Profiler object with specified settings and objective formula, utilizing data from an opened JMP data table.
Code:
dt under test = Open("data_table.jmp");
obj = Custom Profiler(
Y( :Pred Formula ABRASION ),
Custom Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) ),
Objective Formula( Pred Formula ABRASION )
)
);
Code Explanation:
- Open data table;
- Create Custom Profiler object.
- Set response variable to "ABRASION".
- Configure Custom Profiler settings.
- Set initial values for SILICA, SILANE, SULFUR.
- Lock initial values for variables.
- Display initial values for variables.
- Set objective formula to "ABRASION".
- Assign Custom Profiler to obj variable.
- End script execution.
Custom Profiler using Column
Summary: Configures response limits for multiple columns in a data table, and generates a custom profiler report with specified Y variables.
Code:
dt = Open("data_table.jmp");
Column( dt, 8 ) << Set Property(
"Response Limits",
{Lower( 100, 0.066 ), Middle( 150, 0.5 ), Upper( 200, 0.9819 ), Goal( Maximize ), Importance( 0.2 )}
);
Column( dt, 9 ) << Set Property(
"Response Limits",
{Lower( 1000, 0.066 ), Middle( 1500, 0.5 ), Upper( 2000, 0.9819 ), Goal( Maximize ), Importance( 0.2 )}
);
Column( dt, 10 ) << Set Property(
"Response Limits",
{Lower( 450, 0.0183 ), Middle( 500, 1 ), Upper( 550, 0.0183 ), Goal( Match Target ), Importance( 0.2 )}
);
Column( dt, 11 ) << Set Property(
"Response Limits",
{Lower( 65, 0.0183 ), Middle( 67.5, 1 ), Upper( 70, 0.0183 ), Goal( Match Target ), Importance( 0.4 )}
);
obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
rpt = obj << report;
formuTxt = rpt[Outline Box( "Formula" )][Text Edit Box( 1 )] << Get Text;
formuLst = Words( formuTxt, "*" );
tmp = J( Length( formuLst ) - 1, 1, 0 );
For( i = 1, i <= N Rows( tmp ), i++,
tmp[i] = Num( Right( Trim( formuLst[i] ), 3 ) )
);
Code Explanation:
- Open data table;
- Set properties for column 8.
- Set properties for column 9.
- Set properties for column 10.
- Set properties for column 11.
- Create Custom Profiler with specified Y variables.
- Retrieve report from Custom Profiler.
- Extract formula text from report.
- Split formula text into words.
- Convert extracted numbers to numeric values.