汽车 PAT 异常值筛选(零件平均测试)大家好,
我使用的是 Robust Fit 离群值 - 四分位数,结果适用于高屏幕和低屏幕,平均值 +/- 6 K(Sigma)。
现在我只看泄漏部分。 我只需要平均值 + 6 K (Sigma) 的异常值。
请告诉我如何通过 JSL 实现这一目标。 谢谢。
Explore Outliers(
Y(
:icc_aux10_total_vcc_1.000, :icc_aux10_VCCAUX10_vcc_1.000, :icc_aux18_total_vcc_1.000,
:icc_aux18_VCCAUX18_vcc_1.000, :icc_core_total_vcc_1.050, :icc_core_VCC_vcc_1.050,
:icc_core_lp_total_vcc_1.000, :icc_core_lp_VCC_vcc_1.000, :iccio_b_total_vcc_1.000,
:iccio_b_VCCIOB_vcc_1.000, :iccio_ltr_total_vcc_1.000, :iccio_ltr_VCCIOLTR_vcc_1.000
),
Robust Fit Outliers( K Sigma( 6 ), Huber( 0 ), Quartile( 1 ) ),
SendToReport( Dispatch( {}, "Commands", OutlineBox, {Close( 0 )} ) )
);质量和工艺工程回复:汽车 PAT 异常值筛选(部分平均测试)上面我很小心地说“采用这种方法”:)。 在不代表其他人发言的情况下,在发布 JSL 片段时,我的目的(通常)是鼓励某人弄清楚代码,然后能够为自己走得更远。
如果将 sigma 更改为 2,您将看到表中只有蓝色单元格(低端的异常值),并且代码不够通用,无法处理此问题并生成您看到的错误。
请找到一个更完整的(未经测试的……)脚本,它应该涵盖所有情况:
NamesDefaultToHere(1);
// Sample data
dt = Open("$SAMPLE_DATA/Big Class.jmp");
// Explore outliers
eo = dt << Explore Outliers(Y( :height ));
eo << Robust Fit Outliers( K Sigma( 2 ), Huber( 0 ), Quartile( 1 ) );
eo << obj << Color Cells( :height ); // Blue (red) cells are 'low' ('high')
// Get the column script
colScript = :height << getScript;
// Initialise lists (which may or may not be updated by the subsequent code)
redRowList = {};
blueRowList = {};
// Find the location of the sub-expression 'Color Cells'. if there are no outliers, 'colorCellsExist' will be 0
subExpr = {};
for(i=1, i<=NArg(colScript), i++, InsertInto(subExpr, Head(Arg(colScript, i))));
colorCellsExist = Contains(subExpr, Expr(Color Cells));
// Find the row numbwrs of any high (red) cells or low (blue) cells (red is '35', blue is '37'):
// Need to handle situations in which there are only high outliers, only low outliers, both high and low
// outliers, or no outliers
if(
colorCellsExist,
// Get the 'Color Cells' expression in the column script
cs = Arg(colScript, colorCellsExist);
if(
// If 'cs' is a list of lists, we have both high and low outliers . . .
IsList(Arg(cs, 1)[1]),
for(i=1, i<=NItems(Arg(cs, 1)), i++,
if(
(Arg(cs, 1)[i])[1] == 35, redRowList = (Arg(cs, 1)[i])[2];
(Arg(cs, 1)[i])[1] == 37, blueRowList = (Arg(cs, 1)[i])[2];
);
);
,
// . . . or if 'cs' is not a list of lists, we have either high or low outliers (but not both)
if(
Arg(cs, 1)[1] == 35, redRowList = Arg(cs, 1)[2],
Arg(cs, 1)[1] == 37, blueRowList = Arg(cs, 1)[2]
);
);
);
Print("High: "||Char(redRowList)||" Low: "||Char(blueRowList));
回复:汽车 PAT 异常值筛选(部分平均测试)嗨伊恩,
抱歉回复晚了。 现在我有 JMP17 来运行你的脚本。 没有你提到的错误。 分别显示红色/蓝色。
我尝试将西格玛从 1 更改为 2,3,4,5,6,然后发现相同的错误。
知道如何解决这个问题吗?
谢谢。
回复:汽车 PAT 异常值筛选(部分平均测试)使用红色和蓝色着色只是绕过以下事实的一种间接方式:(据我所知),没有直接的方法要求 JMP 进行单侧筛选(根据需要在高侧或低侧) 。
对于我(在 Mac 上使用 JMP 17.1)来说,上面发布的代码不会生成错误。 它打印:
{25, 27, 30, 37, 39, 40}
到日志,这是包含高端异常值的行号列表(表中的红色单元格)。
回复:汽车 PAT 异常值筛选(部分平均测试)嗨伊恩,
感谢您的回复。
1. 稳健拟合离群值适用于两个方向,下面的公式是将 +1 sigma 或 -1 sigma 中的行标记为红色。
我想仅用+1 sigma 标记该行。
eo << Robust Fit Outliers( K Sigma( 1 ), Huber( 0 ), Quartile( 1 ) );
2. 请您帮助打印 Collist,这正是我正在寻找的。
我收到的错误是对象在访问或评估 'Arg (cs,1) [n]/*###*/1]', Arg(cs,1)[n]/*###*/ 时不可下标1]'
您能再审核一下吗?谢谢。
回复:汽车 PAT 的异常值筛选(部分平均测试)我最终操纵了表达式。 如果没有更好的方法,您应该能够采用这种方法:
NamesDefaultToHere(1);
// Sample data
dt = Open("$SAMPLE_DATA/Big Class.jmp");
// Explore outliers
eo = dt << Explore Outliers(Y( :height ));
eo << Robust Fit Outliers( K Sigma( 1 ), Huber( 0 ), Quartile( 1 ) );
eo << obj << Color Cells( :height ); // Blue (red) cells are 'low' ('high')
// Get the row numbers of the red cells . . .
// (1) Get the column script
colScript = :height << getScript;
// (2) Find the 'Color Cells' expression in the column script
n = 1;
While(Head(Arg(colScript, n)) != Expr(Color Cells), n++);
cs = Arg(colScript, n);
// (3) Find the row numbwrs of the red cells (red is '35')
n = 1;
While((Arg(cs, 1)[n])[1] != 35, n++);
redRowList = (Arg(cs, 1)[n])[2];
Print(redRowList);回复:汽车 PAT 异常值筛选(部分平均测试)你好,
按照我的上一篇文章,我正在使用稳健拟合离群值 - 默认功能是筛选高/低离群值,平均值+/-6 西格玛。
对于某些项目,我们只需要筛选平均值+6西格玛之外的异常值(例如泄漏项目,低就好)。
谁能告诉我如何仅对平均值 + 6 西格玛使用稳健拟合离群值?
谢谢