你好!
我是 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;