如何获取AUC值我正在尝试从逻辑回归输出中获取 AUC 值并将其写入表中。 到目前为止,我的脚本返回一个空白值而不是 0.62937,如下面的输出所示。 数据表已正确创建,并且“拟合模型”命令运行。 最后一行有错误吗? 我正在遵循本论坛另一篇文章中的示例,但我怀疑我的旧版本 JMP(版本 9.0)可能存在问题。
Names Default To Here( 1 );
// Open data table
dt = Open( "sample.jmp" );
// Create an output data table for the results
MyTable = New Table( "Results", New Column( "AUC" ) );
// Add a new row to the output data table
MyTable << Add Rows( 1 );
// Run Fit Model
MyResult = dt << Fit Model(Y( :case ),Effects( :weight ),Personality( Nominal Logistic ),Run(Positive Level( "1" ),Likelihood Ratio Tests( 1 ),ROC Curve( 1 ),));
// Add the AUC to the data table by grabbing it from the display report output
MyTable:AUC = (Report( MyResult )["Receiver Operating Characteristic"][Number Col Box( 1 )] << get [1]);


自动化和脚本编写回复:如何获取AUC值AUC 的条目看起来不像 Number Col Box()。您使用的 JMP 版本是什么?它在什么操作系统上运行?
它看起来更像一个文本框。
在我在不同版本的 JMP 上运行时,我没有看到您显示的 AUC 的格式。
回复:如何获取AUC值我在 Windows 11 上使用 JMP9.0.0。 如果我将最后一行更改为:
MyTable:AUC = (Report( MyResult )["Receiver Operating Characteristic"][TextBox(6)] << get text );
然后返回字符串“Area Under Curve =”作为变量“AUC”的结果。 这是树结构的一部分。 我正在尝试提取 NumberBox(1) 中的值。

回复:如何获取AUC值尝试将尾随“)”移动到子字符串引用“[1]”之前
:AUC = (Report( MyResult )["Receiver Operating Characteristic"][Number Col Box( 1 )] << get )[1];
回复:如何获取AUC值感谢您的帮助,txnelson! 最终,这就是有效的:
Names Default To Here( 1 );
// Open data table
dt = Open( "sample.jmp" );
// Create an output data table for the results
MyTable = New Table( "Results", New Column( "AUC" ) );
// Add a new row to the output data table
MyTable << Add Rows( 1 );
// Run Fit Model
MyResult = dt << Fit Model(Y( :case ),Effects( :weight ),Personality( Nominal Logistic ),Run(Positive Level( "1" ),Likelihood Ratio Tests( 1 ),ROC Curve( 1 ),));
// Add the AUC to the data table by grabbing it from the display report output
MyTable:AUC = (Report( MyResult )["Receiver Operating Characteristic"][numberbox(1)] << get text);