Downloads · 30 days
0
giladbecher/brazilian-ecommerce-models
brazilian-ecommerce-models is a machine learning model from giladbecher. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Dec 6, 2025
Repo size
6.1 MB
Likes
0
Public
Click a slice to open those files.
.pkl6.1 MB · 70%
From the Hugging Face model README
[(https://youtu.be/Gdw33Av6rCk)]
This project focuses on predicting delivery times for e-commerce orders in Brazil, using the famous Olist Public Dataset. The goal is to improve customer experience by providing accurate delivery estimates.
The project is divided into two main tasks:
customer_state: The destination state (critical for logistics).product_weight_g: Weight of the package.freight_value: Shipping cost.price: Product value.To improve the model's performance beyond the baseline, I applied several techniques:
customer_state into One-Hot Encoded features to capture geographical patterns (e.g., separating Sao Paulo from Amazonas).I compared a Baseline Linear Regression against advanced models trained on the engineered dataset.
| Model | R2 Score | Improvement |
|---|---|---|
| Baseline (Linear Regression) | 0.057 | - |
| Improved Linear Regression | 0.216 | +278% |
| XGBoost / Random Forest (Winner) | 0.267 | Best Performance |
Insight: The significant jump in R2 proves that location data and clustering were essential for prediction.
I converted the target variable into 3 balanced classes using Quantile Binning:
Best Model: XGBoost Accuracy: ~57% (vs. 33% random chance)
This repository contains the following files:
Assignment_2.ipynb: The complete Python notebook with all code, EDA, and visualizations.regression_model.pkl: The trained Random Forest model for regression.classification_model.pkl: The trained XGBoost model for classification.README.md: Project documentation.