/1DCNN

Matching a regular expression using a 1Dimensional CNN

Primary LanguageJupyter Notebook

1DCNN

Matching a regular expression using a 1Dimensional CNN

Procedure

  1. Generating strings of length 15 over the alphabet a, b, c, d
  2. Labeling strings basing on matching a 5-element regular expression
  3. Balancing dataset of size 10000 so that approximately half of the dataset contains regex-matching parts.
  4. Preparing data for training using one-hot encoding
  5. Dividing dataset into training and testing parts.
  6. Implementing and training a model consisting of one convolutional layer with one filter followed by one fully-connected layer and train it to classify strings. After training, examining the values of the filter
  7. Implementing and training more complex models (more filters, layers) and analyze their performance on the prepared dataset.