Krishna-Vishista commited on
Commit
b502db6
·
verified ·
1 Parent(s): dda53b2

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +55 -0
  2. requirements.txt +4 -0
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+
3
+ tags:
4
+
5
+ \- machine-learning
6
+
7
+ \- clustering
8
+
9
+ \- k-means
10
+
11
+ \- customer-segmentation
12
+
13
+
14
+
15
+
16
+ \# Customer Segmentation K-Means Model
17
+
18
+
19
+
20
+ This repository contains a K-Means clustering model for customer segmentation.
21
+
22
+
23
+
24
+ \## Model Description
25
+
26
+ The model segments customers based on three features: `Age`, `Annual Income (k$)`, and `Spending Score (1-100)`. K-Means clustering was chosen due to its simplicity, efficiency for this type of unsupervised task, and the interpretability of the resulting clusters. The optimal number of clusters was determined using the Elbow Method.
27
+
28
+
29
+
30
+ \## Training Data
31
+
32
+ The model was trained on a dataset of \*\*200 customers\*\*, with features: `Age`, `Annual Income (k$)`, and `Spending Score (1-100)`.
33
+
34
+
35
+
36
+ \## Usage
37
+
38
+ To use this model for prediction, you need to provide input in the format:
39
+
40
+ `{"age": <int>, "annual\_income": <float>, "spending\_score": <float>}`
41
+
42
+
43
+
44
+ \## Example
45
+
46
+ \*\*Input:\*\*
47
+
48
+ `{"age": 30, "annual\_income": 50, "spending\_score": 60}`
49
+
50
+
51
+
52
+ \*\*Output (example):\*\*
53
+
54
+ `{"cluster\_id": 1}`
55
+
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ pandas
2
+ scikit-learn
3
+ joblib
4
+ flask # or fastapi, uvicorn