🧠 Project Overview
This repository contains a trained Random Forest Classifier that predicts whether a fashion product belongs to the older half or newer half of the dataset.
The labels are created using a Median Split on the year column.
The dataset used is Fashion Product Images (Small) from HuggingFace.
This model was created as part of a full ML workflow including:
Exploratory Data Analysis (EDA)
Data Cleaning
Feature Engineering
Clustering with KMeans
Classification Modeling
Evaluation & Model Comparison
Final model export as a pickle file
📦 Model Purpose
The goal of this model is to classify products into:
Class 0 → "Old" (year < dataset median)
Class 1 → "New" (year ≥ dataset median)
This supports tasks such as trend analysis, product lifecycle estimation, and fashion metadata enrichment.
🔧 Features Used
After cleaning and engineering, the model uses:
Original features
gender
masterCategory
subCategory
articleType
baseColour
season
Engineered features
is_accessory — whether product belongs to accessories
is_footwear — footwear indicator
is_unisex — unisex indicator
colour_brightness — manually defined brightness score
colour_cluster — KMeans cluster assignment
cluster_distance — distance from cluster centroid
All categorical variables were one-hot encoded.
🤖 Model Details
Type: RandomForestClassifier
Library: scikit-learn
Training/Test Split: 80 / 20
Hyperparameters: Default sklearn parameters
Target: year_class (binary)
The Random Forest model outperformed Logistic Regression and Gradient Boosting on:
Accuracy
F1 Score
Lower rate of False Negatives
📈 Evaluation Summary
The model was evaluated using:
Accuracy
Precision
Recall
F1 Score
Confusion Matrix
Key insight:
The Random Forest model achieved the best balance between correctly identifying new items and minimizing classification errors.
https://youtu.be/K3FCyaV7LVk