This project aims to perform customer segmentation analysis on credit card users to identify distinct customer groups based on their behavior and characteristics. The analysis uses unsupervised machine learning techniques, specifically K-means clustering, to group customers into meaningful segments.
The project analyzes various customer attributes such as spending behavior, credit limits, payment patterns, and other relevant features to identify natural groupings of customers. This segmentation can help in:
- Developing targeted marketing strategies
- Improving customer service
- Risk management
- Product development
- Understanding customer behavior patterns
- This project uses Poetry for dependency management. Ensure you have Poetry installed:
curl -sSL https://install.python-poetry.org | python3 -
- Create a new virtual environment and install dependencies:
poetry env use python3
poetry install
- Run Python scripts or commands within the Poetry environment:
poetry run python your_script.py
# Or run Jupyter notebook
poetry run jupyter notebook
Note: Instead of activating the virtual environment directly, we use poetry run
which is the recommended approach as it ensures all dependencies are properly managed by Poetry.
- pandas - Data manipulation and analysis
- numpy - Numerical computations
- matplotlib - Data visualization
- seaborn - Statistical data visualization
- scikit-learn - Machine learning algorithms
- jupyter - Interactive notebook environment
credit_card_customer_segmentation.ipynb
- Main Jupyter notebook containing the analysiscustomer_segmentation.csv
- Dataset containing customer informationdata_dictionary.md
- Detailed description of dataset features and their meaningsdataset_documentation.ipynb
- Additional documentation and exploratory analysis of the datasetREADME.md
- Project documentationpyproject.toml
&poetry.lock
- Poetry dependency management configurationproject_info.txt
- Additional project notes and information
For a detailed understanding of the dataset features and their meanings, please refer to:
data_dictionary.md
- Contains definitions of all variables in the datasetdataset_documentation.ipynb
- Provides in-depth analysis and examples of the data structure
- Data Loading and Exploration
- Data Preprocessing and Feature Engineering
- Feature Scaling
- K-means Clustering
- Cluster Analysis and Interpretation
- Visualization of Results
To run the analysis:
- Ensure all dependencies are installed:
poetry install
- Launch Jupyter notebook:
poetry run jupyter notebook
- Open
credit_card_customer_segmentation.ipynb
in the Jupyter interface