error: Error in eval(predvars, data, env) : object 'kimijima_pls' not found
the logsTest.ngram.tfidf.df dataframe does not even have that object . Even the logsTrain.ngram.tfidf.df doesnot have it which is used for making the model rf.cv1
i have used regular expressions to remove words like [.kimi.] and hence it doesnt show in colnames of logsTrain.ngram.tfidf.df and logsTest.ngram.tfidf.df
As I understand it, this error arises when the predict function doesn't know the source of the test data variable to be tested against. I have no way, of course, of knowing how it decided that kimilma_pls was the object it decided it was looking for. In any event look at the signature for predict: it wants at least the name of the model and it will take additional arguments specifying the specific types of prediction.
The rf.cv1 is the model created using randomForest method which is made using the logsTrain.ngram.tfidf.df
The logsTest.ngram.tfidf.df is the test data which has been cleaned in the same way as the training data (logsTrain.ngram.tfidf.df)
Also the same colnames are present in both logsTrain and logsTest.ngram.tfidf.df ,and kimijima_pls not there in either.
Could you please turn this into a self-contained reprex (short for reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.
If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.