Re : 열의 AUC를 그래프가 아닌 단일 값으로 반환하는 방법은 무엇입니까?다음은 수행하려는 작업을 수행하는 간단한 예입니다.
Names Default To Here( 1 );
// Open and example data table
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Get the columns to be analyzed
colNamesList = dt << get column names( string, continuous );
// Create a data table to save the results to
dtOutput = New Table( "Results", New Column( "Column", character ), New Column( "AUC" ) );
// Loop across all of the columns to be analyzed and retrieve the AUC
For( i = 1, i <= N Items( colNamesList ), i++,
// Add a new row to the output data table
dtOutput << Add Rows( 1 );
// Add the active variable name to the current row in the data table
dtOutput:Column[i] = colNamesList[i];
// Run the Logistic Regression
theLog = dt << Logistic( invisible, Y( :sex ), X( Column( colNamesList[i] ) ), Positive Level( "F" ), ROC Curve );
// Add the AUC to the data table by grabbing it from the display report output
dtOutput:AUC = (Report( theLog )["Receiver Operating Characteristic"][Number Col Box( 1 )] << get)[1];
// Close the report window
Report( theLog ) << close window;
);
Re : 열의 AUC를 그래프가 아닌 단일 값으로 반환하는 방법은 무엇입니까?완전한!
정말 고마워!
마크
Re : 열의 AUC를 그래프가 아닌 단일 값으로 반환하는 방법은 무엇입니까?내 첫 번째 질문은, 내가 제공 한 스크립트가 어떻게 작동하는지 이해합니까? 간단한 예는 실제 데이터와 함께 작동한다는 가정하에 제공되지 않았습니다. 핵심은
dtOutput:AUC = (Report( theLog )["Receiver Operating Characteristic"][Number Col Box( 1 )] << get)[1];
JMP 가이 코드 줄에서 작동하는 열과 그렇지 않은 열을 표시하는 방식에 다른 것이 있다고 가정합니다. 차이점을 수동으로 살펴보고 차이점을 파악한 다음 코드를 조정하여 두 경우를 모두 처리하는 것이 좋습니다. 그리고 처리해야 할 두 가지 이상의 사례가있을 수 있습니다.
열의 AUC를 그래프가 아닌 단일 값으로 반환하는 방법은 무엇입니까?다음을 사용하여 AUC 값을 포함하는 ROC 곡선을 생성 할 수 있습니다.
기본 이름은 여기 (1); Open ( "RESULTS.jmp"); 물류 (Y (: IsDef), X (: Interest), 양수 레벨 (0), ROC 곡선);
그래픽 곡선이 생성됩니다. 80 개의 열이있는 테이블이 있고 각 열의 AUC 값을 계산하고 단순히 숫자 값으로 반환하려고합니다. 그래픽 표현을 생성하고 싶지 않습니다. 시트 자체에서 사용할 수있는 수식이 있습니까?
도움을 주셔서 감사합니다.
마크
Re : 열의 AUC를 그래프가 아닌 단일 값으로 반환하는 방법은 무엇입니까?감사! 훌륭한 솔루션으로 보이지만 75 개 중 23 개만 처리합니다.
가치. 스크립트는 디버깅 오류없이 완전하고 성공적으로 실행됩니다.
아직 수동으로 처리 할 수있는 숫자 열을 처리하지 못합니다.
왜 그런지 알아?
실행중인 스크립트는 다음과 같습니다.
Names Default To Here( 1 );
// Open and example data table
dt = Open( "RESULTS3.jmp" );
// Get the columns to be analyzed
colNamesList = dt << get column names( string, continuous );
// Create a data table to save the results to
dtOutput = New Table( "AUCResults", New Column( "Column", character ), New Column( "AUC" ) );
// Loop across all of the columns to be analyzed and retrieve the AUC
For( i = 1, i <= N Items( colNamesList ), i++,
// Add a new row to the output data table
dtOutput << Add Rows( 1 );
// Add the active variable name to the current row in the data table
dtOutput:Column[i] = colNamesList[i];
// Run the Logistic Regression
theLog = dt << Logistic( invisible, Y( :isDef ), X( Column( colNamesList[i] ) ), Positive Level( "0" ), ROC Curve );
// Add the AUC to the data table by grabbing it from the display report output
dtOutput:AUC = (Report( theLog )["Receiver Operating Characteristic"][Number Col Box( 1 )] << get)[1];
// Close the report window
Report( theLog ) << close window;
);
도움을 주셔서 감사합니다!
베스트,
마크