Skip to content

Repository files navigation

Models Directory

This directory contains trained machine learning models for the Shopper Behavior Analysis project.

📊 Model Files

1. kmeans_model.pkl

  • Purpose: Customer segmentation model
  • Algorithm: K-Means Clustering
  • Number of clusters: 5
  • Features used: Age, Purchase Amount, Review Rating, Previous Purchases, Spending Score, Loyalty Score, Engagement Level, Discount Score

2. pca_model.pkl

  • Purpose: Dimensionality reduction for visualization
  • Components: 2 principal components
  • Usage: Transforms high-dimensional data to 2D for plotting

3. cluster_scaler.pkl

  • Purpose: StandardScaler fitted on clustering features
  • Usage: Scale new data before prediction

4. feature_scaler.pkl

  • Purpose: StandardScaler for all engineered features
  • Usage: Scale features for other ML tasks

5. label_encoders.pkl

  • Purpose: Dictionary of LabelEncoders for categorical variables
  • Encoded columns: Gender, Category, Location, Size, Color, Subscription Status, Shipping Type, Preferred Payment Method

6. preprocessor.pkl

  • Purpose: Complete preprocessing pipeline
  • Contains: All label encoders and scalers in one object

🔧 How to Load Models

import joblib

# Load K-Means model
kmeans = joblib.load('models/kmeans_model.pkl')

# Load scaler
scaler = joblib.load('models/cluster_scaler.pkl')

# Load label encoders
encoders = joblib.load('models/label_encoders.pkl')

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages