Creating an E-Commerce Product Category Classifier using Deep Learning — Part 2

Problem Description :

Machine Learning Pipeline :

Fig 1. The machine learning pipeline for the category prediction task.
  1. Binary classification: This strategy divides the problem into several independent binary classification tasks. It resembles the one-vs-rest method, but each classifier deals with a single label, which means the algorithm assumes they are mutually exclusive.
  2. Multi-class classification: The labels are combined into one big binary classifier called powerset. For instance, having the targets A, B, and C, with 0 or 1 as outputs, we have A B C -> [0 1 0], while the binary classification transformation treats it as A B C -> [0] [1] [0].

Data Splitting

Fig 2. A mathematical explanation of TF-IDF

Binary Classification Technique :

Fig 3. Snippet showing individual accuracy/ROC of individual product classification model and finally accuracy/ROC of the overall model.
Fig 4. Predictions on a few samples, we can observe how it predicts Samsung as cell phone, Duracell battery as houseware.

Deep Learning-Based Models :

Fig 5. Simple neural net-based multi-classification product category prediction model
Fig 6. Performance tracking for neural net model
Fig 7. Prediction by the neural net multi-classification model, we can observe how it has classified Kung Fu Panda as a Video Game which is quite well.
Fig 8. Conv neural net-based multi-classification product category prediction model
Fig 9. Performance tracking for conv neural net model
Fig 10. LSTM + Glove neural net-based multi-classification product category prediction model
Fig 11. Performance tracking for LSTM + Glove neural net model
GET /product/categoryPrediction
{
"name":"product name",
"description":"product description"
}
Fig 12. Final prediction from LSTM+Glove based model as a product category classifier.

--

--

--

Data Scientist | Learner | Caricaturist | Omnivorous | DC Fanboy

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Linear Regression with TensorFlow Canned Estimators

A brief introduction to reinforcement learning

Using KMeans Clustering to detect DDos attacks on web server

Credit Card Fraud Detection

10 Python image manipulation tools

Optimizing models and controllers for distributed energy resources

Improving the performance and speed of Deep Learning Pipelines in TensorFlow

Superfast Data Science workload with Intel AI Analytics Toolkit

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Prakhar Gurawa

Prakhar Gurawa

Data Scientist | Learner | Caricaturist | Omnivorous | DC Fanboy

More from Medium

A comparison of sentiment analysis techniques targeting cheap POC deployment on Azure ML

Quora Question pair similarity Problem (Identify which questions asked on Quora that have already…

Keyword Selection – Supervised versus Unsupervised – Futuristic view