Closed drisso closed 8 years ago
if( !is.null(batch) | !any(!is.na(batch)) ){ KNN_BATCH = mean(attributes(knn(train = proj[!is.na(batch),],test = proj[!is.na(batch),],cl = batch[!is.na(batch)], k = eval_knn,prob = TRUE))$prob) }else{ KNN_BATCH = NA }
fails when batch=NULL because !any(!is.na(NULL)) is TRUE
BTW !any(!is.na(batch)) should be all(is.na(batch))
Fixed in develop
fails when batch=NULL because !any(!is.na(NULL)) is TRUE