如何取得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);