File size: 2,291 Bytes
02655d9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# Quantum-Scaling RL Visualization Modules
Four visualization modules for analyzing Quantum-Scaling RL Hybrid Agent performance.
## Modules Overview
### 1. Backend Performance Comparison
Compares IBM vs Russian backends across languages with mean reward and standard deviation.
**Visualizations**: Bar charts with error bars, grouped bars per language
### 2. Reward vs Batch Size Scaling
Shows how reward scales with batch size across different model sizes.
**Visualizations**: Scatter plots, scaling law validation, efficiency heatmaps
### 3. Cross-Lingual Backend Preference
Displays backend preferences per language based on learned heuristics.
**Visualizations**: Pie charts, language-backend matrices, horizontal bars
### 4. Performance Trend Over Edit Cycles
Tracks agent improvement over time through RL retraining and heuristic updates.
**Visualizations**: Line plots with moving average, stacked area charts, learning curves
## Quick Start
```bash
# Run demo (generates 11 visualizations)
cd agent/visualizations
python demo_all_visualizations.py
```
## Usage Example
```python
from Backend_Performance_Comparison import plot_backend_performance_comparison
backend_performance = {
'ibm': [0.807, 0.785, 0.820],
'russian': [0.825, 0.810, 0.840]
}
plot_backend_performance_comparison(backend_performance, 'output.png')
```
## Integration
```python
from quantum_scaling_rl_hybrid import QuantumScalingRLHybrid
from visualizations.Backend_Performance_Comparison import plot_backend_performance_comparison
agent = QuantumScalingRLHybrid()
# ... run edit cycles ...
stats = agent.get_statistics()
plot_backend_performance_comparison(stats['backend_performance'])
```
## Dependencies
```bash
pip install matplotlib numpy
```
## Files
- `Backend_Performance_Comparison.py` - Backend comparison charts
- `Reward_vs_BatchSize_Scaling.py` - Batch size scaling analysis
- `Cross_Lingual_Backend_Preference.py` - Language preference visualization
- `Performance_Trend_Over_Edit_Cycles.py` - Performance trend tracking
- `demo_all_visualizations.py` - Complete demo script
## Output
All visualizations are 300 DPI PNG files with professional styling, clear labels, and color-coded data.
|