This directory contains trained machine learning models for the Shopper Behavior Analysis project.
- 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
- Purpose: Dimensionality reduction for visualization
- Components: 2 principal components
- Usage: Transforms high-dimensional data to 2D for plotting
- Purpose: StandardScaler fitted on clustering features
- Usage: Scale new data before prediction
- Purpose: StandardScaler for all engineered features
- Usage: Scale features for other ML tasks
- Purpose: Dictionary of LabelEncoders for categorical variables
- Encoded columns: Gender, Category, Location, Size, Color, Subscription Status, Shipping Type, Preferred Payment Method
- Purpose: Complete preprocessing pipeline
- Contains: All label encoders and scalers in one object
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')