Introducing Shoppers.ai

Prediction AI for shoppers

Welcome to the Shopping.ai, an artificial intelligence system that predicts whether online shopping customers will complete a purchase. The AI, who I have named Peggy, uses the k-nearest-neighbour classifier, fitted on the training data and is used as the basis for the training model, using the scikit-learn library.

Given information about a user — how many pages they’ve visited, whether they’re shopping on a weekend, what web browser they’re using, etc. — Peggy predicts whether or not the user will make a purchase.

It also won’t be perfectly accurate as a human, but it should be better than guessing randomly. To train your Francisco, the data from a shopping website from about 12,000 users sessions is used (courtesy of Sakar, C.O., Polat, S.O., Katircioglu, M. et al. Real-time prediction of online shoppers’ purchasing intention using multilayer perceptron and LSTM recurrent neural networks.

I hope you enjoy the demo!

How does Peggy work?

The system measures two values: sensitivity (also known as the “true positive rate”) and specificity (also known as the “true negative rate”). Sensitivity refers to the proportion of positive examples that were correctly identified: in other words, the proportion of users who did go through with a purchase who were correctly identified. Specificity refers to the proportion of negative examples that were correctly identified: in this case, the proportion of users who did not go through with a purchase who were correctly identified.

Lessons learned from the project

I learned alot about classifiers and how to train a model with a given data set, using the scikit learn library for Python. You could say this was my small step to the massive and amazing world of AI and machine learning!