I’m new to KNIME and this is my really first workflow created.
I just trained a workflow for sentiment analysis based on the imdb reviews, and when I want to use this trained workflow for test purpose, I get this error “the table for prediction does not contain the column xxx”.
For the test use, I get the model for predictor from the logistic regression learner node and I inuput it in the logistic regression predictor node with my excel file for test.
Is this possible to bypass this error, or is it just me that done something wrong. Thanks for your help
Hello, this error sounds like it’s related to standards of machine learning where the model trained only accepts input data with the exact same columns used during training.
If you train with columns a, b, and c, then you must pass data into the predictor with columns a, b, c (you cannot add or remove columns. Otherwise, the model will not be able to make predictions).
Please feel free to share your workflow and data if that does not answer your question.
To expand on what Victor already posted, this particular case sounds like a job for the Document Vector Applier node.
Check out this example workflow (which also uses the IMDB reviews):
Hi @victor_palacios, @ScottF
Here goes my workflows but without the data because they are seem to be too big to upload. Tha data I used are from the tensorflow page for imdb reviews.
Text_Processing_v2.knwf (2.9 MB)
I will check out the workflow you shared in hope I understand the problem.
Thanks to you two
Thanks @ScottF for the workflow, it really helped me to find a solution and I can now do my training and testing phases.
But now I would like to know how can I use this workflow to determining unlabeled data.
Thanks in advance
Something like this may help:
Not all of this is relevant for you - the important concept is using Model Reader nodes to import both the feature space of the training set, as well as the model itself. You can of course set these aside and save them in your training workflow using Model Writer nodes as appropriate.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.