Warning while running ensemble code in R


Warning while running ensemble code in R
I am trying to run an ensemble model using the majority vote method. this is the code for it.
pred_majority<-as.factor(ifelse(pred_rf_new=='TRUE' &
model_1_epoch_predict$predict=='TRUE','TRUE',ifelse(pred_rf_new=='TRUE' & ksvm_predict=='TRUE','TRUE',ifelse(model_1_epoch_predict$predict=='TRUE' & ksvm_predict=='TRUE','TRUE','FALSE'))))
Executing the line reverts the following warning.
Warning messages:
1: In pred_rf_new == "TRUE" & model_1_epoch_predict$predict == "TRUE" :
longer object length is not a multiple of shorter object length
2: In model_1_epoch_predict$predict == "TRUE" & ksvm_predict == "TRUE" :
longer object length is not a multiple of shorter object length
Please help me out.
length(pred_rf_new)
length(model_1_epoch_predict$predict)
@G5W yes I did, they are all 999
– Dishant Shetty
2 days ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Did you look at
length(pred_rf_new)
andlength(model_1_epoch_predict$predict)
?– G5W
2 days ago