Training Models on Imbalanced Text Data

prerequisites
Intermediate Python, Intermediate TensorFlow, Intermediate NLP, Intermediate Deep Learning
skills learned
Data balance through sampling, Generate new corpus with deep learning, Deep Learning for text classification
KC Tung
4 weeks · 5-10 hours per week · ADVANCED
Look inside
In this liveProject, you’ll take on the role of a data scientist working for an online movie streaming service. Your bosses want a machine learning model that can analyze written customer reviews of your movies, but you discover that the data is biased towards negative reviews. Training a model on this imbalanced data would hurt its accuracy, and so your challenge is to create a balanced dataset for your model to learn from. You’ll start by simulating your company’s data by deliberately introducing imbalance to an IMDB (Internet Movie Database) review dataset. You’ll experiment with two different methods for balancing this dataset: using sampling techniques, and generating a new synthetic corpus with deep learning text generation. You’ll build and train a simple machine learning model on each dataset to compare the effectiveness of each approach.
This project is designed for learning purposes and is not a complete, production-ready application or solution.

book resources

When you start your liveProject, you get full access to the following books for 90 days.

project author

KC Tung
KC Tung is an AI architect, machine learning engineer, and data scientist who specializes in delivering AI, deep learning, and NLP models across enterprise architectures. As an AI architect at Microsoft, he helps enterprise customers with use-case driven architecture, AI/ML model development/deployment in the cloud, and technology selection and integration best suited for their requirements. He is a Microsoft certified AI engineer and data engineer. He has a PhD in molecular biophysics from the University of Texas Southwestern Medical, and has spoken at the 2018 O'Reilly AI Conference in San Francisco and the 2019 O'Reilly Tensorflow World Conference in San Jose.

Prerequisites

This liveProject is for intermediate-to-experienced Python programmers. To begin this liveProject, you will need to have hands-on experience with or be familiar with:

TOOLS
  • Basics of scikit-learn
  • Intermediate TensorFlow 2.0 and/or Keras
  • Intermediate NumPy
  • Intermediate pandas
TECHNIQUES
  • Fundamental statistics for classification
  • Basics of gradient descent and SGD
  • Basics of loss functions
  • Basics of back-propagation
  • Basics of overfitting and underfitting
  • Basics of kNN
  • Basics of Gradient Boosted Decision Trees/GBM
  • Basics of classification techniques such as Logistic Regression or SVM
  • Intermediate knowledge of neural networks such as RNN, CNN, and GRU.
  • Basics of Comparing classifiers
  • Basics of of clustering such as Affinity Propagation and Hierarchical Clustering
  • Intermediate knowledge of Natural Language Processing concepts, including embedding, tokenization at word of character level, basic one-hot encoding, and basic handling out-of-vocabulary tokenization
  • Intermediate knowledge of activation functions for ANNs, such as softmax, sigmoid, and RELU
  • Intermediate knowledge of Dropout, Maxpool, and Regularization
  • Intermediate knowledge of multi-layer perceptron

you will learn

In this liveProject, you’ll develop natural language processing skills for machine learning models that can determine the sentiment and meaning of raw text. You’ll also learn useful and easily transferable ML techniques to help classify NLP patterns at scale.

  • Commonly used text processing/cleansing techniques
  • Recommended statistics for model performance and misclassification cost
  • Data balance through sampling
  • Generating new corpus with deep learning
  • Training and testing a deep learning model to classify text

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.

project outline

Introduction

Prerequisites Test

New module

Start Project

1. Data Extraction and Exploration

1.1. Data Extraction and Exploration

Recurrent Neural Net with Keras

Text Embeddings

A Gentle Introduction to Classification

Implementing a Recurrent Neural Network

1.2. Submit Your Work

2. Oversampling

2.1. Does Oversampling Text Work?

2.2. Oversample Positive Reviews

2.3. Build Classification Model

Dictionaries

2.4. Submit Your Work

3. Generate New Corpus

3.1. Generate New Corpus

3.2. Build a Deep Learning Model for Text Generation

3.3. Train the Model

3.4. Generate the Corpus

Two-way Street

LSTM Model Structure

Regular Expressions

3.5. Submit Your Work

4. Training with Generated Corpus

4.1. Generated Corpus as Training Data

4.2. Merge the Generated Corpus

4.3. Build the Machine Learning Model

4.4. Evaluate Model Performance on Holdout Data

4.5. Submit Your Work

Summary

Project Conclusions

FAQs

Look inside

placing your order...

Don't refresh or navigate away from the page.
liveProject $34.99 $49.99 self-paced learning
Training Models on Imbalanced Text Data (liveProject) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.