こんにちは!
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;
因子を含むデータテーブルを取得し、ダミー変数をいくつか挿入するところまで進みました。二次モデルを当てはめて実行することはできます。何らかのレポートオブジェクトが生成されるようですが、「予測プロファイラ」、「望ましさの最大化」、「最適値を記憶」といった機能を使いたいと思っています。そして、提案された最適因子をデータテーブルに追加したいのです。これらのキーワードはすべてスクリプトインデックスに記載されているのですが、JSLでどのように動作させるのか分かりません。
何か助けていただけると大変助かります!本当にありがとうございます。
プロファイラープラットフォームへの参照を見つける必要があると思います。Prediction Profilerのアウトラインボックスへの参照を見つけて、<< Get Scriptable Object を使うことで可能です。
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;