This example shows how to perform sentiment classification using word vectors.
In this example, we use IMDb reviews which have either a positive or negative sentiment. First, we transform the raw Strings to documents and assign a unique label to each of them so we can perform Doc2Vec learning which results in one vector per document. In order get an idea about the quality of the document vectors we use a PCA to reduce our 200 dimensional vector space to two dimensions so we can plot the vector representation of each document in a scatter plot. In the View of the JavaScript Scatter Plot one can easily see that the document vectors are divided into two clusters for the two sentiments. Next, we partition our dataset and train a predictive model on the created document vectors to perform classification.
Workflow Requirements
KNIME Analytics Platform 3.3.0
KNIME Deeplearning4J Integration
KNIME Deeplearning4J Integration Text Processing Extension
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.