R/train_conv_1d_with_glove.R
train_conv1d_with_glove.Rd
Train 1-dimensional Convolution Network using keras on the given dataset using Glove Embeddings available here - (https://nlp.stanford.edu/projects/glove/)
data | the sentiment140 train dataset with |
---|---|
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. |
glove_file_path | File path location for glove embeddings. |
model_save_path | File path location for saving model. |
plot of the training operation showing train vs validation loss and accuracy.
# NOT RUN { data(sentiment140_train) train_conv1d_with_glove(glove_file_path = "./glove.6B.100d.txt", model_save_path = "./train_glove_conv_1d.h5") # }