A Predicting-Customer-Revenue Model is a classification model designed to forecast the future revenue that individual customers will generate for a business. I used the Online shopper's purchasing intention dataset from the UCI Machine Learning Repository.
This project is to a predictive model to estimate customer purchase intent and forecast the future revenue generated by online shoppers for our e-commerce platform. this project aims to identify and target high-intent customers while making revenue predictions. The goal is to enhance customer engagement, optimize marketing efforts, and maximize revenue and profitability for our e-commerce business.
I conducted the following stages in the EDA.
Data Overview: It is loading and inspecting the dataset's structure and data types, providing a foundational understanding of the data.
Data Summary: I summarized statistics were computed for numerical features, and unique value counts were generated for categorical attributes, offering a snapshot of the data's distribution and characteristics.
Missing Data Analysis: I search the extent of missing values in the dataset and guided decisions on handling these gaps.
Correlation Analysis: That is examined relationships between numerical features and pinpointed notable associations.
Class Distribution: The target variable provided insights into the balance or imbalance of classes in the classification task, guiding strategies to address any potential class imbalance.
Logistic Regression was employed as the classification algorithm of choice. It models the probability of a sample belonging to a particular class, making it valuable for predicting purchase intent in our e-commerce context. By utilizing the insights gained from the Exploratory Data Analysis (EDA), the Logistic Regression model was trained on the 'Online Shoppers Purchasing Intention Dataset' to classify customers as likely purchasers or non-purchasers.
I used pipenv for the virtual environment.
pip install pipenv
To replicate the environment, on your command line, use
pipenv install numpy scikit-learn==0.24.2 flask waitress
For the required versions for libraries, use requirements.txt
$pip install -r requirements.txt
Use this command for container building.
$Docker build -t 'container_name'
Use this container running
$Docker run -it --rm -p 9696:9696 'container_name'