Icon

08_​Sentiment_​Classification_​Using_​Word_​Vectors

Sentiment Classification using Word Vectors

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

Sentiment Classification using Word Vectors This example shows how to perform sentiment classification using wordvectors. Training / test setScore decisiontree modelTransformation of strings to documentsRead IMDb reviewsfrom CSV fileselect alldocument vectorsReduce Word Vectorsto two dimensionsVisualize DocumentVectorsTrain document vectorswith 200 dimensionsTrain PredictiveModelCreate Predictions Partitioning Scorer Document Creation File Reader Row Filter Joiner Category To Class PCA (deprecated) Split CollectionColumn Scatter Plot Color Manager Word2Vec Learner VocabularyExtractor Random ForestLearner Random ForestPredictor Sentiment Classification using Word Vectors This example shows how to perform sentiment classification using wordvectors. Training / test setScore decisiontree modelTransformation of strings to documentsRead IMDb reviewsfrom CSV fileselect alldocument vectorsReduce Word Vectorsto two dimensionsVisualize DocumentVectorsTrain document vectorswith 200 dimensionsTrain PredictiveModelCreate PredictionsPartitioning Scorer Document Creation File Reader Row Filter Joiner Category To Class PCA (deprecated) Split CollectionColumn Scatter Plot Color Manager Word2Vec Learner VocabularyExtractor Random ForestLearner Random ForestPredictor

Nodes

Extensions

Links