다음 코드는 Bivariate 플랫폼을 시작한 다음 예측된 값을 열에 저장합니다. 이 방법은 잘 작동합니다. 그러나 예측된 저장 열의 열 이름을 사용자 지정하고 싶습니다. 스크립팅 가이드에서는 중첩된 메시지를 보내는 것을 제안하지만 제대로 작동하지 않는 것 같습니다.
그래서 질문은 다음과 같습니다...
1) 플랫폼 옵션 내에서 예측 저장 열의 이름을 사용자 정의할 수 있나요?
2) 그렇지 않은 경우, 이후 단계에서 사용자 정의할 수 있도록 이름을 어떻게 캡처할 수 있습니까?
누구든지 도움을 주실 수 있다면 정말 감사하겠습니다.
Names Default to Here(1);
// SETUP
dt2 = New Table( "Interpolated Data",
Add Rows( 60 ),
New Column( "Timestamp",
Numeric,
"Continuous",
Format( "m/d/y h:m", 19 ),
Input Format( "m/d/y h:m" ),
Set Values(
[3742070400, 3742070460, 3742070520, 3742070580, 3742070640, 3742070700,
3742070760, 3742070820, 3742070880, 3742070940, 3742071000, 3742071060,
3742071120, 3742071180, 3742071240, 3742071300, 3742071360, 3742071420,
3742071480, 3742071540, 3742071600, 3742071660, 3742071720, 3742071780,
3742071840, 3742071900, 3742071960, 3742072020, 3742072080, 3742072140,
3742072200, 3742072260, 3742072320, 3742072380, 3742072440, 3742072500,
3742072560, 3742072620, 3742072680, 3742072740, 3742072800, 3742072860,
3742072920, 3742072980, 3742073040, 3742073100, 3742073160, 3742073220,
3742073280, 3742073340, 3742073400, 3742073460, 3742073520, 3742073580,
3742073640, 3742073700, 3742073760, 3742073820, 3742073880, 3742073940]
),
Set Display Width( 250 )
),
New Column( "Data",
Numeric,
"Continuous",
Format( "Best", 15 ),
Set Values(
[899.08410644531295, ., ., ., ., ., ., ., 897.38671875, ., ., ., ., ., .,
., 898.518310546875, ., ., ., ., ., ., ., 897.57525634765602, ., ., ., .,
., ., ., 897.38671875, ., ., ., ., ., ., ., 896.63226318359398, ., ., .,
., ., ., ., 896.25506591796898, ., ., ., ., ., ., ., 896.44366455078102,
., ., .]
),
Set Display Width( 250 )
)
);
// RUN PLATFORM
// QUESTION 1: Is it possible to customize the name of the Save Predicteds column within the platform options?
// QUESTION 2: If not, how do I capture the name so I can customize it is subesquent steps?
dt2 << Bivariate( Y( :Data ) , X( :Timestamp ), Fit Spline( 1e-15, {Save Predicteds} ), Invisible );조금 더 일반적인 옵션은 연관 배열을 활용하는 것입니다. 예를 들어 여러 Y에 동시에 모델을 맞추면 여러 열이 생깁니다.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Diabetes.jmp");
original_columns = dt << Get Column Names("String");
obj = dt << Neural(
Y(:Y, :BMI),
X(:Age, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose),
Go
);
obj << Save Formulas;
obj << Close Window;
new_columns = Associative Array(dt << Get Column Names("String"));
new_columns << Remove(Associative Array(original_columns));
new_columns = new_columns << get keys; // Note that these are in alphabetical order
// If the order causes issues, it can be mitigated with some tricks
<BR />// This will rename also the hidden layers which could potentially cause issues
For Each({colname}, new_columns,
Column(dt, colname) << Set Name((dt << get name) || " " || colname);
);