This code performs analysis and visualization on a marketing dataset using Python and various libraries, including scikit-learn, pandas, matplotlib, and seaborn.
The code performs the following tasks:
- Data preprocessing, including cleaning and transformation.
- Exploration of customer demographics and spending behavior.
- Dimensionality reduction using Principal Component Analysis (PCA).
- Cluster analysis using KMeans and Agglomerative Clustering.
- Visualization of data using 3D scatter plots.
-
Ensure you have the necessary Python libraries installed, such as scikit-learn, pandas, matplotlib, seaborn, and numpy.
-
Modify the 'Location' variable to specify the path to your marketing dataset (named 'marketing_campaign.csv').
-
Run the code in a Python environment.
-
The code will generate various plots and visualizations to help you understand customer behavior and clustering results.