Sentiment Analysis Lexicon Based Approach

Reference of this query:
=> Example Workflow # 26_Sentiment Analysis Lexicon Based Approach
=> Specifically about the Calculate Score Metanode
Inside this Metanode there are two Nodes that are generating Sentiment Prediction and Document Class.
The “Rules Engine” returns a Sentiment Prediction.
Then there is “Category to Class”.
Questions
[a] Why do we need two Nodes? The Rules Engine is already generating a Sentiment Prediction.
[b] In some Documents the Document Class output is different from Sentiment Predicted. How does the Category to Class match Document to a Class?

Thanks,
Sasa

Category To Class extracts the meta information Category from the Document cell. It corresponds to the observed class and not to the predicted class. Obviously, in a real application, the observed class is not produced automagically in KNIME but it is typically the result of some manual or human classification.

Hence, the difference between the two columns. The Scorer node can be used to compare both columns in order to assess the quality of a classifier.

Hello @Geo, Wish you a great 2019
Thanks for your response.

I spent 2 days on this. Just want to be sure. Please confirm if this understanding is correct.

In the Example Workflow on Sentiment Analysis, the input documents have a field which has the POS or NEG values. They are mapped in the “Strings to Document” node to the Category and the same value should be picked up in the end of the workflow by the Category to Class Node as Document Class. That is compared against Predicted Class by the Scorer Node.

Thanks,
Sasa

Correct, though the accurate wording is to compare the predicted class (classifier) against the observed class (reference). In the Scorer node, the first column is for the observed class, the second for the predicted.

:grinning:
Thanks

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