Downloads · 30 days
0
speedupp/ad-roi-regression-model
ad-roi-regression-model is a tabular regression model from speedupp. Use it for the tabular regression task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
Predicts the Return on Investment (ROI) for advertising campaigns across digital and physical platforms, enabling data-driven platform selection by product category.
Downloads · 30 days
0
Access
Public
Updated Apr 23, 2026
Repo size
17.4 MB
Likes
0
Public
Click a slice to open those files.
.joblib17 MB · 96%
From the Hugging Face model README
Predicts the Return on Investment (ROI) for advertising campaigns across digital and physical platforms, enabling data-driven platform selection by product category.
| Type | Platforms |
|---|---|
| Digital | Facebook, Instagram, Google Ads, YouTube |
| Physical | Car Commuting Advertising Network |
Electronics, Fashion, Food & Beverage, Health & Wellness, Automotive, Travel, Finance, Education, Real Estate, SaaS
Best Model: RandomForest
| Model | Test R² | CV R² (5-fold) | MAE | RMSE |
|---|---|---|---|---|
| Ridge | 0.4118 | 0.4088 ± 0.0152 | 0.8472 | 1.0287 |
| RandomForest | 0.5157 | 0.4923 ± 0.0164 | 0.7742 | 0.9334 |
| GradientBoosting | 0.4912 | 0.4574 ± 0.0145 | 0.7933 | 0.9567 |
| XGBoost | 0.4801 | 0.4449 ± 0.0192 | 0.7950 | 0.9671 |
| ExtraTrees | 0.5227 | 0.4877 ± 0.0189 | 0.7697 | 0.9266 |
| Feature | Description |
|---|---|
ad_spend | Total advertising budget ($) |
impressions | Number of ad views |
conversion_rate | Fraction of viewers who convert |
customer_acquisition_cost | Cost to acquire one customer ($) |
platform | Advertising platform (encoded) |
product_category | Product vertical (encoded) |
cost_per_impression | Derived: spend / impressions |
spend_cac_ratio | Derived: spend / CAC |
import joblib
from huggingface_hub import hf_hub_download
model = joblib.load(hf_hub_download("speedupp/ad-roi-regression-model", "best_model.joblib"))
le_platform = joblib.load(hf_hub_download("speedupp/ad-roi-regression-model", "label_encoder_platform.joblib"))
le_category = joblib.load(hf_hub_download("speedupp/ad-roi-regression-model", "label_encoder_category.joblib"))
# Predict ROI for a Facebook campaign for Electronics
import numpy as np
platform_enc = le_platform.transform(["Facebook"])[0]
category_enc = le_category.transform(["Electronics"])[0]
ad_spend = 10000
impressions = 500000
conversion_rate = 0.05
cac = 25
cpi = ad_spend / impressions
scr = ad_spend / cac
features = np.array([[ad_spend, impressions, conversion_rate, cac, platform_enc, category_enc, cpi, scr]])
predicted_roi = model.predict(features)
print(f"Predicted ROI: {predicted_roi[0]:.3f}")
The model reveals that conversion_rate is the strongest driver of ROI, followed by the platform choice and customer acquisition cost efficiency. Physical advertising networks (Car Commuting) show competitive ROI for Automotive and Real Estate categories but underperform for digitally-native categories like Fashion and SaaS.