你好!
我是 JMP 的新用户。我正在使用学生试用版,想使用 JSL 脚本进行 RSM 设计。以下是我的进度……
Names Default To Here( 1 );
// Here are the factors and the ranges
factors = {
{"X1", 0, 1, "Continuous"},
{"X2", 0, 1, "Continuous"},
{"X3", 0, 1, "Continuous"}
};
rsm = DOE( Response Surface Design );
// Add a response
rsm << AddResponse( Minimize, "Y");
// Add the factors. We will need to overwrite the defaults
// overwrite the two built‑ins
For( i = 1, i <= Min( N Items( factors ), 2 ), i++,
rsm << Change Factor Settings( i, factors[i][2], factors[i][3], factors[i][1] );
);
// add any remaining
For( i = 3, i <= N Items( factors ), i++,
rsm << Add Factor( Continuous, factors[i][2], factors[i][3], factors[i][1], 0 );
);
rsm << Set Random Seed( 30624700 );
rsm << Make Design( 2 );
rsm << Set Axial Choice( 4 );
rsm << Center Points( 0 );
rsm << Make Table;
dt = Current Data Table();
// Set the response here
yvals = { 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76};
dt:Y << Set Values( yvals );
///////////////////////////
/////// Fit the RSM ///////
///////////////////////////
// Fit the RSM
fm = dt << Fit Model;
fls = fm << Run;
我已经获取了包含因子的数据表并插入了一些虚拟 yval。我可以拟合二次模型并运行它。我似乎得到了某种报告对象,但我想使用“预测分析器”、“最大化可取性”和“记住”最优值。我想将这些建议的最优因子添加到数据表中。这些关键词都可以在脚本索引中找到,但我不知道如何在 JSL 中实现它。
任何帮助都将不胜感激!非常感谢。
我认为你需要找到对分析器平台的引用。你可以找到对预测分析器轮廓框的引用,然后使用<<获取可脚本化对象
profiler_ob = (Report(fls) << XPath("//OutlineBox[@helpKey='Profiler']"))[1];
pf = profiler_ob << Get Scriptable Object;
您还应该能够通过报告订阅获取参考
profiler_ob = Report(fls)[OutlineBox("Prediction Profiler")];
pf = profiler_ob << Get Scriptable Object;
之后,您可以像使用 Profiler 对象一样使用 pf,例如
pf << Maximize Desirability;