El código siguiente inicia la plataforma Bivariate y luego guarda los valores predichos en una columna. Esto funciona bien. Sin embargo, me gustaría personalizar el nombre de la columna para guardar los valores predichos. La Guía de secuencias de comandos sugiere enviar mensajes anidados, pero no puedo lograr que funcione.
Entonces las preguntas son...
1) ¿Es posible personalizar el nombre de la columna Guardar Predicciones dentro de las opciones de la plataforma?
2) Si no, ¿cómo capturo el nombre para poder personalizarlo en los pasos siguientes?
Muchas gracias por cualquier ayuda que alguien pueda brindar.
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 );Una opción un poco más genérica es utilizar matrices asociativas. Por ejemplo, si ajusta modelos a múltiples Y al mismo tiempo, terminará con múltiples columnas.
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);
);