cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to exclude rows until distribution mean meets a criteria?

Below is an example similar to my actual case where I would like to exclude SITEs until the distribution mean for each parameter (only those plotted case below) fall within their respective spec limits.

Sites/wafer to be excluded start from the distribution extreme on the side where the mean is outside the spec limit (LSL or USL). 

I think one could start with any parameter, remove sites from the distribution extreme until the recalculated mean is >=LSL or <= USL for that parameter, then move to the next parameter and check and exclude sites if necessary. 

How to approach this problem with JSL? 

Is there a JMP platform which could already do this, e.g. process screening?

The following gives 

Names Default To Here( 1 );
Clear Log();
dt = Open( "$sample_data\Semiconductor Capability.jmp" );
obj = dt << Manage Spec Limits( Y( dt << Get Column Group( "Processes" ) ), Show Limits All,  Save to Column Properties(1), );
obj << close window;
dist = Distribution(Stack( 0 ),
	Continuous Distribution(Column( :IVP2 ), Outlier Box Plot( 0 ),	Process Capability( 0 )	),
	Continuous Distribution(Column( :NPN4 ), Outlier Box Plot( 0 ),	Process Capability( 0 )	),
	Continuous Distribution(Column( :IVP7 ), Outlier Box Plot( 0 ),	Process Capability( 0 ) ),
	Continuous Distribution(Column( :PLY1 ), Outlier Box Plot( 0 ),	Process Capability( 0 )	),
	Continuous Distribution(Column( :VIA1 ), Outlier Box Plot( 0 ),	Process Capability( 0 )	),
	Continuous Distribution(Column( :M1_M1 ), Outlier Box Plot( 0 ), Process Capability( 0 ) )
);

Neo_0-1700747211448.png

while the desired end result may look something like (filtering done manually, plot below is when done for all wafers).

Neo_2-1700750954615.png

The act of filtering out SITEs using the recipe above is likely to throw the mean for earlier analysed parameters out of their spec limits. This is what I noticed while doing the exercise manually anyway.  One may need loop the recipe say 5 times over the parameters for a check or until all SITEs have been filtered out. This is what I would like to know from this exercise. I would appreciate some help on how to proceed. 

Once checked and done for all parameters, the excluded SITEs need to be tagged as Excluded in a new column (and remaining as Not Excluded). 

When it's too good to be true, it's neither
10 REPLIES 10
txnelson
Super User

Re: How to exclude rows until distribution mean meets a criteria?

Here is an illustration of how to run this separately for each wafer.  I am using @jthi example code.  I modified it to create data tables for each wafer, and then to run the code on each data table.  For illustration purposes, I removed all wafer data except for wafers 1 & 2.

Names Default To Here( 1 );
Clear Log();

dtAll = Open( "$sample_data\Semiconductor Capability.jmp" );
dtAll << clear row states();

obj = dtAll << Manage Spec Limits(
	Y( dtAll << Get Column Group( "Processes" ) ),
	Show Limits All,
	Save to Column Properties( 1 )
);
obj << close window;
Window( "Consistency Problem" ) << close window;

// For illustration remove all data except for wafers 1 & 2
dtAll << select where( :wafer > 2 );
dtAll << delete rows;


expr_exclude_rows = Expr(
	Summarize( dt, colMean = Mean( dt:colName ), colMin = Min( dt:colName ), colMax = Max( dt:colName ) );
	del_LSL = _LSL - colMean;
	del_USL = _USL - colMean;
	If( del_LSL > 0,
		dt << select where( dt:colName == colMin ) << Hide and Exclude
	);
	If( del_USL < 0,
		dt << select where( dt:colName == colMax ) << Hide and Exclude
	);
	If( N Items( dt << Get Selected Rows ) < 1,
		continue_clean = 0
	);
	dt << Clear Select;
);

// Create all data tables based on wafer
dtList = dtAll << Subset( By( :wafer ), All rows, Selected columns only( 0 ) );

// Run the analysis for each data table	
For Each( {dt}, dtList, 

	dt << Show Window( 0 );
	dt << Begin Data Update;

	duration = 0;
	cols_of_interest = {"IVP7"};
	For Each( {colName}, cols_of_interest, 
	
		start = Tick Seconds();
		specs = dt:colName << get property( "spec limits" );
		_LSL = specs["LSL"];
		_USL = specs["USL"];
		continue_clean = 1;
	
		While( continue_clean, expr_exclude_rows );
	
		end = Tick Seconds();
		cur_dur = end - start;
		duration += cur_dur;
	
		Write( "colName: ", colName, " took ", Round( cur_dur, 2 ), " seconds.\!N" );
	);
	dt << End Data Update;
	dt << Show Window( 1 );

	total_end = Tick Seconds();

	rows_excluded = dt << Get Excluded Rows;
	Write(
		"Total run time for ",
		N Items( cols_of_interest ),
		" columns was ",
		Round( duration, 2 ),
		" seconds with ",
		N Items( rows_excluded ),
		" rows excluded\!N"
	);
);
Jim