大家好,
例如,我注意到分发平台似乎不像图形生成器那样接受列引用。
我有代码使用 Column(dtname, number) 格式引用数据表中的不同列。 例如,这是我用 GB 执行的一段代码,它工作得很好:
Graph Builder(
Size( 500, 350 ),
Show Control Panel( 0 ),
Variables(
X( Column( dt_results, NNxcol ) ),
Y( Column( dt_results, NNYCol + N Items( NNXList ) ) ),
Y( Column( dt_results, NNYCol + 1 + N Items( NNXlist ) ), Position( 1 ) ),
Y( Column( dt_results, NNYCol + 2 + N Items( NNXList ) ) )
),
Elements(
Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 9 ) )
),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 10 ) ), Smoother( X, Y, Legend( 11 ) ) ),
SendToReport(
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( NNYList[NNYCol] || " Stats vs. " || NNXList[NNxcol] )}
),
Dispatch( {}, "Y title", TextEditBox, {Set Text( NNYList[NNYCol] || " Train & Valid" )} )
)
)
但是,当我尝试在分发平台中执行类似的操作时,没有任何反应,我认为这是因为 Continuous Distribution() 调用似乎不喜欢以这种方式引用列。 它似乎喜欢将列引用为 Column(列名称)。
Distribution(
Continuous Distribution( Column( dt_results, NNYCol + NNcolshift ), Quantiles( 0 ) ),
Continuous Distribution( Column( dt_results, NNYCol + 1 + NNcolshift ), Quantiles( 0 ) ),
Continuous Distribution( Column( dt_results, NNYCol + 2 + NNcolshift ), Quantiles( 0 ) )
)
我想在调用平台时使用变量,因为它在代码中更灵活,而不是在列名称本身中进行硬编码。 知道为什么分发平台的行为不同或者如何正确引用该列以便获得预期的输出吗?
任何想法/评论表示赞赏。
谢谢!,
DS