Customer Segmentation Analysis with Python

You can check that out with two heat maps on the gender-specific data frames created earlier.

Correlation heat map of female customersSubstituting the female_customers data frame for the men’s reveals the following plot for them:Correlation heat map of male customersAge more strongly affects spending score for women in this case.

Nothing else is really strongly correlated enough to say much of anything.

Now you can zoom in on the women’s spending score to age relationship with a nice lmplot.

Scatter of age to spending score for women, with a regression line and bootstrap interval about the lineLastly, you can look at income to spending score colored by gender with this code:Spending score and income by genderThere is some patterning here.

Zero correlation though.

But you can think of these as customer segments:Low income, low spending scoreLow income, high spending scoreMid income, medium spending scoreHigh income, low spending scoreHigh income, high spending scoreInterpretation and ActionsBringing it back to the business and marketing use cases of this kind of analysis, the following hypotheses could be tested.

Does marketing cheaper items to women change purchase frequency or volume?Does marketing more to younger women result in higher sales because their spending score tends to be higher?How do advertising, pricing, branding, and other strategies impact the spending scores of the older women (older than early 40s)?To answer these questions, more data is needed.

It would be helpful to plan how to gather more data to build a data set that has more features.

The more features, the better understanding of what determines spending score.

Once this is better understood, you could understand what factors will lead to increasing spending score, thus lead to greater profits.

KPIsIn the spirit of business use cases, I’ll define the following KPIs as an example to show how you would know if your efforts are paying off or not.

The change in frequency and volume of purchases by women after the introduction of more marketing campaigns targeting them.

The change in spending score after introducing marketing campaigns targeting younger women.

The change in spending score after introducing marketing campaigns targeting older women.

Thanks for reading.

If you liked this article, check out my other ones on my Medium.

As always, happy coding!Riley.. More details

Leave a Reply