Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Chris_Ng
Level II

Process Variable Drift or Creep Detection

Hi,

Is there any methods available in JMP to detect the drift/creep/gradient for a large set of process variables over a set period of time. The user would then set the threshold on what they would consider the gradient to be too high or too low and needs to be flagged.

Currently I am aware that the process screening tool has a Drift Summaries Option that can be enabled which shows the mean Upshift, Downshift and Absolute Shift. In this case, I am looking for the Overall Drift (whether positive or negative), however Absolute shift (from what I see) is calculated as [Abs(Upshift) + Abs(Downshift)]. This does not tell me whether overall it has drifted up or down. Technically, I'm looking for Abs(Upshift + Downshift [negative value]).

My current workaround is to write a screen that converts the process screening result into a data table and redoing the calculation. However, this means that the calculated values are disjointed from the Processing Screening platform which has a bunch of useful features such as Quick Graph/Quick Control Charts etc. Also, it doesn't work well with Local Data Filter.

Would really appreciate if anyone else has any ideas how I can approach this. Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ih
ih
Level VII

Re: Process Variable Drift or Creep Detection

I am still working with JMP Support to figure out why the table sorting is applied to values read from the table but not those written to the table.  For now here is a crude work around:

 

names default to here(1);
dt = Open("$Sample_Data/iris.jmp");
 
//Open Process Screening with drift summaries
ps = dt << Process Screening(
       Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
       Control Chart Type( "Indiv and MR" ),
       Drift Summaries( 1 )
);
 
//Add a dummy column and use set values to reset the table order
ncb = (ps << XPath( "//TableBox" )) << Append( newCol = NumberColBox("Delete Me", {}));
newCol << Set Values({});
newCol << Delete Box;

//calculate the combined drift
UpDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Up Drift']]" ))[1] << Get;
DownDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Down Drift']]" ))[1] << Get;
CombinedDrift = Abs( Matrix(UpDrift) + Matrix(DownDrift) );
ncb = (ps << XPath( "//TableBox" )) << Append( newCol = NumberColBox("Combined Drift", CombinedDrift));

View solution in original post

6 REPLIES 6
Highlighted
ih
ih
Level VII

Re: Process Variable Drift or Creep Detection

You could add a column to the Process Screening table:

 

names default to here(1);
dt = Open("$Sample_Data/iris.jmp");

//Open Process Screening with drift summaries
ps = dt << Process Screening(
	Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
	Control Chart Type( "Indiv and MR" ),
	Drift Summaries( 1 )
);

//calculate the combined drift
UpDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Up Drift']]" ))[1] << Get;
DownDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Down Drift']]" ))[1] << Get;
CombinedDrift = Abs( Matrix(UpDrift) + Matrix(DownDrift) );

//Add column to table with Combined Drift
ncb = (ps << XPath( "//TableBox" )) << Append( NumberColBox("Combined Drift", CombinedDrift) );

You should see a new 'Combined Drift' column on the right:

ih_0-1598639298553.png

 

Highlighted
Chris_Ng
Level II

Re: Process Variable Drift or Creep Detection

Hi!

Thank you so much for getting back to me on this. I think this is almost a complete solution but it seems that the calculated values that we’re appending to the original process screening table box do not really match to the appropriate parameters/column. Wondering if there’s a way we can append the column name to the matrix that is generated in this script so that it can be matched when we append the values.

Also, wondering if it’s possible for us to make the column permanent. When we apply a local data filter and it does a recalc, the column disappears. Though a quick workaround probably just be running the data filter on the data table and rerunning this script.
Highlighted
ih
ih
Level VII

Re: Process Variable Drift or Creep Detection

I'm not sure what you mean about the calculated values not matching.  Can you give an example of the discrepency?

 

I agree with your work-around in your second paragraph, recalculating after an update from a data filter might be the easiest path forward.

 

 

Highlighted
Chris_Ng
Level II

Re: Process Variable Drift or Creep Detection

Hi there,

In terms of the discrepancy, we’ll take your screenshot for an example, looking at the values in the combined drift column, you’ll notice that when we added up the mean updrift and mean downdrift, the values don’t match. I think the math is done correctly between the two matrixes but when the values are appended back, there may be a misalignment with the order of the column parameters in the original process screening table.

Hoping this clarifies it.
Highlighted
ih
ih
Level VII

Re: Process Variable Drift or Creep Detection

You're right and I apologize for not catching the incorrect order earlier.  I've used this method several times and haven't run into that issue yet (I just went back and re-checked a few scripts of my own).  For some reason pulling data out of the table seems to use the sorted order of the table, but when writing data the rows go back in a different order.  I will work to resolve that.

 

Highlighted
ih
ih
Level VII

Re: Process Variable Drift or Creep Detection

I am still working with JMP Support to figure out why the table sorting is applied to values read from the table but not those written to the table.  For now here is a crude work around:

 

names default to here(1);
dt = Open("$Sample_Data/iris.jmp");
 
//Open Process Screening with drift summaries
ps = dt << Process Screening(
       Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
       Control Chart Type( "Indiv and MR" ),
       Drift Summaries( 1 )
);
 
//Add a dummy column and use set values to reset the table order
ncb = (ps << XPath( "//TableBox" )) << Append( newCol = NumberColBox("Delete Me", {}));
newCol << Set Values({});
newCol << Delete Box;

//calculate the combined drift
UpDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Up Drift']]" ))[1] << Get;
DownDrift = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Mean Down Drift']]" ))[1] << Get;
CombinedDrift = Abs( Matrix(UpDrift) + Matrix(DownDrift) );
ncb = (ps << XPath( "//TableBox" )) << Append( newCol = NumberColBox("Combined Drift", CombinedDrift));

View solution in original post

Article Labels