0 ×

07_​Sentiment_​Analysis_​with_​Deep_​Learning

Workflow

Sentiment Analysis
deep learningkerastext classificationclassificationlstmembeddingtext analysissequence analysissentiment analysissequence classificationneural networktext processingNLPNatural Language ProcessingPython
Training Deployment Evaluation Sentiment Analysis on IMDB movie reviews This workflow shows how to train a simple neural network for text classification, in this case sentiment analysis. The usednetwork learns a 128 dimensional word embedding followed by an LSTM.This example is adapted from the following Keras example script:https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.pyIn order to run the example, please make sure you have the following KNIME extensions installed:* KNIME Deep Learning - Keras Integration (Labs)You also need a local Python installation that includes Keras. Please refer to https://www.knime.com/deeplearning#keras forinstallation recommendations and further information. PreprocessingHere we load a preprocessed dataset from Kerasbut one could also prepare the data with KNIMETextprocessing. Get all sequencesto same lengthdefine network structuretrain/validation80/20Get all sequencesto same lengthtop trainingbottom testdictionary sizeToo small valuescan decrease modelperformanceToo large valuesresult in too large modelspredict testdatatrain for 3 epochswith Adam Pad or Truncate DL PythonNetwork Creator Partitioning Pad or Truncate Read Data Integer Input DL Network Executor DL Keras NetworkLearner Scorer ROC Curve(JavaScript) Extract Prediction Training Deployment Evaluation Sentiment Analysis on IMDB movie reviews This workflow shows how to train a simple neural network for text classification, in this case sentiment analysis. The usednetwork learns a 128 dimensional word embedding followed by an LSTM.This example is adapted from the following Keras example script:https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.pyIn order to run the example, please make sure you have the following KNIME extensions installed:* KNIME Deep Learning - Keras Integration (Labs)You also need a local Python installation that includes Keras. Please refer to https://www.knime.com/deeplearning#keras forinstallation recommendations and further information. PreprocessingHere we load a preprocessed dataset from Kerasbut one could also prepare the data with KNIMETextprocessing. Get all sequencesto same lengthdefine network structuretrain/validation80/20Get all sequencesto same lengthtop trainingbottom testdictionary sizeToo small valuescan decrease modelperformanceToo large valuesresult in too large modelspredict testdatatrain for 3 epochswith Adam Pad or Truncate DL PythonNetwork Creator Partitioning Pad or Truncate Read Data Integer Input DL Network Executor DL Keras NetworkLearner Scorer ROC Curve(JavaScript) Extract Prediction

Download

Get this workflow from the following link: Download

Nodes

07_​Sentiment_​Analysis_​with_​Deep_​Learning consists of the following 23 nodes(s):

Plugins

07_​Sentiment_​Analysis_​with_​Deep_​Learning contains nodes provided by the following 8 plugin(s):