Created
June 10, 2016 20:54
-
-
Save adamcone/c8c5770e3b1eecceb539f37616f856e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
predict_function_full = function(test.obs){ | |
obs.NAs = sum(is.na(test.obs)) | |
if(obs.NAs == 0){ | |
return(predict(M0.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
else if(obs.NAs == 1){ | |
return(predict(M1.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
else if(obs.NAs == 7){ | |
return(predict(M7.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
else if(obs.NAs == 8){ | |
return(predict(M8.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
else if(obs.NAs == 10){ | |
return(predict(M10.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
else{ | |
return(predict(M11.svm.full, test.obs[-1], probability = TRUE, na.rm = TRUE)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment