πŸ“Š Advertising ROI Regression Model

Predicts the Return on Investment (ROI) for advertising campaigns across digital and physical platforms, enabling data-driven platform selection by product category.

Platforms Compared

Type Platforms
Digital Facebook, Instagram, Google Ads, YouTube
Physical Car Commuting Advertising Network

Product Categories

Electronics, Fashion, Food & Beverage, Health & Wellness, Automotive, Travel, Finance, Education, Real Estate, SaaS

Model Performance

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 Importance

  • cost_per_impression: 0.4377
  • customer_acquisition_cost: 0.1501
  • conversion_rate: 0.1226
  • platform: 0.0824
  • product_category: 0.0615
  • spend_cac_ratio: 0.0578
  • impressions: 0.0442
  • ad_spend: 0.0438

Features

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

Usage

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}")

Key Insights

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.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support