Welcome to the Customer Segmentation Web App! This application allows users to enter their details and get predictions on their spending score, along with visualizations of customer segments.
- Dynamic User Input: Enter age, annual income, and spending score to get predictions.
- Real-time Visualization: View 3D scatter plots of customer segments.
- Personalized Recommendations: Receive tailored recommendations based on predicted customer segments.
- Flask: Backend framework for handling requests and responses.
- Pandas: Data manipulation and analysis.
- Plotly: Interactive visualizations.
- Scikit-learn: Machine learning model for predictions.
- HTML/CSS/JavaScript: Frontend for user interaction and dynamic updates.
-
Clone the repository:
git clone https://github.com/Thorne-Musau/Consumer-Segmentation-Analysis.git cd customer-segmentation-webapp
-
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python webapp/app.py
-
Open your browser and navigate to
http://127.0.0.1:5000/
.
The app provides interactive 3D scatter plots to visualize customer segments based on age, annual income, and spending score.
The app uses a pre-trained Logistic Regression model to predict customer segments. The model is loaded from a .joblib
file.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
For any inquiries, please contact thornemusau.com.
Made with ❤️ by [Thorne Musau](https://github.com/Thorne-Musau)