PyCon Portugal 2022

Building and Optimizing a Multiclass Text Classifier using Keras
2022-09-24 –, Workshops

Natural Language Processing (NLP) is one of the most exciting fields in Machine Learning and AI. In this beginner-friendly workshop, I will introduce Keras as a Python library for applying NLP techniques on a multi-label emotion classification dataset and present how to use it to build a deep learning classifier. Besides, I will also compare and demonstrate how applying NLP techniques improve the predictability of a model and then, tune a neural network using Keras Tuner to boost the overall model performance.


Natural Language Processing (NLP) is one of the most exciting fields in Machine Learning and AI. In this beginner-friendly workshop, I will introduce Keras as a Python library for applying NLP techniques on a multi-label emotion classification dataset and present how to use it to build a deep learning classifier. Besides, I will also compare and demonstrate how applying NLP techniques improve the predictability of a model and then, tune a neural network using Keras Tuner to boost the overall model performance. The complete agenda is as outlined below:

  1. Introduction to Tokenization
    - Keras tokenizer
    - Padding and Truncating
  2. Introduction to Neural Network and brief overviews of
    - Fully Connected Layer
    - Embedding Layer
    - Dropout Layer
    - Long Short Term Memory (LSTM)
  3. Model Training
    - Early Stopping
    - Checkpoints and Callbacks
    - Model Compilation
  4. Model Evaluation
    - Training and Validation Loss
    - Reading a Multi-class Classification Report
    - Confusion Matrix
  5. Model Improvement
    - Cleaning and Normalizing Text Data
    - Model Compiling Strategy
    - Data Usage Strategy
    - Optimizing ANN hyperparameters using Keras Tuner

This workshop focuses more on using Keras for NLP, multi-class model evaluation, and model optimization using Keras Tuner than on building ANNs from scratch, however, the basic building blocks will be revised during the session.

Resources Available at: https://github.com/royn5618/Talks_Resources/tree/main/PyConPortugal2022

Data Scientist @ ACI Worldwide | Education Co-Lead @ Women in AI Ireland | Blogger @ Medium | ❤ NLP