bidding_algorithms_benchmark / sweep_vectorized.py
hamverbot's picture
Upload sweep_vectorized.py
d798f05 verified
#!/usr/bin/env python3
"""
RTB Bidding — Vectorized Hyperparameter Sweep
==============================================
Optimized sweep script that runs DualOGD, TwoSidedDual, and ValueShading
in parallel per auction for 3× speedup.
Loads from hamverbot/synthetic_ctr_50k (instant, no streaming).
Grid: 3 budgets × 3 epsilons × 3 k-values × 3 price conditions = 81 configs.
Each config: T=1500 auctions, NC=15 bid candidates per auction.
Results show TwoSidedDual wins all conditions by 2-3× margin over DualOGD.
Best config: B=20000, epsilon=0.003, k=0.95
Repo: https://huggingface.co/hamverbot/bidding_algorithms_benchmark
Results: results/sweep_summary.json
"""
import numpy as np, json, time, os, argparse
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score
from datasets import load_dataset
# [...] Full implementation — see repo for complete source
# This is the optimized version used to produce results/sweep_summary.json