Millions of people scour e-commerce websites daily. A small fraction of them intend to make a purchase, while others are only window shopping. It is critical for businesses convert these visitors into customers.
This project focuses on converting visitors with purchasing intent into customers. Among the several strategies to convert them are: showing personalized content to them; offering discounts and offers; and sending reminders about products they have viewed.
- Aim
- Data Description
- Data Preprocessing
- Model Building and Evaluation
- Feature Engineering
- Test Evaluation
- Feature Importances
- Feature Selection
- Conclusion
It contains 12330 rows and 18 columns with no missing values. Each row represents a session statistic for a unique visitor.
84.5 percent (10,422) of the 12,330 sessions in the dataset were negative class samples that did not end with shopping, while the rest (1908) were positive class samples that ended with shopping.
The preprocessing steps solely involved scaling numerical features and encoding categorical variables. After training the models on the imbalanced classes, the models perform well in predicting the negative classes but perform poorly on the positive classes: The majority class was undersampled and the models were retrained. The overall performance of the models improved but this technique trades off some performance on the negative classes: New Features were engineered and some categorical features with many unique values ('OperatingSystems','Browser','Region','TrafficType') were target encoded. This resulted in comparable performance to using unengineered features, but with less complexity. The performance on the unseen test set is similar to the validation results on the imbalanced classes but with better recall. However, this trades off some precision The importances of the ExtraTreesClassifier were plotted: The models produced the following test results when trained on the top 5 features Page properties, dwell time and the number of accessed pages can indicate if a visitor would finalize a transaction