Domain-Aware ML (Mixture of Experts)
Specialized ML models for different market categories.Overview
Instead of one generic model, Predicta uses domain-specific specialist models for better accuracy:| Domain | Model | Domain Features |
|---|---|---|
crypto | crypto_model.keras | BTC correlation, gas, funding rate |
sports | sports_model.keras | Team ELO, injuries, weather |
politics | politics_model.keras | Polling, incumbency, news sentiment |
entertainment | entertainment_model.keras | Social mentions, trending score |
science | science_model.keras | Historical success, regulatory stage |
generic | generic_model.keras | Fallback for rare categories |
Architecture
Files
| File | Purpose |
|---|---|
cortex/domain_router.py | Classify markets into domains |
cortex/domain_features.py | Extract domain-specific features |
cortex/training/bootstrap_by_domain.py | Create domain-separated datasets |
cortex/training/train_domain_model.py | Train specialist models |
cortex/inference_server.py | /predict_domain endpoint |
Usage
1. Generate Datasets
2. Train Models
3. Inference
Models auto-load on server startup. Use the new endpoint:Fallback Behavior
- If router confidence < 50% → Use
generic_model - If domain model missing → Use
generic_model - If generic missing → Use legacy model
- If all fail → HTTP 503