JSL - 二変量を反復処理し、すべてのスプラインを 1 列に保存する方法こんにちは。列の 1 つで見つかったさまざまな値を含む文字列の配列を作成しました。 文字列の配列内のすべての値に対してスプラインを生成し、すべての予測点を新しい列に保存したいと考えています。Bivariate() を反復処理して、反復ごとに where 句を文字列配列内の新しい値に変更することはできますが、新しい列に保存されるのは最後の予測点のみです。すべての予測ポイントを新しい列に保存するにはどうすればよいですか?ありがとう。
Proc = "new";
processArray = {};
DataCV=open("C:\Desktop\JMP\sample_data.csv");
for (l = 1, l < 32521, l++, // Generate array of strings
if (proc == (Row()=l; :process),
print("same process"),
Insert Into(processArray, (Row()=l; :process)); proc = (Row()=l; :process); Show(proc)
);
);
for (n = 1, n <= length(processArray), n++, // Generate and save multiple predicteds
biv = Bivariate(
Y( :c_mm_deembed_pf ),
X( :v_dut_volt ),
Where( :c_type == "Cdg" & :process == processArray[n] ),// :process == processArray[n] appears to be working, as 6 splines are generated
Fit Spline( 0.1, standardized, {save predicteds}) // {save predicteds} is not saving all 6 splines, only last spline
);
); 

Re: JSL - 二変量を反復処理してすべてのスプラインを 1 列に保存する方法同じ列内のすべての予測を取得するには、By() ロールを試してください。 リストに対する反復は必要なくなり、生成された予測式は条件付きステートメントを自動的に適用して、by-column のさまざまな値を分離します。 主な違いは、すべてのプロットが同じウィンドウを共有することです。
DataCV = Open("C:\Desktop\JMP\sample_data.csv");
DataCV << biv = Bivariate(
Y(:c_mm_deembed_pf),
X(:v_dut_volt),
By(:process),
Where(:c_type == "Cdg"),
Fit Spline(0.1, Standardized, {Save Predicteds})
);Re: JSL - 二変量を反復処理してすべてのスプラインを 1 列に保存する方法@txnelson 、
おっと。 私はこの後の投稿を見ていないので、以前の質問に Substitute の代わりに Eval Expr を使用して回答しました。
返信を重複するつもりはありませんでした。
ごめんなさい、ジム。
Re: JSL - 二変量を反復処理してすべてのスプラインを 1 列に保存する方法そして、Predicted 列の Predicted 式についてもう一度考えたところ、使用しているプロセスが処理中に相互に重ねて書き込まれていくことに気付きました。二変量を実行するたびに Prediced 列の名前を変更し、反復ごとに強制的に新しい列を作成することをお勧めします。
Re: JSL - 二変量を反復処理してすべてのスプラインを 1 列に保存する方法これは、スクリプトに注釈を付けて再加工したバージョンです。やってみて。あなたのデータでもうまくいくと思います。テストはうまくできませんでしたが、エラーは軽微なものであるはずです
Names Default To Here( 1 );
Proc = "new";
processArray = {};
DataCV = Open( "C:\Desktop\JMP\sample_data.csv" );
// In the commented area is a reworked version of your code that I believe
// simplifies the syntax of what you were doing. Please review it and see
// what changes I made.
/*for (l = 1, l <= N Rows(DataCV) , l++, // Generate array of strings
if (proc == :process[l],
print("same process")
,
Insert Into(processArray, :process[l]);
proc = :process[l];
Show(proc)
);
);*/
// The summarize() function is a much faster way to get the values found for
// a spcific column or combination of columns
Summarize( DataCV, processArray = By( :process ) );
For( n = 1, n <= Length( processArray ), n++, // Generate and save multiple predicteds
// I found that using a JSL variable in the where clause was having issues, because the formula
// created for the Predicted values contains a reference to PredictedArray, which JSL Variable can change,
// which makes the formula invalid. So what needs to be done, is to subsitute the actual value for
// predictedArray[n] into the Where Clause
Eval(
Substitute(
Expr(
biv = Bivariate(
Y( :c_mm_deembed_pf ),
X( :v_dut_volt ),
Where( :c_type == "Cdg" & :process == __process__ ), // :process == processArray[n] appears to be working, as 6 splines are generated
Fit Spline( 0.1, standardized, {save predicteds} ) // {save predicteds} is not saving all 6 splines, only last spline
)
),
Expr( __process__ ), processArray[n]
)
)
);