mercredi 31 août 2016

ML- Random Forest- predict error- (Error in predict.random Forest(modelFit, newdata) : missing values in newdata

I hold in Random forest final Prediction on Test Data

Package : 'randomforest','CARET'

i done the below checks:

  1. Assigned Variables are no missing Values
  2. training and validation sets both are same classes.

TrainControl :

Control1=trainControl(method="cv",number=25,repeats=10,p=0.8)

Train Model:

rf_model1=train(trainig_data[,c("Sex","Pclass","Embarked","SibSp","Parch","Fare")],trainig_data[,c("Survived")],method="rf",trControl=Control1)

test data predict: test_data$Survived=predict(rf_model1,test_data)

Error Message : Error in predict.randomForest(modelFit, newdata) : missing values in newdata

can you please requested you to review above error and Suggest us....




Aucun commentaire:

Enregistrer un commentaire