# Predicting-Customer-Satisfaction-by-using-arduino-and-python
In my project, I collected, cleaned, analyzed, and visualized customer satisfaction data using survey data collected from the customer satisfaction measurement (CSM) device that I built earlier. The objective is to adopt the idea of a virtual coffee shop to collect data and then measure customer satisfaction votes, mine, analyze, and visualize it. Python, Arduino editor, SPSS, and Power BI were used in all of the analysis processes. Customer Satisfaction Measurement (CSM) assists in identifying the competitive advantages and disadvantages of coffee shop management as well as areas that require changes and improvements to raise the percentages of repeat orders and purchases as well as the proportion of loyal customers.
The survey questions were as follows:
Enter your Customer Number ?
Enter your Name ?
Enter your Mobile Number?
Sex ?
Age ?
Enter the Branch Name?
City ?
The Internet is it quick? Answer (YES or NO) ?
The service is it quick? Answer (YES or NO) ?
The place (internal or external) where the service was provided?
Do you think the prices are fair? Answer (YES or NO)
What motivated you to choose us, primarily? (desserts, cold drink, and hot drink)?
"Satisfied" Class
"Unsatisfied" Class
The circuit for connecting "Customer Satisfaction Measurement" (CSM) device :
Arduino Code C++ with design circuit CSM in tinkercad.
XGBoost Model Evaluation:
I got 100% in ROC_AUC, which is perfect. because when two curves completely don’t overlap, the separability of the model is optimal. The XGBoost model can clearly distinguish between the classes of "satisfied" and "unsatisfied." with 99% precision and 100% recall.
Here is a classification report:
Confusion_matrix, Roc_auc_Score, Accuracy_score, Plot_confusion_matrix
Also, while cleaning the data, I removed the "neutral" responses because they were few and irrelevant to my objective.
Previously, we normalized our dataset via StandardScaler .
The results of the responses to the survey
Here the number of responses for females is more than for males
Total responses by branch and Age
Total responses by product and Age
The most frequent customers of the coffee shop
Relationship between time series and customers Age_1
Relationship between time series and customers Age_2
Heatmap of dataset
To find out which features have a significant correlation with customer satisfaction, let's look at a correlation heatmap.
Model Comparison and Conclusions:
We have a powerful candidate based on the ROC-AUC measure. Model Comparison and Conclusions All of our other models, including Random Forest and SVM, are outperformed by our XGBoost model.
Data Analysis by Power BI
Data Analysis by SPSS
Statistics Tables of dataset
Spilt analysis based on city="MADINAH"
Spilt analysis based on city="JEDDAH"
Project demonstration video: