명목상의 로지스틱 회귀 (logistic regression)를 위해 데이터의 일부분을 분할하고 모델링 (예 : 유효성 검사)하는 방법은 무엇입니까?
JMP Pro는 이러한 어려움을 없애지 만 여기서는 JMP Pro에서 파티션을 만드는 기능을 모방하는 방법이 있습니다. partitons를 사용하는 것은 여전히 꽤 수동적입니다. Val과 테스트 세트를 숨기거나 제외하여 교육 데이터에 모델을 맞춘 다음 사용중인 플랫폼의 저장된 예측 공식을 사용하여 val 및 테스트 세트의 교육 모델로 예측할 수 있습니다.
dt = Current Data Table();
n_rows = N Row(dt);
//determine proportions for training and validation sets (test is whatever is left over)
train_prop = 0.7;
val_prop = 0.15;
test_prop = 1-train_prop-val_prop;
//randomly shuffle row numbers
rows_shuffled = random shuffle(1::n_rows);
//determine precise number of data points for each partition
n_train = floor(train_prop*n_rows);
n_val = ceiling(val_prop*n_rows);
n_test = n_rows - n_train - n_val;
//obtain the desired data points for the partitions
train_rows = rows_shuffled[1::n_train];
val_rows = rows_shuffled[(n_train+1)::(n_train+1+n_val)];
test_rows = rows_shuffled[(n_rows-n_test)::n_rows];
//Create the partition column
partition_col = dt << New Column("Partition", numeric, nominal); //use partition_col just in case a Partition column already exists and the new column gets a name like "Partition 2"
//mimic JMP Prop underlying numeric values
partition_col[train_rows] = 1;
partition_col[val_rows] = 2;
partition_col[test_rows] = 3;
//Add value labels
partition_col << Add Column Properties({Value Labels( {"." = "Other", 1 = "Training", 2 = "Validation", 3 = "Test"} ),
Use Value Labels( 1 )});방금 정리해 봤지만 교육 및 검증 비율을 묻는 대화 상자가있는 앱으로 쉽게 만들 수 있습니다. 보기> 사용자 정의> 메뉴 및 도구 모음을 통해 해당 응용 프로그램의 스크립트를 메뉴 또는 도구 모음에 추가하면 정말 편리 할 수 있습니다.
저항이 가장 적은 경로는 JMP Pro와 유효성 검사 열 만들기 유틸리티를 사용하는 것입니다. 아마도 응답 변수 세트를 분할하기 위해 stratify 무작위 옵션을 사용해보십시오. 그런 다음 실제로 플랫폼을 시작할 때 모델에 맞는 플랫폼 시작 창의 유효성 검사 창에 열 이름을 입력해야합니다.