Skip to content

About

R2CCP-based multimodal bid prediction with eight context models, per-bin conformal thresholds, and Monte Carlo decisions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R2CCP Bid Prediction

English | 한국어

Multimodal PQ bid-distribution modeling across eight competitive contexts, followed by 500K-run Monte Carlo decision support.

License: MIT Python 3.10+

Why

PQ awards combine technical and price scores. As a bidder's technical score falls below the maximum, price must compensate, which can leave separated valid bid ranges around an infeasible center. Competitor behavior therefore forms a multimodal distribution that a point prediction or one contiguous interval cannot represent.

How

Competitor price scores and bidding behavior were divided into eight competitive contexts, with one R2CCP distribution model trained per context. The public R2CCP implementation merged separate modes and the empty space between them into one interval. Entropy regularization and per-bin conformal thresholds were added to preserve disjoint valid ranges. Candidate bid rates were then evaluated with 500,000 Monte Carlo simulations to estimate win probability by range.

Result

  • Trained eight context models on 69,934 cases.
  • Reached 90.73% coverage at α=0.10 on 13,984 time-ordered validation cases.
  • Improved the internal PQ bid-award KPI by 35% in operation.

Method details

Interval-collapse repair (r2ccp_2.py)

The pip R2CCP package uses APS cumulative-mass intervals that collapse bimodal distributions. This implementation switches to per-bin threshold for distribution-shape preservation.

pip R2CCP vs r2ccp_2 on a bimodal distribution

pip R2CCP merges both modes (plus the empty space between) into one interval. r2ccp_2 keeps the two peaks as disjoint intervals.

pip R2CCP this impl
Interval APS cumulative Per-bin threshold
Bimodal preserved no yes
entropy_weight fixed configurable (default 3.0)
loss_weight 1.0 winner 5x
Adaptive range min/max percentile 0.5/99.5

8 context models (Q x BRD)

Q-group: ranking quantile (Q1 head-of-pack vs Q2 tail). BRD-group: bid-rate-difference quartiles.

              BRD_1  BRD_2  BRD_3  BRD_4
       Q1     m1     m2     m3     m4
       Q2     m5     m6     m7     m8

Per-context conformal alpha (group_alphas) tuned for 90-95% coverage by context.

Monte Carlo simulation (500K iterations)

For each candidate bid rate r in grid [0.975, 1.025] step 0.0005:

  1. Sample yega from Normal(institution_mean, institution_std)
  2. Sample competitor rates via tiered model (dedicated / behavioral / global)
  3. Tally wins

Law of large numbers gives P(win | r). tol_validity strategy picks the highest-validity rate within tolerance=0.02 of max P(win).

Repository layout

ensemble-bid-prediction/
├── r2ccp_2.py                       # core R2CCP custom impl (per-bin threshold)
├── mc_cp_simulation.py              # MC simulation engine
├── mc_cp_optimization.py            # Grid-search optimizer
├── mc_cp_optimization_fast.py       # Reduced-iter variant for testing
├── mc_validation_full.py            # Full validation (50K iter)
├── mc_simulator_production.py       # Production-grade simulator
├── feature_engineering.py           # Position / gap / notice / project / institution features
├── evaluate.py                      # Evaluation suite
├── backtest_simulation.py           # Backtest
├── backtest_simulation_tolerance.py # Backtest with tolerance strategy
├── strategic_bidding_optimizer.py   # Strategy comparison
├── copula_test.py / rank_copula_test.py  # Independence test for competitor sampling
├── train_cluster_models.py          # Per-cluster R2CCP models
├── train_company_models.py          # Per-company R2CCP models
├── train_strategic_mimicry.py       # Strategic mimicry training
├── train_weighted_quantile.py       # Weighted quantile regression
├── validate_inference.py / validate_optimizer.py / validation_backtest*.py
├── verify_normalized_formula.py     # Sanity check on normalization
├── analyze_expr_params.py           # Hyperparameter analysis
├── test_*.py                        # Unit tests
└── src/
    ├── data_pipeline/               # Metric calculators (min_bid_rate, normal_bid_line, ...)
    ├── features/                    # Feature engineering pipeline
    ├── models/conformal.py          # R2CCP wrapper
    └── preprocessing/               # Filters, recalculations, validators

Quick Start

pip install -r requirements.txt

# Train per-context models (requires features + processed data, not included)
python train_cluster_models.py
python train_company_models.py

# Run validation with full MC simulation
python mc_validation_full.py

# Backtest with tolerance strategy
python backtest_simulation_tolerance.py

Repository note

This repo provides the methodology, R2CCP custom impl, MC simulation engine, and per-context training pipeline. Training data, fitted model artifacts, and company-specific backtest tables are intentionally not included.

References

License

MIT

About

R2CCP-based multimodal bid prediction with eight context models, per-bin conformal thresholds, and Monte Carlo decisions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages