Customer Segmentation - K-Means

Overview

This model performs customer segmentation using the K-Means clustering algorithm. It groups customers with similar demographic and behavioral characteristics into distinct segments that can be used for customer analysis, marketing campaigns, and personalization strategies.

Model Type

K-Means Clustering

Features Used

The model was trained using the following features:

  • Gender
  • Ever Married
  • Age
  • Graduated
  • Profession
  • Work Experience
  • Spending Score
  • Family Size
  • Age Group
  • Family Category

Output

The model assigns a customer to a cluster.

Example:

  • Cluster 0
  • Cluster 1
  • Cluster 2
  • Cluster 3

Each cluster represents a group of customers with similar characteristics.

Files Required

  • kmeans_model.joblib
  • scaler.joblib
  • pca.joblib

Usage

import joblib
import numpy as np

scaler = joblib.load("scaler.joblib")
pca = joblib.load("pca.joblib")
model = joblib.load("kmeans_model.joblib")
customer = np.array([[...]])
customer_scaled = scaler.transform(customer)
customer_pca = pca.transform(customer_scaled)
cluster = model.predict(customer_pca)
print("Customer Cluster:", cluster[0])

Author

Mithun

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support