Icon

kn_​example_​08_​sentiment_​analysis_​deep_​learning

Sentiment Analysis (with Conda Environment propagation for Keras)
Define Network Preprocessing Training and Predicting Evaluation Sentiment Analysis on IMDB movie reviews This workflow shows how to train a simple neural network for text classification, in thiscase sentiment analysis. The used network learns a 128 dimensional word embeddingfollowed by an LSTM.adapted from: Sentiment Analysis on IMDB movie reviews (by kathrinmelcher)https://kni.me/w/NHJpmqsAJ3Ib-thH these nodes should make sure you have a running Keras / Deep Learning ready Pythonenvironment in Windows or MacOSX train for 3 epochswith AdamApply DictionaryWrite modelkeras.conda.environmentknime_py_keras=> for MacOS environmentShape: max number of words per documentsInput: # word in dictionary+2128 unitsActivation function:sigmoidpredict testdataimdb.tableReadDictionary.tablekeras.conda.environmentknime_py_keras_win=> for Windows environment Strings To Document Keras NetworkLearner Dictionary Replacer Extract Prediction Scorer (JavaScript) Partitioning Keras NetworkWriter Zero Padding Truncation Reduce dictionary Define document anddictionary size Conda EnvironmentPropagation Keras Input Layer Keras EmbeddingLayer Keras LSTM Layer Keras Dense Layer Keras NetworkExecutor Table Reader Table Reader Conda EnvironmentPropagation Merge Variables Define Network Preprocessing Training and Predicting Evaluation Sentiment Analysis on IMDB movie reviews This workflow shows how to train a simple neural network for text classification, in thiscase sentiment analysis. The used network learns a 128 dimensional word embeddingfollowed by an LSTM.adapted from: Sentiment Analysis on IMDB movie reviews (by kathrinmelcher)https://kni.me/w/NHJpmqsAJ3Ib-thH these nodes should make sure you have a running Keras / Deep Learning ready Pythonenvironment in Windows or MacOSX train for 3 epochswith AdamApply DictionaryWrite modelkeras.conda.environmentknime_py_keras=> for MacOS environmentShape: max number of words per documentsInput: # word in dictionary+2128 unitsActivation function:sigmoidpredict testdataimdb.tableReadDictionary.tablekeras.conda.environmentknime_py_keras_win=> for Windows environment Strings To Document Keras NetworkLearner Dictionary Replacer Extract Prediction Scorer (JavaScript) Partitioning Keras NetworkWriter Zero Padding Truncation Reduce dictionary Define document anddictionary size Conda EnvironmentPropagation Keras Input Layer Keras EmbeddingLayer Keras LSTM Layer Keras Dense Layer Keras NetworkExecutor Table Reader Table Reader Conda EnvironmentPropagation Merge Variables

Nodes

Extensions

Links