Sentiment Classification Deployment Error

Hi, i am new to this analytic platform and for the start i am trying to do sentiment classification to review. Can i use the trained model in example 03_Sentiment_Classification to predict new review? How?
*using PMML Reader give me an error because the vector column between new review (new file) and model is not same and give me error Learning column “xxx” not found in input data to be predicted

Help & Thanks You

Hi Leonando,

Welcome to KNIME :slight_smile:

You can use a previously trained model for your data, as long as the table format is the same (the features used and the columns names should be the same for the predictor as they were for the learner).

Maybe check if your data is in the same format as the data for the trained model was.

Best wishes,
Ana

4 Likes

Thanks for your reply,
Thats the problem because the feature and column will be different for different review when it’s converted to document vector.
Is there a way to ignore column or word that isn’t available in the model? Or processing so that the model and predictor have the same feature?

hi Leonando,

If it is possible, you can process in such a way that the data feed in the predictor has the same features as the data that was learned by the learner. What do I mean with “if it is possible”? I mean that it is possible in case your data has similar information to the data used for the learner, but you just need to change the format/extract more fields. That could involve maybe some column renaming, filtering, pivoting, just to name a few operations that can help you achieve this goal. I would only be able to know what to do looking at your workflow.

Do you want to share a minimum reproducible example?

Cheers,
Ana

1 Like

009007_SentimentClassification 4.knwf (1.2 MB)

This is my workflow, i think i know what you mean
I need to filter all column that are not in trained model and vice versa like in this forum: How to handle missing column when using PMML

Hi @leonando

I cannot currently run your workflows as it does not include the data. But I have the feeling you understood what I meant before. If anything, just let me know if you managed to adapt the feature space successfully.

Cheers,
Ana

Thanks it’s already solved :smiley:

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.