The project involves the development of a web app for predicting the future annual expenses of customers using an e-commerce service.
The training and testing of the ML model were carried out using a Kubeflow pipeline.
In particular, the code within the current directory "CustomerBehaviorPrediction" is divided into four subdirectories:
/app/cluster/pipeline/NGINX_example
Within the /app directory, the following items are present:
app.py: code for the web applicationDockerfile: Dockerfile for creating the application containerk8s_customer_behavior_deployment.yaml: file for configuring the pods related to the application in the cluster (Deployment & Service)requirements.txt: Python libraries required for running the application, which will be included in the container/model: directory containing the scaler and model used by the applicationdeployment.md: file explaining how to deploy and run the application on the clusterdocker_hub.sh: script for creating the application container and pushing the image to Docker Hub
Within the /cluster directory, the following items are present:
cluster_config.yaml: Kubernetes cluster configuration filemetric-server.yaml: metric-server configuration filecluster.md: file explaining how to set up the cluster and install the metric-server
Within the /pipeline directory, the following items are present:
/load_data: Component responsible for loading the dataset for training/preprocess_data: Component responsible for data preprocessing/linear_regression: Component responsible for training and testing the Linear Regression model/xgboost_regressor: Component responsible for training and testing the XGBoost Regressor model/neural_regression: Component responsible for training and testing the MLP modelcustomer_pipeline.py: file for generating the kubeflow pipeline YAML file (also contains the definition of the show_result and evaluate_best_model components)customer_pipeline.yaml: kubeflow pipeline YAML file to be inserted into kubeflowdocker_hub.sh: script for creating containers for various components and pushing images to Docker Hubpipeline.md: file explaining how to install Kubeflow on the Kubernetes cluster and import the pipeline
Within the /NGINX_example directory, the following items are present:
IngressController.yaml: configuration file for the Ingress Controller for the Web App FirewallVirtualServer.yaml: configuration file for the virtual server of the Web App Firewall