I'm using predict on my random forest and nnet model and there will be a few values missing from the final predictions.
predict(psm_list_item$pmod, test_pac, type = 'prob')$yes i=which(is.na(psm_pred)) return(data.frame(pred=psm_pred[-i], truth=psm_truth[-i]))
This does not work because the length of psm_pred is 6744 but the labels/truth is length 6748. I don't know if there's a way to match up the predicted probabilities with the truth this way, because it could be any 4 in the truth that could correspond to the missing predictions. Has anyone dealt with this?