Icon

Sentiment_Analysis_Training

Sentiment Analysis with LSTM - Training

This workflow shows how to train an LSTM neural network for text classification based on the example of sentiment analysis.

Annotations and comments
  • Training and Predicting
  • Evaluation
  • Define Network
  • Reading and Preprocessing
  • Activation function: sigmoid
  • Input: # word in dictionary + 1 128 units
  • Shape: max number of words per documents
  • Predict test data
  • Train the network
  • Save trained model
  • Overwrite all indexes with default value
  • Generate 8 digit representation
  • Define dictionary size
  • Define index for default vector
  • Top: x most common terms Bottom: rest
  • Apply Dictionary
  • Save dictionary
  • To lower case
  • Remove small words
  • Remove numbers
  • Remove punctuation
  • Do stemming
  • Remove stop words
  • Extract Text
  • Max document size
  • Max number of characters per document = max document size*9
  • Only first x words
  • Truncated document
  • One column for each term
  • Delete superfluous columns
  • Replace missing value with 0
  • Add index from training dictionary
  • Define default value for new terms
  • Sentiment to string
  • Sentiment to number
  • Read input table
  • Probability to prediction
  • Create dictionary
  • Each Term only once

Nodes

Extensions

Links