Train 1-dimensional Convolution Network 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

conv1d_filters

Number of filters i.e. output dimension for convolution layers.

conv1d_kernel_size

Window size for convolution layers.

conv1d_pool_size

Pool size for max pooling.

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

# NOT RUN {
  data(sentiment140_train)
  train_conv_1d(model_save_path = "./train_no_glove_conv_1d.h5")
# }