...

/

Interpreting the Segmentation Result

Interpreting the Segmentation Result

Learn how to evaluate segmentation results.

We have segmented our customers into four groups. Customers in each group share similar characteristics. The more we know about the traits of each segment, the better we will be able to serve them. Therefore, let’s try to analyze each customer segment.

Observations

Let's start by looking at the average of each feature.

Segments characteristics

Press + to interact
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# load dataset containing segmented labels
df_customers_segmented = pd.read_csv('customers_segmented.csv', header=0, index_col='CustomerID')
df_customers_analysis = df_customers_segmented.groupby('Segment').mean().round(2)
print(df_customers_analysis.head())

Explanation

  • In line 9, we calculate the average of the segmented customers using the groupby() function. ...