JSL - 이변량을 반복하고 모든 스플라인을 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() 역할을 사용해 보세요. 그러면 목록에 대한 반복이 필요하지 않으며 생성된 예측 수식은 조건문을 자동으로 적용하여 기준 열의 다른 값을 구분합니다. 주요 차이점은 모든 플롯이 동일한 창을 공유한다는 것입니다.
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개 열에 저장하는 방법그리고 방금 예측 열의 예측 수식에 대해 다시 생각해 보았고 사용 중인 프로세스가 처리될 때 서로 위에 기록된다는 것을 깨달았습니다.이변량을 실행할 때마다 예측 열의 이름을 변경하여 각 반복이 결국 새 열을 생성하도록 하는 것이 좋습니다.
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]
)
)
);