train_lstm: Train LSTM model

Description Arguments Value Examples

Description

Train LSTM model using keras on the given dataset

Arguments

data

the sentiment140 train dataset with text for text of the tweet and polarity for polarity.

max_words

Maximum number of words to consider using word frequency measure.

maxlen

Maximum length of a sequence.

embedding_dim

Output dimension of the embedding layer.

epochs

Number of epochs to run the training for.

batch_size

Batch Size for model fitting.

validation_split

Split ratio for validation

lstm_units

Number of units i.e. output dimension of lstm layer.

seed

Seed for shuffling training data.

model_save_path

File path location for saving model.

Value

plot of the training operation showing train vs validation loss and accuracy.

Examples

1
2
3
4
5
## Not run: 
  data(sentiment140_train)
  train_lstm(model_save_path = "./train_no_glove_lstm.h5")

## End(Not run)

adityamangal410/deepSentimentR documentation built on June 3, 2019, 6:15 p.m.